jffs2: False report of "No space left on device"

Stern, Eli eli.stern at intel.com
Mon Mar 5 09:58:31 EST 2012


Hi,

I came across a scenario that reaches "No space left on device". 
IMHO this is a false conclusion, since after reboot there is plenty of space.

This is the setup:
- Kernel 2.6.39.2
- ARM 11
# cat /proc/mtd | grep nvram
mtd8: 00040000 00001000 "nvram"
# mount | grep nvram
/dev/mtdblock8 on /nvram type jffs2 (rw)
- The "nvram" device is quite empty. 
    I managed to copy 8 zipped files of size ~11Kbytes (compressed) before the 
    filesystem complained that it is full. (and then removed them. And rebooted.)

this is the test:
# ### Start at 13:20:40
# while [ 1 ] ; do echo 0 > /nvram/eli/full/b; echo 1 > /nvram/eli/full/b; done
Newly-erased block contained word 0x2688eeac at offset 0x000295c0
... Some more of these
Newly-erased block contained word 0x2d2ebc71 at offset 0x000265c0
/bin/sh: can't create /nvram/eli/full/b: No space left on device
/bin/sh: can't create /nvram/eli/full/b: No space left on device
/bin/sh: can't create /nvram/eli/full/b: No space left on device
/bin/sh: can't create /nvram/eli/full/b: No space left on device
^C
# ### End at 13:21:09
# echo 0 > /nvram/eli/full/b
/bin/sh: can't create /nvram/eli/full/b: No space left on device

This persists after ~1 Hour.

Everything goes back to normal after Reboot.

I would have expected the garbage collector to kick in and free space, but it seems this does not happen.

Running the same test on a similar board, but with
# cat /proc/mtd |grep nvram
mtd8: 00050000 00010000 "nvram"
#
Produces similar results, but it takes 10 Minutes instead of 30 Seconds.

Running both tests on Kernel 2.6.18 does NOT fail! Ran for several hours.

Can anyone shed some light on this behavior?

Thanx

Eli Stern

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the linux-mtd mailing list