UBIFS failure & stable page writes

Mats Kärrman Mats.Karrman at tritech.se
Sat Jun 15 18:25:32 EDT 2013


Those patches are not in my source.
// Mats

________________________________________
From: Prins Anton (ST-CO/ENG1.1) [Anton.Prins at nl.bosch.com]
Sent: Thursday, June 13, 2013 3:31 PM
To: Mats Kärrman; Adrian Hunter
Cc: linux-mtd at lists.infradead.org; dedekind1 at gmail.com
Subject: RE: UBIFS failure & stable page writes

We decided not to patch for this weekend, but onlty make an additional logging in UBIFS:

diff -purN a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c
--- a/fs/ubifs/orphan.c 2013-06-13 12:19:58.490931170 +0200
+++ b/fs/ubifs/orphan.c 2013-06-13 12:17:13.014931462 +0200
@@ -300,6 +300,9 @@ static int write_orph_node(struct ubifs_
        for (i = 0; i < cnt; i++) {
                orphan = cnext;
                orph->inos[i] = cpu_to_le64(orphan->inum);
+               if (orph->inos[i] < UBIFS_FIRST_INO) {
+                       printk(KERN_ERR "ERROR: Wrong ino in orphan list[%lu]: %lu\n", (unsigned long)i, (unsigned long)orph->inos[i]);
+               }
                cnext = orphan->cnext;
                orphan->cnext = NULL;
        }

This to make sure if UBIFS itself writes a node '0' or '1'... and it is forced by UBI, NAND, Peripheral or NAND-Device.
If there is a relation between logging and failing after reboot it would make sense... Means a lot of analyzing; but we have to find it!

Next step is to apply patches and to test again:
http://git.infradead.org/ubifs-2.6.git/commit/8afd500cb52a5d00bab4525dd5a560d199f979b9
http://git.infradead.org/ubifs-2.6.git/commit/2928f0d0c5ebd6c9605c0d98207a44376387c298

And hopefully we get rid of some unexpected orphan nodes.

How realistic is it that the double orphan free causes our problem?
Mats, are you sure the patches mentioned above are also not in your UBIFS?




More information about the linux-mtd mailing list