[Yaffs] YAFFS2 on Simulated NAND

Charles Manning manningc2 at actrix.gen.nz
Mon May 8 10:02:07 BST 2006


On Friday 28 April 2006 08:03, Ross Stutterheim wrote:
> I'm attempting to get a YAFFS2 filesystem to work on a NAND that I am
> simulating in QEMU using the NAND simulator code in the mainline kernel.
>
> I can mount my simulated NAND device (via its MTD block device) without any
> errors ($ mount -t yaffs2 /dev/mtdblock0 /mnt/yfs).  I can create files and
> everything seems to be working well.  I can put debugging printk()s in the
> source for nandsim.c and see that the write and read functions are in fact
> getting called and returning successfully.  I also have MTD debugging
> tunred on (level 3) and its output seems to looks okay to me.  Everything
> seems fine.
>
> However, when I unmount the filesystem and then mount it again, nothing
> resides in the filesystem except lost+found.
>
> This happens both when I:
>   1.) Mount the filesystem without doing any kind of formatting to the
> partition (simulated NAND) before mounting it, unmount, and then remount
>   2.) When I run mkyaffs2 (modified version of mkyaffs for LP NANDs) with
> no image to write and then mount the filesystem, umount, and remount
>
> I am not shutting down the QEMU emulator between mounts, because everything
> would obviously go away then (simulated NAND is in RAM).
>
> Has anyone experienced this before and/or would be willing to offer
> suggestions?

I suggest turning on all tracing (set yaffs_traceMask to 0xffffffff and seeing 
what happens when you write a few files, umount and remount.

I suspect that it is some wonkiness in the oob accessing.

-- Charles



More information about the yaffs mailing list