Re: [Yaffs] yaffs erases all files on mount

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Nick Thompson
Date:  
To: yaffs
Subject: Re: [Yaffs] yaffs erases all files on mount
On 13/04/11 11:48, Nick Thompson wrote:
> 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.
>
> Thanks,
> Nick.

Oh and after the first umount the block 1 OOB looks like:

OOB Data: ff ff 21 00 00 00 02 00 00 00 01 00 00 00 00 08
OOB Data: 00 00 2a 00 00 00 01 00 8c 76 51 a2 f0 5d e3 a4
OOB Data: 0f 17 6b b2 b6 01 45 8c fd f8 6f 18 6b b2 b6 01
OOB Data: 45 8c fd f8 6f 18 6b b2 b6 01 45 8c fd f8 6f 18

Nick