UBIFS: unlink failure

Richard Weinberger richard at nod.at
Tue Jun 12 17:56:35 EDT 2012


Hi!

While testing UBI fastmap I encountered a problem.
After multiple writes unlink fails.

This is my test case:
---cut---
function do_mount_write1()
{
        ubiattach -m 0 /dev/ubi_ctrl
        mount /dev/ubi0_0 /mnt/ -t ubifs
        dd if=/dev/urandom of=/mnt/x bs=1M count=1
        dd if=/dev/urandom of=/mnt/x bs=1M count=2
        dd if=/dev/urandom of=/mnt/x bs=1M count=10
        dd if=/dev/urandom of=/mnt/x bs=1M count=30
        rm x
        umount /mnt
        ubidetach -m 0 /dev/ubi_ctrl
}

flash_eraseall /dev/mtd0

ubiattach -m 0 /dev/ubi_ctrl
ubimkvol -N test -s 100MiB /dev/ubi0
mkfs.ubifs /dev/ubi0_0
ubidetach -m 0 /dev/ubi_ctrl

do_mount_write1
---cut---

rm does newfstatat() and unlinkat(), both fail with ENOENT.
The issue is 100% reproducible on a current kernel (3.4)
Adding a "sleep 10" before the rm does _not_ help.

Thanks,
//richard




More information about the linux-mtd mailing list