mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
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>
This commit is contained in:
parent
93ee7a9340
commit
d37854cf99
@ -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;
|
||||
|
@ -269,6 +269,8 @@ void dbg_dump_lprop(const struct ubifs_info *c, const struct ubifs_lprops *lp);
|
||||
void dbg_dump_lprops(struct ubifs_info *c);
|
||||
void dbg_dump_lpt_info(struct ubifs_info *c);
|
||||
void dbg_dump_leb(const struct ubifs_info *c, int lnum);
|
||||
void dbg_dump_sleb(const struct ubifs_info *c,
|
||||
const struct ubifs_scan_leb *sleb, int offs);
|
||||
void dbg_dump_znode(const struct ubifs_info *c,
|
||||
const struct ubifs_znode *znode);
|
||||
void dbg_dump_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat);
|
||||
@ -387,6 +389,9 @@ static inline void dbg_dump_lpt_info(struct ubifs_info *c) { return; }
|
||||
static inline void dbg_dump_leb(const struct ubifs_info *c,
|
||||
int lnum) { return; }
|
||||
static inline void
|
||||
dbg_dump_sleb(const struct ubifs_info *c,
|
||||
const struct ubifs_scan_leb *sleb, int offs) { return; }
|
||||
static inline void
|
||||
dbg_dump_znode(const struct ubifs_info *c,
|
||||
const struct ubifs_znode *znode) { return; }
|
||||
static inline void dbg_dump_heap(struct ubifs_info *c,
|
||||
|
Loading…
Reference in New Issue
Block a user