aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/nodelist.c
diff options
context:
space:
mode:
authorArtem B. Bityutskiy <dedekind@infradead.org>2005-08-03 05:26:50 -0400
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 12:33:09 -0500
commit392435081e8cc6e02bdc4fa998050abb11d331b4 (patch)
treeccc592e8d993d8df4285832a41f2a06bac53f979 /fs/jffs2/nodelist.c
parent1e0da3cb6cd4a909c64c870344183185bd6815b1 (diff)
[JFFS2] Debug code clean up - step 6
Remove extra noisy debugs Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/nodelist.c')
-rw-r--r--fs/jffs2/nodelist.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c
index 390ce06ab1a7..007d52f394dd 100644
--- a/fs/jffs2/nodelist.c
+++ b/fs/jffs2/nodelist.c
@@ -7,7 +7,7 @@
7 * 7 *
8 * For licensing information, see the file 'LICENCE' in this directory. 8 * For licensing information, see the file 'LICENCE' in this directory.
9 * 9 *
10 * $Id: nodelist.c,v 1.104 2005/08/01 12:05:19 dedekind Exp $ 10 * $Id: nodelist.c,v 1.107 2005/08/03 09:26:46 dedekind Exp $
11 * 11 *
12 */ 12 */
13 13
@@ -60,7 +60,6 @@ void jffs2_truncate_fragtree(struct jffs2_sb_info *c, struct rb_root *list, uint
60 /* We know frag->ofs <= size. That's what lookup does for us */ 60 /* We know frag->ofs <= size. That's what lookup does for us */
61 if (frag && frag->ofs != size) { 61 if (frag && frag->ofs != size) {
62 if (frag->ofs+frag->size > size) { 62 if (frag->ofs+frag->size > size) {
63 JFFS2_DBG_FRAGTREE2("truncating frag 0x%08x-0x%08x\n", frag->ofs, frag->ofs+frag->size);
64 frag->size = size - frag->ofs; 63 frag->size = size - frag->ofs;
65 } 64 }
66 frag = frag_next(frag); 65 frag = frag_next(frag);
@@ -68,7 +67,6 @@ void jffs2_truncate_fragtree(struct jffs2_sb_info *c, struct rb_root *list, uint
68 while (frag && frag->ofs >= size) { 67 while (frag && frag->ofs >= size) {
69 struct jffs2_node_frag *next = frag_next(frag); 68 struct jffs2_node_frag *next = frag_next(frag);
70 69
71 JFFS2_DBG_FRAGTREE("removing frag 0x%08x-0x%08x\n", frag->ofs, frag->ofs+frag->size);
72 frag_erase(frag, list); 70 frag_erase(frag, list);
73 jffs2_obsolete_node_frag(c, frag); 71 jffs2_obsolete_node_frag(c, frag);
74 frag = next; 72 frag = next;
@@ -120,7 +118,6 @@ static void jffs2_fragtree_insert(struct jffs2_node_frag *newfrag, struct jffs2_
120 parent = *link; 118 parent = *link;
121 base = rb_entry(parent, struct jffs2_node_frag, rb); 119 base = rb_entry(parent, struct jffs2_node_frag, rb);
122 120
123 JFFS2_DBG_FRAGTREE2("considering frag at 0x%08x\n", base->ofs);
124 if (newfrag->ofs > base->ofs) 121 if (newfrag->ofs > base->ofs)
125 link = &base->rb.rb_right; 122 link = &base->rb.rb_right;
126 else if (newfrag->ofs < base->ofs) 123 else if (newfrag->ofs < base->ofs)
@@ -175,11 +172,11 @@ static int no_overlapping_node(struct jffs2_sb_info *c, struct rb_root *root,
175 /* By definition, the 'this' node has no right-hand child, 172 /* By definition, the 'this' node has no right-hand child,
176 because there are no frags with offset greater than it. 173 because there are no frags with offset greater than it.
177 So that's where we want to put the hole */ 174 So that's where we want to put the hole */
178 JFFS2_DBG_FRAGTREE2("add hole frag %u-%u on the right of the new frag.\n", 175 JFFS2_DBG_FRAGTREE2("add hole frag %#04x-%#04x on the right of the new frag.\n",
179 holefrag->ofs, holefrag->ofs + holefrag->size); 176 holefrag->ofs, holefrag->ofs + holefrag->size);
180 rb_link_node(&holefrag->rb, &this->rb, &this->rb.rb_right); 177 rb_link_node(&holefrag->rb, &this->rb, &this->rb.rb_right);
181 } else { 178 } else {
182 JFFS2_DBG_FRAGTREE2("Add hole frag %u-%u to the root of the tree.\n", 179 JFFS2_DBG_FRAGTREE2("Add hole frag %#04x-%#04x to the root of the tree.\n",
183 holefrag->ofs, holefrag->ofs + holefrag->size); 180 holefrag->ofs, holefrag->ofs + holefrag->size);
184 rb_link_node(&holefrag->rb, NULL, &root->rb_node); 181 rb_link_node(&holefrag->rb, NULL, &root->rb_node);
185 } 182 }
@@ -475,7 +472,7 @@ static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info
475#endif 472#endif
476 473
477 if (crc != tn->data_crc) { 474 if (crc != tn->data_crc) {
478 JFFS2_NOTICE("drong data CRC in data node at 0x%08x: read %#08x, calculated %#08x.\n", 475 JFFS2_NOTICE("wrong data CRC in data node at 0x%08x: read %#08x, calculated %#08x.\n",
479 ofs, tn->data_crc, crc); 476 ofs, tn->data_crc, crc);
480 return 1; 477 return 1;
481 } 478 }
@@ -522,9 +519,8 @@ static inline int check_node(struct jffs2_sb_info *c, struct jffs2_inode_info *f
522 if (ref_flags(tn->fn->raw) != REF_UNCHECKED) 519 if (ref_flags(tn->fn->raw) != REF_UNCHECKED)
523 return 0; 520 return 0;
524 521
525 JFFS2_DBG_FRAGTREE2("check node %u-%u, phys offs %#08x.\n", 522 JFFS2_DBG_FRAGTREE2("check node %#04x-%#04x, phys offs %#08x.\n",
526 tn->fn->ofs, tn->fn->ofs + tn->fn->size, 523 tn->fn->ofs, tn->fn->ofs + tn->fn->size, ref_offset(tn->fn->raw));
527 ref_offset(tn->fn->raw));
528 524
529 ret = check_node_data(c, tn); 525 ret = check_node_data(c, tn);
530 if (unlikely(ret < 0)) { 526 if (unlikely(ret < 0)) {
@@ -643,7 +639,7 @@ int jffs2_add_older_frag_to_fragtree(struct jffs2_sb_info *c, struct jffs2_inode
643 int err, checked = 0; 639 int err, checked = 0;
644 int ref_flag; 640 int ref_flag;
645 641
646 JFFS2_DBG_FRAGTREE("insert fragment %#04x-%#04x\n", fn_ofs, fn_ofs + fn_size); 642 JFFS2_DBG_FRAGTREE("insert fragment %#04x-%#04x, ver %u\n", fn_ofs, fn_ofs + fn_size, tn->version);
647 643
648 /* Skip all the nodes which are completed before this one starts */ 644 /* Skip all the nodes which are completed before this one starts */
649 this = jffs2_lookup_node_frag(root, fn_ofs); 645 this = jffs2_lookup_node_frag(root, fn_ofs);
@@ -975,22 +971,14 @@ struct jffs2_node_frag *jffs2_lookup_node_frag(struct rb_root *fragtree, uint32_
975 while(next) { 971 while(next) {
976 frag = rb_entry(next, struct jffs2_node_frag, rb); 972 frag = rb_entry(next, struct jffs2_node_frag, rb);
977 973
978 JFFS2_DBG_FRAGTREE2("considering frag %#04x-%#04x (%p). left %p, right %p\n",
979 frag->ofs, frag->ofs+frag->size, frag, frag->rb.rb_left, frag->rb.rb_right);
980 if (frag->ofs + frag->size <= offset) { 974 if (frag->ofs + frag->size <= offset) {
981 JFFS2_DBG_FRAGTREE2("going right from frag %#04x-%#04x, before the region we care about\n",
982 frag->ofs, frag->ofs+frag->size);
983 /* Remember the closest smaller match on the way down */ 975 /* Remember the closest smaller match on the way down */
984 if (!prev || frag->ofs > prev->ofs) 976 if (!prev || frag->ofs > prev->ofs)
985 prev = frag; 977 prev = frag;
986 next = frag->rb.rb_right; 978 next = frag->rb.rb_right;
987 } else if (frag->ofs > offset) { 979 } else if (frag->ofs > offset) {
988 JFFS2_DBG_FRAGTREE2("going left from frag %#04x-%#04x, after the region we care about\n",
989 frag->ofs, frag->ofs+frag->size);
990 next = frag->rb.rb_left; 980 next = frag->rb.rb_left;
991 } else { 981 } else {
992 JFFS2_DBG_FRAGTREE2("returning frag %#04x-%#04x, matched\n",
993 frag->ofs, frag->ofs+frag->size);
994 return frag; 982 return frag;
995 } 983 }
996 } 984 }