diff options
author | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-08-22 16:23:56 +0300 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-08-22 16:23:56 +0300 |
commit | d37854cf99319966f34bb19c7a897b87d478b56c (patch) | |
tree | 31a1d7eb0403fc33feaebb3fd4d010e326ac0330 /fs/ubifs/debug.c | |
parent | 93ee7a9340d64f20295aacc3fb6a22b759323280 (diff) | |
download | op-kernel-dev-d37854cf99319966f34bb19c7a897b87d478b56c.zip op-kernel-dev-d37854cf99319966f34bb19c7a897b87d478b56c.tar.gz |
UBIFS: introduce a helper to dump scanning info
This commit adds 'dbg_dump_sleb()' helper function to dump scanning
information.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Diffstat (limited to 'fs/ubifs/debug.c')
-rw-r--r-- | fs/ubifs/debug.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index eef109a..b09ba2d 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -870,6 +870,22 @@ void dbg_dump_lpt_info(struct ubifs_info *c) spin_unlock(&dbg_lock); } +void dbg_dump_sleb(const struct ubifs_info *c, + const struct ubifs_scan_leb *sleb, int offs) +{ + struct ubifs_scan_node *snod; + + printk(KERN_DEBUG "(pid %d) start dumping scanned data from LEB %d:%d\n", + current->pid, sleb->lnum, offs); + + list_for_each_entry(snod, &sleb->nodes, list) { + cond_resched(); + printk(KERN_DEBUG "Dumping node at LEB %d:%d len %d\n", sleb->lnum, + snod->offs, snod->len); + dbg_dump_node(c, snod->node); + } +} + void dbg_dump_leb(const struct ubifs_info *c, int lnum) { struct ubifs_scan_leb *sleb; |