aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/debug.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 12:19:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 12:19:03 -0400
commit396b122f6af3d329df3b4d688f6e66de3e2a399a (patch)
tree0b4185d529c1ba4c8eca1de23f14beecbe460323 /fs/ubifs/debug.c
parented402af3c23a4804b3f8899263e8d0f97c62ab49 (diff)
parent54779aabb0183bbe049d2b52e96cd148366dfb0b (diff)
Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6
* 'linux-next' of git://git.infradead.org/ubifs-2.6: (25 commits) UBIFS: fix ubifs_compress commentary UBIFS: amend printk UBIFS: do not read unnecessary bytes when unpacking bits UBIFS: check buffer length when scanning for LPT nodes UBIFS: correct condition to eliminate unecessary assignment UBIFS: add more debugging messages for LPT UBIFS: fix bulk-read handling uptodate pages UBIFS: improve garbage collection UBIFS: allow for sync_fs when read-only UBIFS: commit on sync_fs UBIFS: correct comment for commit_on_unmount UBIFS: update dbg_dump_inode UBIFS: fix commentary UBIFS: fix races in bit-fields UBIFS: ensure data read beyond i_size is zeroed out correctly UBIFS: correct key comparison UBIFS: use bit-fields when possible UBIFS: check data CRC when in error state UBIFS: improve znode splitting rules UBIFS: add no_chk_data_crc mount option ...
Diffstat (limited to 'fs/ubifs/debug.c')
-rw-r--r--fs/ubifs/debug.c79
1 files changed, 62 insertions, 17 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index d7f7645779f2..7186400750e7 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -222,30 +222,38 @@ void dbg_dump_inode(const struct ubifs_info *c, const struct inode *inode)
222{ 222{
223 const struct ubifs_inode *ui = ubifs_inode(inode); 223 const struct ubifs_inode *ui = ubifs_inode(inode);
224 224
225 printk(KERN_DEBUG "inode %lu\n", inode->i_ino); 225 printk(KERN_DEBUG "Dump in-memory inode:");
226 printk(KERN_DEBUG "size %llu\n", 226 printk(KERN_DEBUG "\tinode %lu\n", inode->i_ino);
227 printk(KERN_DEBUG "\tsize %llu\n",
227 (unsigned long long)i_size_read(inode)); 228 (unsigned long long)i_size_read(inode));
228 printk(KERN_DEBUG "nlink %u\n", inode->i_nlink); 229 printk(KERN_DEBUG "\tnlink %u\n", inode->i_nlink);
229 printk(KERN_DEBUG "uid %u\n", (unsigned int)inode->i_uid); 230 printk(KERN_DEBUG "\tuid %u\n", (unsigned int)inode->i_uid);
230 printk(KERN_DEBUG "gid %u\n", (unsigned int)inode->i_gid); 231 printk(KERN_DEBUG "\tgid %u\n", (unsigned int)inode->i_gid);
231 printk(KERN_DEBUG "atime %u.%u\n", 232 printk(KERN_DEBUG "\tatime %u.%u\n",
232 (unsigned int)inode->i_atime.tv_sec, 233 (unsigned int)inode->i_atime.tv_sec,
233 (unsigned int)inode->i_atime.tv_nsec); 234 (unsigned int)inode->i_atime.tv_nsec);
234 printk(KERN_DEBUG "mtime %u.%u\n", 235 printk(KERN_DEBUG "\tmtime %u.%u\n",
235 (unsigned int)inode->i_mtime.tv_sec, 236 (unsigned int)inode->i_mtime.tv_sec,
236 (unsigned int)inode->i_mtime.tv_nsec); 237 (unsigned int)inode->i_mtime.tv_nsec);
237 printk(KERN_DEBUG "ctime %u.%u\n", 238 printk(KERN_DEBUG "\tctime %u.%u\n",
238 (unsigned int)inode->i_ctime.tv_sec, 239 (unsigned int)inode->i_ctime.tv_sec,
239 (unsigned int)inode->i_ctime.tv_nsec); 240 (unsigned int)inode->i_ctime.tv_nsec);
240 printk(KERN_DEBUG "creat_sqnum %llu\n", ui->creat_sqnum); 241 printk(KERN_DEBUG "\tcreat_sqnum %llu\n", ui->creat_sqnum);
241 printk(KERN_DEBUG "xattr_size %u\n", ui->xattr_size); 242 printk(KERN_DEBUG "\txattr_size %u\n", ui->xattr_size);
242 printk(KERN_DEBUG "xattr_cnt %u\n", ui->xattr_cnt); 243 printk(KERN_DEBUG "\txattr_cnt %u\n", ui->xattr_cnt);
243 printk(KERN_DEBUG "xattr_names %u\n", ui->xattr_names); 244 printk(KERN_DEBUG "\txattr_names %u\n", ui->xattr_names);
244 printk(KERN_DEBUG "dirty %u\n", ui->dirty); 245 printk(KERN_DEBUG "\tdirty %u\n", ui->dirty);
245 printk(KERN_DEBUG "xattr %u\n", ui->xattr); 246 printk(KERN_DEBUG "\txattr %u\n", ui->xattr);
246 printk(KERN_DEBUG "flags %d\n", ui->flags); 247 printk(KERN_DEBUG "\tbulk_read %u\n", ui->xattr);
247 printk(KERN_DEBUG "compr_type %d\n", ui->compr_type); 248 printk(KERN_DEBUG "\tsynced_i_size %llu\n",
248 printk(KERN_DEBUG "data_len %d\n", ui->data_len); 249 (unsigned long long)ui->synced_i_size);
250 printk(KERN_DEBUG "\tui_size %llu\n",
251 (unsigned long long)ui->ui_size);
252 printk(KERN_DEBUG "\tflags %d\n", ui->flags);
253 printk(KERN_DEBUG "\tcompr_type %d\n", ui->compr_type);
254 printk(KERN_DEBUG "\tlast_page_read %lu\n", ui->last_page_read);
255 printk(KERN_DEBUG "\tread_in_a_row %lu\n", ui->read_in_a_row);
256 printk(KERN_DEBUG "\tdata_len %d\n", ui->data_len);
249} 257}
250 258
251void dbg_dump_node(const struct ubifs_info *c, const void *node) 259void dbg_dump_node(const struct ubifs_info *c, const void *node)
@@ -647,6 +655,43 @@ void dbg_dump_lprops(struct ubifs_info *c)
647 } 655 }
648} 656}
649 657
658void 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
650void dbg_dump_leb(const struct ubifs_info *c, int lnum) 695void dbg_dump_leb(const struct ubifs_info *c, int lnum)
651{ 696{
652 struct ubifs_scan_leb *sleb; 697 struct ubifs_scan_leb *sleb;