[Yaffs] YAFFS2 Issues

Jeremy Fillingim jfilling@realmsys.com
Mon, 18 Apr 2005 16:10:45 -0600


I misspoke about my kernel Oops, when I unmount after touching a file on
my YAFFS2 partition, it erely gives me a call trace.

I erased my flash partition before executing these commands:

# mount -t yaffs2 /dev/mtdblock4 /mnt/mtdb4
# cat /proc/yaffs 
YAFFS built:Apr 18 2005 14:33:02
$Id: yaffs_fs.c,v 1.2 2005/03/16 04:00:36 charles Exp $
$Id: yaffs_guts.c,v 1.5 2005/03/16 04:00:36 charles Exp $

Device yaffs
startBlock......... 1
endBlock........... 1727
chunkGroupBits..... 1
chunkGroupSize..... 2
nErasedBlocks...... 1723
nTnodesCreated..... 0
nFreeTnodes........ 0
nObjectsCreated.... 100
nFreeObjects....... 96
nFreeChunks........ 110272
nPageWrites........ 0
nPageReads......... 0
nBlockErasures..... 0
nGCCopies.......... 0
garbageCollections. 0
passiveGCs......... 0
nRetriedWrites..... 0
nRetireBlocks...... 0
eccFixed........... 0
eccUnfixed......... 0
tagsEccFixed....... 0
tagsEccUnfixed..... 0
cacheHits.......... 0
nDeletedFiles...... 0
nUnlinkedFiles..... 0
nBackgroudDeletions 0
useNANDECC......... 1
isYaffs2........... 1

I then unmounted the partition without attempting to edit any files,
followed by a remount:

# umount /mnt/mtdb4
# mount -t yaffs2 /dev/mtdblock4 /mnt/mtdb4
# cat /proc/yaffs 
YAFFS built:Apr 18 2005 14:33:02
$Id: yaffs_fs.c,v 1.2 2005/03/16 04:00:36 charles Exp $
$Id: yaffs_guts.c,v 1.5 2005/03/16 04:00:36 charles Exp $

Device yaffs
startBlock......... 1
endBlock........... 1727
chunkGroupBits..... 1
chunkGroupSize..... 2
nErasedBlocks...... 1723
nTnodesCreated..... 0
nFreeTnodes........ 0
nObjectsCreated.... 100
nFreeObjects....... 96
nFreeChunks........ 110272
nPageWrites........ 0
nPageReads......... 0
nBlockErasures..... 0
nGCCopies.......... 0
garbageCollections. 0
passiveGCs......... 0
nRetriedWrites..... 0
nRetireBlocks...... 0
eccFixed........... 0
eccUnfixed......... 0
tagsEccFixed....... 0
tagsEccUnfixed..... 0
cacheHits.......... 0
nDeletedFiles...... 0
nUnlinkedFiles..... 0
nBackgroudDeletions 0
useNANDECC......... 1
isYaffs2........... 1

This is what happens when I touch a file and unmount:

# touch /mnt/mtdb4/file0
# umount /mnt/mtdb4
VFS: Busy inodes after unmount. Self-destruct in 5 seconds.  Have a nice
day...
idr_remove called for id=4 which is not allocated.
Call trace:
 [c00b44e0] idr_remove+0x158/0x1f0
 [c004eac8] kill_anon_super+0x3c/0x6c
 [c004d964] deactivate_super+0xa0/0xd4
 [c0065cf4] __mntput+0x30/0x44
 [c0055798] path_release_on_umount+0x4c/0x60
 [c00665c8] sys_umount+0x2bc/0x2d4
 [c0002a00] ret_from_syscall+0x0/0x48
# mount -t yaffs2 /dev/mtdblock4 /mnt/mtdb4
# cat /proc/yaffs 
YAFFS built:Apr 18 2005 14:33:02
$Id: yaffs_fs.c,v 1.2 2005/03/16 04:00:36 charles Exp $
$Id: yaffs_guts.c,v 1.5 2005/03/16 04:00:36 charles Exp $

Device yaffs
startBlock......... 1
endBlock........... 1727
chunkGroupBits..... 1
chunkGroupSize..... 2
nErasedBlocks...... 1722
nTnodesCreated..... 0
nFreeTnodes........ 0
nObjectsCreated.... 100
nFreeObjects....... 96
nFreeChunks........ 110208
nPageWrites........ 0
nPageReads......... 0
nBlockErasures..... 0
nGCCopies.......... 0
garbageCollections. 0
passiveGCs......... 0
nRetriedWrites..... 0
nRetireBlocks...... 0
eccFixed........... 0
eccUnfixed......... 0
tagsEccFixed....... 0
tagsEccUnfixed..... 0
cacheHits.......... 0
nDeletedFiles...... 0
nUnlinkedFiles..... 0
nBackgroudDeletions 0
useNANDECC......... 1
isYaffs2........... 1

On Tue, Apr 19, 2005 at 09:03:42AM +1200, Charles Manning (manningc2@actrix.gen.nz) wrote:
> Hi Jeremy
> 
> Could you please send me the following:
> 
> * /proc/yaffs of a freshly mounted partition
> * /proc/yaffs of the remounted partiton
> * oops traceback
> 
> Thanx 
> 
> -- charles
> 
> 
> 
> On Tuesday 19 April 2005 08:10, Jeremy Fillingim wrote:
> > Hi guys,
> >
> > I have a custom PPC based system on which I have been running 2.6.10 +
> > board specific changes. The flash part that we are using is a 256MB
> > large page device (2048 page bytes + 64 spare bytes).
> >
> > Up to this point I have been using JFFS2 + Summary support (head of MTD
> > CVS) with a small root partition (32MB) and a second large partition
> > (>200MB). The JFFS2 performance is decent in most cases, but mount times
> > can be terrible.
> >
> > I wanted to evaluate YAFFS2 as a possible replacement for JFFS2, so I
> > pulled the latest YAFFS2 code out of CVS and updated my MTD to the latest
> > CVS. A few minor changes to the Makefile and Kconfig stuff was all that was
> > required to get YAFFS2 compiled.
> >
> > I am able to successfully mount an empty partition, and it "looks" like
> > a write to that partition succeeds. However, when I attempt to unmount the
> > YAFFS2 partition, I get a kernel oops. When I remount the partition,
> > my files do not show up.
> >
> > This is the message that I receive when I unmount after touching a file
> > on the YAFFS2 partition.
> >
> > VFS: Busy inodes after unmount. Self-destruct in 5 seconds.  Have a nice
> > day... idr_remove called for id=4 which is not allocated.
> > Call trace:
> >  [c00b44e0] idr_remove+0x158/0x1f0
> >  [c004eac8] kill_anon_super+0x3c/0x6c
> >  [c004d964] deactivate_super+0xa0/0xd4
> >  [c0065cf4] __mntput+0x30/0x44
> >  [c0055798] path_release_on_umount+0x4c/0x60
> >  [c00665c8] sys_umount+0x2bc/0x2d4
> >  [c0002a00] ret_from_syscall+0x0/0x48
> >
> > I did my MTD and YAFFS2 CVS checkouts on Friday April 15.
> >
> > Thank you in advance for any insight you may have.
> >
> > On Sun, Apr 17, 2005 at 06:23:25PM +0800, zheng wei (jeanwelly@gmail.com) 
> wrote:
> > > I want to use yaffs on 2.6.11, my cpu is 2410.
> > > I am not sure whether I should update the MTD in 2.6.11.
> > > But now I found ECC in mtd can't work correctly on nandflash.
> > > Also I want to use yaffs as a root fs. How can I get started?
> > > Thanks for any idea.
> > >
> > > On 4/17/05, Wookey <wookey@aleph1.co.uk> wrote:
> > > > +++ Sergei Sharonov [05-04-14 10:33 -0500]:
> > > > > Hi,
> > > > >
> > > > > I am working on ARM9/linux2.6.10 based system with a large
> > > > > (256 MByte) NAND storage. Currently the filesystem used is jffs2.
> > > > > Unfortunately the mount time is unacceptably long and I am
> > > > > looking for an alternative. Can anybody comment on status
> > > > > of YAFFS2? Note that version 2 is required since NAND page
> > > > > size is 2 k.
> > > >
> > > > People are using YAFFS2 successfully. I'm not sure if any commercial
> > > > products have actually shipped with it yet, but it is now tested and
> > > > functional.
> > > >
> > > > For best mount-time splitting your flash into more than one partition
> > > > is often smart so you can boot from a small partition and give user
> > > > feedback whilst mounting a larger data partition. Obviously this
> > > > doesn't suit all applications.
> > > >
> > > > We do have a plan for implementing checkpointing for much faster
> > > > booting (under normal circumstances) but this work has not yet been
> > > > sponsored by anyone.
> > > >
> > > > Wookey
> > > > --
> > > > Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK  Tel +44 (0) 1223
> > > > 811679 work: http://www.aleph1.co.uk/     play:
> > > > http://www.chaos.org.uk/~wookey/
> > > >
> > > > _______________________________________________
> > > > yaffs mailing list
> > > > yaffs@stoneboat.aleph1.co.uk
> > > > http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
> > >
> > > --
> > > ---------
> > > jeanwelly
> > > Email:  jeanwelly@gmail.com
> > > China
> > >
> > > _______________________________________________
> > > yaffs mailing list
> > > yaffs@stoneboat.aleph1.co.uk
> > > http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
> >
> > _______________________________________________
> > yaffs mailing list
> > yaffs@stoneboat.aleph1.co.uk
> > http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs