diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2013-12-03 20:16:00 +0900 |
---|---|---|
committer | Daniel Phillips <daniel@tux3.org> | 2013-12-03 20:16:00 +0900 |
commit | 90b5698e9af93664f8f5f1df28422345cf735375 (patch) | |
tree | b1d4c6e6f3df70a5c0903c4cf2a710d57711a1fb | |
parent | cda58256f9b94dd5ca52c47811cec1e3b3f39f8a (diff) | |
download | linux-tux3-90b5698e9af93664f8f5f1df28422345cf735375.tar.gz |
tux3: Use tux3_dbg() in ->leaf_dump()
trace() can be disabled by options. But ->leaf_dump() wants to dump
always.
So, this uses __tux3_dbg(), instead of trace_on(). [However, those are
checking tux3_trace option for now. We should remove this check?]
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
-rw-r--r-- | fs/tux3/dleaf2.c | 11 | ||||
-rw-r--r-- | fs/tux3/ileaf.c | 8 |
2 files changed, 11 insertions, 8 deletions
diff --git a/fs/tux3/dleaf2.c b/fs/tux3/dleaf2.c index d36290593f958..cac244088445e 100644 --- a/fs/tux3/dleaf2.c +++ b/fs/tux3/dleaf2.c @@ -140,14 +140,17 @@ static int dleaf2_can_free(struct btree *btree, void *leaf) static void __dleaf2_dump(struct btree *btree, struct dleaf2 *dleaf, const char *prefix) { + if (!tux3_trace) + return; + unsigned i; - trace_on("%sdleaf %p, magic %x, count %u", prefix, - dleaf, be16_to_cpu(dleaf->magic), be16_to_cpu(dleaf->count)); + __tux3_dbg("%sdleaf %p, magic %x, count %u\n", prefix, + dleaf, be16_to_cpu(dleaf->magic), be16_to_cpu(dleaf->count)); for (i = 0; i < be16_to_cpu(dleaf->count); i++) { struct extent ex; get_extent(dleaf->table + i, &ex); - trace_on(" logical %Lu, physical %Lu, version %u", - ex.logical, ex.physical, ex.version); + __tux3_dbg(" logical %Lu, physical %Lu, version %u\n", + ex.logical, ex.physical, ex.version); } } diff --git a/fs/tux3/ileaf.c b/fs/tux3/ileaf.c index bd93bd911023f..6cbbd5b960351 100644 --- a/fs/tux3/ileaf.c +++ b/fs/tux3/ileaf.c @@ -114,17 +114,17 @@ static void ileaf_dump(struct btree *btree, void *vleaf) __be16 *dict = ileaf_dict(btree, leaf); unsigned offset = 0; - trace_on("ileaf 0x%Lx/%i (%x bytes free)", - ibase(leaf), icount(leaf), ileaf_free(btree, leaf)); + __tux3_dbg("ileaf 0x%Lx/%i (%x bytes free)", + ibase(leaf), icount(leaf), ileaf_free(btree, leaf)); for (int i = 0; i < icount(leaf); i++, inum++) { int limit = __atdict(dict, i + 1), size = limit - offset; if (!size) continue; if (size < 0) - trace_on(" 0x%Lx: <corrupt>\n", inum); + __tux3_dbg(" 0x%Lx: <corrupt>\n", inum); else if (!size) - trace_on(" 0x%Lx: <empty>\n", inum); + __tux3_dbg(" 0x%Lx: <empty>\n", inum); else if (attr_ops == &iattr_ops) { /* FIXME: this doesn't work in kernel */ struct tux3_inode tuxnode = {}; |