UBIFS volume corruption (bad node at LEB 0:0)

David Bergeron mho.linux-mtd at b2n.ca
Tue Jan 20 00:40:43 EST 2009


On 2009-01-19, at 22:44, David Bergeron wrote:
> - There is little time between the file becoming unreferenced and the
> filesystem becoming read-only

> Now clearly nothing is executed or left open for a long time in the
> nandsim + rsync based test, I guess the remount w/sync flag is helping
> get the edge case. Try to add the "--delay-updates" option to rsync to
> have unlinking rushed at the end. Maybe the slower arm hardware (cm-
> x270) I'm using is more prone to this.


I was mistaken here, timing doesn't seem to matter. I added plenty of  
syncs and sleeps.

rsync ...
sync; sync; sleep 4; sync;
exec /bin/sh -xc "lsof; sync; sleep 2; mount -o remount, ro /;
     sync; sleep 2; lsof; reboot -df;"

The deleted shell script is listed by the first lsof but not in the  
second.

right before rebooting fs usage boils down to this:

sh          1 root  cwd       DIR  253,1    1520    1 /
sh          1 root  rtd       DIR  253,1    1520    1 /
sh          1 root  txt       REG  253,1   88220 1113 /bin/dash
sh          1 root  mem       REG  253,1  121636 1685 /lib/ld-2.7.so
sh          1 root  mem       REG  253,1 1168924 1693 /lib/libc-2.7.so
sh          1 root    0u      CHR    5,1           96 /dev/console

It just seems like as soon as rsync changes an opened file, I loose  
the filesystem.

-david




More information about the linux-mtd mailing list