Author: Nick Thompson Date: To: yaffs Subject: [Yaffs] yaffs erases all files on mount
yaffs [master] snapshot from today, linux 2.6.33-rc4
I have patched my kernel with yaffs for testing.
I did:
flash_eraseall /dev/mtd3
mount -t yaffs /dev/mtdblock3 /mnt/nand
cd /mnt/nand
touch test
cd ..
umount nand
mount -t yaffs /dev/mtdblock3 /mnt/nand
cd nand
ls showed no files (except for lost+found). I turned on logging of erase
blocks (YAFFS_TRACE_ERASE) and dmesg showed the following:
yaffs: dev is 32505859 name is "mtdblock3" rw
yaffs: passed flags ""
yaffs: yaffs: Attempting MTD mount of 31.3,"mtdblock3"
yaffs: auto selecting yaffs2
yaffs: block 2255 is bad
yaffs: block 2572 is bad
yaffs: block 2574 is bad
yaffs: block 3387 is bad
yaffs: block 3843 is bad
yaffs: block 3845 is bad
yaffs: block 4033 is bad
yaffs: yaffs_read_super: is_checkpointed 0
yaffs: dev is 32505859 name is "mtdblock3" rw
yaffs: passed flags ""
yaffs: yaffs: Attempting MTD mount of 31.3,"mtdblock3"
yaffs: auto selecting yaffs2
yaffs: block 2255 is bad
yaffs: block 2572 is bad
yaffs: block 2574 is bad
yaffs: block 3387 is bad
yaffs: block 3843 is bad
yaffs: block 3845 is bad
yaffs: block 4033 is bad
yaffs: yaffs_read_super: is_checkpointed 0
yaffs: yaffs_block_became_dirty block 1 state 8
yaffs: Erased block 1
Obviously it didn't like the fist block, which I assumed had my file in
it, and decided to erase it.
What else should I log to try and figure out what is going on? jffs2 on
the same partition passes this same test, so I believe the NAND is work
okay.