aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2008-04-23 11:43:15 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2008-04-23 11:43:15 -0400
commit2c61cb250cf7e8cdd3b83b79b76d2ea0b3da010a (patch)
treef26338bca0b880f4c21aa6ddea0f5c3d3ef33ff8 /fs
parent422b120238130307da64fa44c9fb722bfaf5f1af (diff)
[JFFS2] Introduce dbg_readinode2 log level, use it to shut read_dnode() up
We haven't seen bugs in this for a while now, since the rewrite. No need to be _quite_ so verbose... Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/jffs2/debug.h6
-rw-r--r--fs/jffs2/readinode.c15
2 files changed, 14 insertions, 7 deletions
diff --git a/fs/jffs2/debug.h b/fs/jffs2/debug.h
index 4130adabd76e..9645275023e6 100644
--- a/fs/jffs2/debug.h
+++ b/fs/jffs2/debug.h
@@ -38,6 +38,7 @@
38 38
39#if CONFIG_JFFS2_FS_DEBUG > 1 39#if CONFIG_JFFS2_FS_DEBUG > 1
40#define JFFS2_DBG_FRAGTREE2_MESSAGES 40#define JFFS2_DBG_FRAGTREE2_MESSAGES
41#define JFFS2_DBG_READINODE2_MESSAGES
41#define JFFS2_DBG_MEMALLOC_MESSAGES 42#define JFFS2_DBG_MEMALLOC_MESSAGES
42#endif 43#endif
43 44
@@ -115,6 +116,11 @@
115#else 116#else
116#define dbg_readinode(fmt, ...) 117#define dbg_readinode(fmt, ...)
117#endif 118#endif
119#ifdef JFFS2_DBG_READINODE2_MESSAGES
120#define dbg_readinode2(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__)
121#else
122#define dbg_readinode2(fmt, ...)
123#endif
118 124
119/* Fragtree build debugging messages */ 125/* Fragtree build debugging messages */
120#ifdef JFFS2_DBG_FRAGTREE_MESSAGES 126#ifdef JFFS2_DBG_FRAGTREE_MESSAGES
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index 8a7cf1e8d68a..4cb4d76de07f 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -825,8 +825,9 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
825 else // normal case... 825 else // normal case...
826 tn->fn->size = je32_to_cpu(rd->dsize); 826 tn->fn->size = je32_to_cpu(rd->dsize);
827 827
828 dbg_readinode("dnode @%08x: ver %u, offset %#04x, dsize %#04x, csize %#04x\n", 828 dbg_readinode2("dnode @%08x: ver %u, offset %#04x, dsize %#04x, csize %#04x\n",
829 ref_offset(ref), je32_to_cpu(rd->version), je32_to_cpu(rd->offset), je32_to_cpu(rd->dsize), csize); 829 ref_offset(ref), je32_to_cpu(rd->version),
830 je32_to_cpu(rd->offset), je32_to_cpu(rd->dsize), csize);
830 831
831 ret = jffs2_add_tn_to_tree(c, rii, tn); 832 ret = jffs2_add_tn_to_tree(c, rii, tn);
832 833
@@ -836,13 +837,13 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
836 jffs2_free_tmp_dnode_info(tn); 837 jffs2_free_tmp_dnode_info(tn);
837 return ret; 838 return ret;
838 } 839 }
839#ifdef JFFS2_DBG_READINODE_MESSAGES 840#ifdef JFFS2_DBG_READINODE2_MESSAGES
840 dbg_readinode("After adding ver %d:\n", je32_to_cpu(rd->version)); 841 dbg_readinode2("After adding ver %d:\n", je32_to_cpu(rd->version));
841 tn = tn_first(&rii->tn_root); 842 tn = tn_first(&rii->tn_root);
842 while (tn) { 843 while (tn) {
843 dbg_readinode("%p: v %d r 0x%x-0x%x ov %d\n", 844 dbg_readinode2("%p: v %d r 0x%x-0x%x ov %d\n",
844 tn, tn->version, tn->fn->ofs, 845 tn, tn->version, tn->fn->ofs,
845 tn->fn->ofs+tn->fn->size, tn->overlapped); 846 tn->fn->ofs+tn->fn->size, tn->overlapped);
846 tn = tn_next(tn); 847 tn = tn_next(tn);
847 } 848 }
848#endif 849#endif