[Yaffs] data blocks lost between unmount and mount

Blair Barnett bbarnett at circumnavnetworks.com
Tue Oct 4 16:51:19 BST 2005


Hi,


We've a strange problem here with YAFFS2 on a 2K NAND Chip:
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB
3,3V 8-bit)

I'm using YAFFS2 code from August 15 CVS pull with a mtd-20050710
snapshot back ported to 2.4.27. Everything seems to work great except
for this issue I'm about to describe.

The system has four partitions on the NAND (kernel image, root,
application, spare). After booting up and mounting root, application and
the spare partition, I create a file in the spare partition. Size
doesn't matter in this case. :-) A df command reveals that indeed some
blocks have been allocated to this file and all is well. Now if I remove
the file, a df command shows that indeed the blocks have been returned
to the free list (I know this is not exactly the case as the blocks have
all been "soft deleted" and waiting for GC). Now if I create another
file, the aforementioned blocks get GC'ed and df again shows that all is
right with the file system. If, however, I remove a file, then unmount
the file system, then mount it, df shows that the blocks the were "soft
deleted" are now marked as used (never to be returned to the free list,
as far as my tests show).

My question is shouldn't the unmount or mount code path cause GC to run
and return these "soft deleted" blocks back to the free list?

Am I missing something? This unmount/mount block lost is filling our
application file system nightly.

Thanks in advance for any insight provided.

-blair




More information about the yaffs mailing list