mtd/fs/jffs2 readinode.c,1.84,1.85

David Woodhouse dwmw2 at infradead.org
Tue Sep 3 19:07:15 EDT 2002


Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv791

Modified Files:
	readinode.c 
Log Message:
more debugging


Index: readinode.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/readinode.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- readinode.c	3 Sep 2002 22:35:09 -0000	1.84
+++ readinode.c	3 Sep 2002 23:07:12 -0000	1.85
@@ -217,13 +217,18 @@
 	} else {
 		/* New frag starts at the same point as 'this' used to. Replace 
 		   it in the tree without doing a delete and insertion */
-		D1(printk(KERN_DEBUG "Inserting newfrag (*%p) in before 'this' (*%p)\n", newfrag, this));
+		D1(printk(KERN_DEBUG "Inserting newfrag (*%p),%d-%d in before 'this' (*%p),%d-%d\n",
+			  newfrag, newfrag->ofs, newfrag->ofs+newfrag->size,
+			  this, this->ofs, this->ofs+this->size));
 	
 		rb_replace_node(&this->rb, &newfrag->rb);
+		printk("After rb_replace_node:\n");
+		jffs2_print_fragtree(list, 1);
 
-		if (newfrag->ofs + newfrag->size >= this->ofs+this->size)
+		if (newfrag->ofs + newfrag->size >= this->ofs+this->size) {
+			D1(printk("Obsoleting node frag %p (%x-%x)\n", this, this->ofs, this->ofs+this->size));
 			jffs2_obsolete_node_frag(c, this);
-		else {
+		} else {
 			this->ofs += newfrag->size;
 			this->size -= newfrag->size;
 			printk("before inserting new shrunk frag %d-%d:\n", this->ofs, this->ofs+this->size);
@@ -240,6 +245,7 @@
 	*/
 	while ((this = frag_next(newfrag)) && newfrag->ofs + newfrag->size >= this->ofs + this->size) {
 		/* 'this' frag is obsoleted completely. */
+		D1(printk("Obsoleting node frag %p (%x-%x) and removing from tree\n", this, this->ofs, this->ofs+this->size));
 		rb_erase(&this->rb, list);
 		jffs2_obsolete_node_frag(c, this);
 	}





More information about the linux-mtd-cvs mailing list