Looks like a UBIFS bug...

Iwo Mergler iwo at call-direct.com.au
Wed Dec 2 23:22:03 EST 2009


Hi all,

I've got some weird UBIFS-related behaviour. I'd welcome
any suggestions.

This is an ARM927-based embedded system with NAND FLASH,
Kernel 2.6.32-rc8 with a custom MTD NAND driver.

While attempting to write a file to a UBIFS volume, UBIFS claims 

UBIFS error (pid 866): check_lpt_type: invalid type (15) in LPT node type 0

followed by "cannot reserve n bytes" messages every second or so.
After this point the fs is read-only.

I don't know how to trigger it reliably, but while experimenting
with different mtd partition sizes and debug levels, I was able
to catch it with debug level 2 enabled. The full log is attached.

I tried to cut the problem down, disabling unrelated volumes and
reducing the MTD partition size, but in that configuration I was
not able to trigger the problem with UBIFS debug enabled. That is,
enabling debug made the problem go away.

Thus, the log shows two UBIFS partitions. /opt is the one with
the problem:

ubi0:usrl                65.2M     20.0k     61.8M   0% /usr/local
ubi1:opt                109.0M      1.6M    102.6M   2% /opt

Basically, starting from a fully erased MTD partition, I run

ubiattach /dev/ubi_ctrl -m 6
ubimkvol /dev/ubi1 -N opt -m
mount -t ubifs ubi1:opt /opt

After that I get the system to write a file into /opt. This is
data streamed over Ethernet, so write units are probably odd sized
blocks. I don't know if this is significant, but I wasn't able
to trigger the problem any other way (e.g. dd if=/dev/urandom, or
copying the exact same file via cp).


Kind regards,

Iwo




More information about the linux-mtd mailing list