JFFS2: Eep. No valid nodes for ino #1

Todd Poynor tpoynor at mvista.com
Tue Jan 18 18:16:58 EST 2005


jffs2_get_inode_nodes() recently started to print:

# flash_eraseall /dev/mtd2
# mount -t jffs2 /dev/mtdblock2 /mnt
Eep. No valid nodes for ino #1

The old code printed that message if !f->inocache->nodes while the new
code will also print it if !f->inocache->nodes->next_in_ino (the entry
points back to the inode cache).  Hazarding a guess that the new check
is valid for all cases except when creating inode #1 for a new fs (for
which there are no data nodes).  If yet another special check for
inode #1 is needed then here's a suggested patch:

===== fs/jffs2/nodelist.c 1.15 vs edited =====
--- 1.15/fs/jffs2/nodelist.c	2004-12-13 03:33:34 -08:00
+++ edited/fs/jffs2/nodelist.c	2005-01-18 13:31:19 -08:00
@@ -127,7 +127,7 @@
 
 	valid_ref = jffs2_first_valid_node(f->inocache->nodes);
 
-	if (!valid_ref)
+	if (!valid_ref && (f->inocache->ino != 1))
 		printk(KERN_WARNING "Eep. No valid nodes for ino #%u\n", f->inocache->ino);
 
 	while (valid_ref) {


-- 
Todd




More information about the linux-mtd mailing list