diff options
author | Adrian Hunter <ext-adrian.hunter@nokia.com> | 2008-09-12 11:13:31 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-09-30 04:12:59 -0400 |
commit | 73944a6de048c2c49422e9063e57198256efd23e (patch) | |
tree | 048789b4d3228dcf6e0f33a446bdbf423ebf5b6f /fs/ubifs/debug.c | |
parent | 5c0013c16bd2ee08ffef1a1365622556a57218f5 (diff) |
UBIFS: add more debugging messages for LPT
Also add debugging checks for LPT size and separate
out c->check_lpt_free from unrelated bitfields.
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Diffstat (limited to 'fs/ubifs/debug.c')
-rw-r--r-- | fs/ubifs/debug.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index 32071ec87cd7..7186400750e7 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c | |||
@@ -655,6 +655,43 @@ void dbg_dump_lprops(struct ubifs_info *c) | |||
655 | } | 655 | } |
656 | } | 656 | } |
657 | 657 | ||
658 | void dbg_dump_lpt_info(struct ubifs_info *c) | ||
659 | { | ||
660 | int i; | ||
661 | |||
662 | spin_lock(&dbg_lock); | ||
663 | printk(KERN_DEBUG "\tlpt_sz: %lld\n", c->lpt_sz); | ||
664 | printk(KERN_DEBUG "\tpnode_sz: %d\n", c->pnode_sz); | ||
665 | printk(KERN_DEBUG "\tnnode_sz: %d\n", c->nnode_sz); | ||
666 | printk(KERN_DEBUG "\tltab_sz: %d\n", c->ltab_sz); | ||
667 | printk(KERN_DEBUG "\tlsave_sz: %d\n", c->lsave_sz); | ||
668 | printk(KERN_DEBUG "\tbig_lpt: %d\n", c->big_lpt); | ||
669 | printk(KERN_DEBUG "\tlpt_hght: %d\n", c->lpt_hght); | ||
670 | printk(KERN_DEBUG "\tpnode_cnt: %d\n", c->pnode_cnt); | ||
671 | printk(KERN_DEBUG "\tnnode_cnt: %d\n", c->nnode_cnt); | ||
672 | printk(KERN_DEBUG "\tdirty_pn_cnt: %d\n", c->dirty_pn_cnt); | ||
673 | printk(KERN_DEBUG "\tdirty_nn_cnt: %d\n", c->dirty_nn_cnt); | ||
674 | printk(KERN_DEBUG "\tlsave_cnt: %d\n", c->lsave_cnt); | ||
675 | printk(KERN_DEBUG "\tspace_bits: %d\n", c->space_bits); | ||
676 | printk(KERN_DEBUG "\tlpt_lnum_bits: %d\n", c->lpt_lnum_bits); | ||
677 | printk(KERN_DEBUG "\tlpt_offs_bits: %d\n", c->lpt_offs_bits); | ||
678 | printk(KERN_DEBUG "\tlpt_spc_bits: %d\n", c->lpt_spc_bits); | ||
679 | printk(KERN_DEBUG "\tpcnt_bits: %d\n", c->pcnt_bits); | ||
680 | printk(KERN_DEBUG "\tlnum_bits: %d\n", c->lnum_bits); | ||
681 | printk(KERN_DEBUG "\tLPT root is at %d:%d\n", c->lpt_lnum, c->lpt_offs); | ||
682 | printk(KERN_DEBUG "\tLPT head is at %d:%d\n", | ||
683 | c->nhead_lnum, c->nhead_offs); | ||
684 | printk(KERN_DEBUG "\tLPT ltab is at %d:%d\n", c->ltab_lnum, c->ltab_offs); | ||
685 | if (c->big_lpt) | ||
686 | printk(KERN_DEBUG "\tLPT lsave is at %d:%d\n", | ||
687 | c->lsave_lnum, c->lsave_offs); | ||
688 | for (i = 0; i < c->lpt_lebs; i++) | ||
689 | printk(KERN_DEBUG "\tLPT LEB %d free %d dirty %d tgc %d " | ||
690 | "cmt %d\n", i + c->lpt_first, c->ltab[i].free, | ||
691 | c->ltab[i].dirty, c->ltab[i].tgc, c->ltab[i].cmt); | ||
692 | spin_unlock(&dbg_lock); | ||
693 | } | ||
694 | |||
658 | void dbg_dump_leb(const struct ubifs_info *c, int lnum) | 695 | void dbg_dump_leb(const struct ubifs_info *c, int lnum) |
659 | { | 696 | { |
660 | struct ubifs_scan_leb *sleb; | 697 | struct ubifs_scan_leb *sleb; |