Commit 39243508 authored by Artem B. Bityutskiy's avatar Artem B. Bityutskiy Committed by Thomas Gleixner

[JFFS2] Debug code clean up - step 6

Remove extra noisy debugs
Signed-off-by: default avatarArtem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 1e0da3cb
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* For licensing information, see the file 'LICENCE' in this directory. * For licensing information, see the file 'LICENCE' in this directory.
* *
* $Id: debug.h,v 1.8 2005/07/31 09:08:38 dedekind Exp $ * $Id: debug.h,v 1.10 2005/08/02 10:03:51 dedekind Exp $
* *
*/ */
#ifndef _JFFS2_DEBUG_H_ #ifndef _JFFS2_DEBUG_H_
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* For licensing information, see the file 'LICENCE' in this directory. * For licensing information, see the file 'LICENCE' in this directory.
* *
* $Id: nodelist.c,v 1.104 2005/08/01 12:05:19 dedekind Exp $ * $Id: nodelist.c,v 1.107 2005/08/03 09:26:46 dedekind Exp $
* *
*/ */
...@@ -60,7 +60,6 @@ void jffs2_truncate_fragtree(struct jffs2_sb_info *c, struct rb_root *list, uint ...@@ -60,7 +60,6 @@ void jffs2_truncate_fragtree(struct jffs2_sb_info *c, struct rb_root *list, uint
/* We know frag->ofs <= size. That's what lookup does for us */ /* We know frag->ofs <= size. That's what lookup does for us */
if (frag && frag->ofs != size) { if (frag && frag->ofs != size) {
if (frag->ofs+frag->size > size) { if (frag->ofs+frag->size > size) {
JFFS2_DBG_FRAGTREE2("truncating frag 0x%08x-0x%08x\n", frag->ofs, frag->ofs+frag->size);
frag->size = size - frag->ofs; frag->size = size - frag->ofs;
} }
frag = frag_next(frag); frag = frag_next(frag);
...@@ -68,7 +67,6 @@ void jffs2_truncate_fragtree(struct jffs2_sb_info *c, struct rb_root *list, uint ...@@ -68,7 +67,6 @@ void jffs2_truncate_fragtree(struct jffs2_sb_info *c, struct rb_root *list, uint
while (frag && frag->ofs >= size) { while (frag && frag->ofs >= size) {
struct jffs2_node_frag *next = frag_next(frag); struct jffs2_node_frag *next = frag_next(frag);
JFFS2_DBG_FRAGTREE("removing frag 0x%08x-0x%08x\n", frag->ofs, frag->ofs+frag->size);
frag_erase(frag, list); frag_erase(frag, list);
jffs2_obsolete_node_frag(c, frag); jffs2_obsolete_node_frag(c, frag);
frag = next; frag = next;
...@@ -120,7 +118,6 @@ static void jffs2_fragtree_insert(struct jffs2_node_frag *newfrag, struct jffs2_ ...@@ -120,7 +118,6 @@ static void jffs2_fragtree_insert(struct jffs2_node_frag *newfrag, struct jffs2_
parent = *link; parent = *link;
base = rb_entry(parent, struct jffs2_node_frag, rb); base = rb_entry(parent, struct jffs2_node_frag, rb);
JFFS2_DBG_FRAGTREE2("considering frag at 0x%08x\n", base->ofs);
if (newfrag->ofs > base->ofs) if (newfrag->ofs > base->ofs)
link = &base->rb.rb_right; link = &base->rb.rb_right;
else if (newfrag->ofs < base->ofs) 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,11 +172,11 @@ static int no_overlapping_node(struct jffs2_sb_info *c, struct rb_root *root,
/* By definition, the 'this' node has no right-hand child, /* By definition, the 'this' node has no right-hand child,
because there are no frags with offset greater than it. because there are no frags with offset greater than it.
So that's where we want to put the hole */ So that's where we want to put the hole */
JFFS2_DBG_FRAGTREE2("add hole frag %u-%u on the right of the new frag.\n", JFFS2_DBG_FRAGTREE2("add hole frag %#04x-%#04x on the right of the new frag.\n",
holefrag->ofs, holefrag->ofs + holefrag->size); holefrag->ofs, holefrag->ofs + holefrag->size);
rb_link_node(&holefrag->rb, &this->rb, &this->rb.rb_right); rb_link_node(&holefrag->rb, &this->rb, &this->rb.rb_right);
} else { } else {
JFFS2_DBG_FRAGTREE2("Add hole frag %u-%u to the root of the tree.\n", JFFS2_DBG_FRAGTREE2("Add hole frag %#04x-%#04x to the root of the tree.\n",
holefrag->ofs, holefrag->ofs + holefrag->size); holefrag->ofs, holefrag->ofs + holefrag->size);
rb_link_node(&holefrag->rb, NULL, &root->rb_node); rb_link_node(&holefrag->rb, NULL, &root->rb_node);
} }
...@@ -475,7 +472,7 @@ static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info ...@@ -475,7 +472,7 @@ static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info
#endif #endif
if (crc != tn->data_crc) { if (crc != tn->data_crc) {
JFFS2_NOTICE("drong data CRC in data node at 0x%08x: read %#08x, calculated %#08x.\n", JFFS2_NOTICE("wrong data CRC in data node at 0x%08x: read %#08x, calculated %#08x.\n",
ofs, tn->data_crc, crc); ofs, tn->data_crc, crc);
return 1; return 1;
} }
...@@ -522,9 +519,8 @@ static inline int check_node(struct jffs2_sb_info *c, struct jffs2_inode_info *f ...@@ -522,9 +519,8 @@ static inline int check_node(struct jffs2_sb_info *c, struct jffs2_inode_info *f
if (ref_flags(tn->fn->raw) != REF_UNCHECKED) if (ref_flags(tn->fn->raw) != REF_UNCHECKED)
return 0; return 0;
JFFS2_DBG_FRAGTREE2("check node %u-%u, phys offs %#08x.\n", JFFS2_DBG_FRAGTREE2("check node %#04x-%#04x, phys offs %#08x.\n",
tn->fn->ofs, tn->fn->ofs + tn->fn->size, tn->fn->ofs, tn->fn->ofs + tn->fn->size, ref_offset(tn->fn->raw));
ref_offset(tn->fn->raw));
ret = check_node_data(c, tn); ret = check_node_data(c, tn);
if (unlikely(ret < 0)) { if (unlikely(ret < 0)) {
...@@ -643,7 +639,7 @@ int jffs2_add_older_frag_to_fragtree(struct jffs2_sb_info *c, struct jffs2_inode ...@@ -643,7 +639,7 @@ int jffs2_add_older_frag_to_fragtree(struct jffs2_sb_info *c, struct jffs2_inode
int err, checked = 0; int err, checked = 0;
int ref_flag; int ref_flag;
JFFS2_DBG_FRAGTREE("insert fragment %#04x-%#04x\n", fn_ofs, fn_ofs + fn_size); JFFS2_DBG_FRAGTREE("insert fragment %#04x-%#04x, ver %u\n", fn_ofs, fn_ofs + fn_size, tn->version);
/* Skip all the nodes which are completed before this one starts */ /* Skip all the nodes which are completed before this one starts */
this = jffs2_lookup_node_frag(root, fn_ofs); 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,22 +971,14 @@ struct jffs2_node_frag *jffs2_lookup_node_frag(struct rb_root *fragtree, uint32_
while(next) { while(next) {
frag = rb_entry(next, struct jffs2_node_frag, rb); frag = rb_entry(next, struct jffs2_node_frag, rb);
JFFS2_DBG_FRAGTREE2("considering frag %#04x-%#04x (%p). left %p, right %p\n",
frag->ofs, frag->ofs+frag->size, frag, frag->rb.rb_left, frag->rb.rb_right);
if (frag->ofs + frag->size <= offset) { if (frag->ofs + frag->size <= offset) {
JFFS2_DBG_FRAGTREE2("going right from frag %#04x-%#04x, before the region we care about\n",
frag->ofs, frag->ofs+frag->size);
/* Remember the closest smaller match on the way down */ /* Remember the closest smaller match on the way down */
if (!prev || frag->ofs > prev->ofs) if (!prev || frag->ofs > prev->ofs)
prev = frag; prev = frag;
next = frag->rb.rb_right; next = frag->rb.rb_right;
} else if (frag->ofs > offset) { } else if (frag->ofs > offset) {
JFFS2_DBG_FRAGTREE2("going left from frag %#04x-%#04x, after the region we care about\n",
frag->ofs, frag->ofs+frag->size);
next = frag->rb.rb_left; next = frag->rb.rb_left;
} else { } else {
JFFS2_DBG_FRAGTREE2("returning frag %#04x-%#04x, matched\n",
frag->ofs, frag->ofs+frag->size);
return frag; return frag;
} }
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* For licensing information, see the file 'LICENCE' in this directory. * For licensing information, see the file 'LICENCE' in this directory.
* *
* $Id: readinode.c,v 1.135 2005/08/01 12:05:19 dedekind Exp $ * $Id: readinode.c,v 1.137 2005/08/03 09:26:46 dedekind Exp $
* *
*/ */
...@@ -278,10 +278,11 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref ...@@ -278,10 +278,11 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
/* If we actually calculated the whole data CRC /* If we actually calculated the whole data CRC
* and it is wrong, drop the node. */ * and it is wrong, drop the node. */
if (unlikely(tn->partial_crc if (len == csize && unlikely(tn->partial_crc != je32_to_cpu(rd->data_crc))) {
!= je32_to_cpu(rd->data_crc)) && JFFS2_NOTICE("wrong data CRC in data node at 0x%08x: read %#08x, calculated %#08x.\n",
len == csize) ref_offset(ref), tn->partial_crc, je32_to_cpu(rd->data_crc));
goto free_out; goto free_out;
}
} else if (csize == 0) { } else if (csize == 0) {
/* /*
...@@ -521,10 +522,8 @@ static int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_inf ...@@ -521,10 +522,8 @@ static int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_inf
bufstart = buf + (ref_offset(ref) % c->wbuf_pagesize); bufstart = buf + (ref_offset(ref) % c->wbuf_pagesize);
/* We will read either one wbuf or 2 wbufs. */ /* We will read either one wbuf or 2 wbufs. */
len = c->wbuf_pagesize - (bufstart - buf); len = c->wbuf_pagesize - (bufstart - buf);
if (JFFS2_MIN_NODE_HEADER + if (JFFS2_MIN_NODE_HEADER + (int)(bufstart - buf) > c->wbuf_pagesize) {
(int)(bufstart - buf) > c->wbuf_pagesize) { /* The header spans the border of the first wbuf */
/* The header spans the border of the
* first wbuf */
len += c->wbuf_pagesize; len += c->wbuf_pagesize;
} }
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment