jffs2 filesystem/flash data integrity

Manoj manoj23 at gmail.com
Sat Apr 18 22:55:26 EDT 2009


Hi,

I have a jffs2 filesystem on NAND flash. After mounting the jffs2 fs,
I create a 2MB file and make a copy of it using "cp" command. When I
do a "diff" between two files, the files are same. Now, I unmount the
fs and re-mount it. When I do a "diff" between the two files, they
differ. Looking at the difference, I see that around 4K of data in one
file has 0s in it. This 4K hole can be anywhere in the file.  There is
no issue with a 1MB file.

I use the following command to mount:
mount -t jffs2 -osync /dev/mtdb-boot2 /mnt/jff

The NAND page size is 512 bytes and block size if 16K.

What could be going wrong? I have also tried doing a "sync" after
creating the second file. Is this a driver issue?

Any hints appreciated.
Please cc me in the reply as I am not subscribed.

Thanks.



More information about the linux-mtd mailing list