[Yaffs] yaffs2 problems

Sergei Sharonov Sergei.Sharonov@Halliburton.com
Tue, 19 Apr 2005 14:00:48 -0500


Hi,

sorry if it is double posted, but I don't see my original post sent=20
through gmane.
-------------------------------------
SW: YAFFS2 built into linux 2.6.10 with recent mtd snapshot
HW: at91rm9200 with 256 MB Samsung NAND
hardware/linux/mtd are likely ok since I can run with
jffs2 for weeks. Flash was erased before mounting yaffs2.

Problems:
1. umount fails with message:
VFS: Busy inodes after unmount. Self-destruct in 5 seconds. =20
Have a nice day...
2. some files disappear after re-mounting
3. (a lot of) segmentation faults
4. df shows garbage

People, has anybody managed to run yaffs2 under linux 2.6.x?
Are there any patches required against tarball from:
http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/cvs_root.tar.gz?tarball=3D1


Sergei Sharonov
-------------------------------------

# mount /mnt/flash/
yaffs: dev is 32505859 name is "(unavailable)"
yaffs: Attempting MTD mount on 31.3, "(unavailable)"
yaffs: yaffs_GutsInitialise()
yaffs: yaffs_GutsInitialise() done.

# cat /proc/yaffs
YAFFS built:Apr 19 2005 13:24:56
$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........... 2047
chunkGroupBits..... 1
chunkGroupSize..... 2
nErasedBlocks...... 2047
nTnodesCreated..... 0
nFreeTnodes........ 0
nObjectsCreated.... 100
nFreeObjects....... 96
nFreeChunks........ 131008
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......... 0
isYaffs2........... 1
#
# df /mnt/flash/
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/mtdblock3           32752    -32559     65312 -98% /mnt/flash
# cp /bin/busybox /mnt/flash/
# ls -l /mnt/flash/
-rwxr-xr-x    1 root     root       135556 Jan  1 00:01 busybox
drw-rw-rw-    1 root     root         2048 Jan  1 00:00 lost+found
# rm /mnt/flash/busybox
# cp /bin/busybox /mnt/flash/
page 65 in gc has no object
Unable to handle kernel paging request at virtual address e1a0c031
pgd =3D c03d8000
[e1a0c031] *pgd=3D00000000
Internal error: Oops: 3 [#1]
Modules linked in:
CPU: 0
PC is at yaffs_FindObjectByNumber+0x54/0x74
LR is at 0xc02e7bfc
pc : [<c00def48>]    lr : [<c02e7bfc>]    Not tainted
sp : c02f3b94  ip : ffffff9b  fp : c02f3ba8
r10: 00000002  r9 : c03bb800  r8 : 00000042
r7 : c02f3bbc  r6 : 00000001  r5 : ffffff36  r4 : c02e8000
r3 : c02e7b44  r2 : e1a0c00d  r1 : 9766569b  r0 : e1a0c001
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: C000717F  Table: 203D8000  DAC: 00000015
Process cp (pid: 682, stack limit =3D 0xc02f2190)
Stack: (0xc02f3b94 to 0xc02f4000)
3b80:                                              00000000 c02e8000
c02f3c10
3ba0: c02f3bac c00e03b0 c00def04 c00e08c8 0001ff71 00000000 00000001
aaaaaaaa
3bc0: 00000001 9766569b 6959c333 0f9b999a ffffffff 00000000 00000000
00000000
3be0: ff03ccfc 55555555 c02e8000 00000001 00000000 00000001 00000001
00000800
3c00: 00000000 c02f3c34 c02f3c14 c00e064c c00e00fc c03fe000 c03dc258
00000009
3c20: c03dc258 c02e8000 c02f3cb8 c02f3c38 c00e0d6c c00e05cc aaaaaaaa
00000001
3c40: 00000105 00000008 c02f3c68 c02f3c58 c00378c4 c00377cc 00000001
c02f3c8c
3c60: c02f3c6c c0037c8c c00378c0 c02f3d1c c02f2000 c02f3ca8 c02f3c84
c002bffc
3c80: c002b244 c0216ce4 c02f3d1c 00000000 00000800 00000008 00000009
c03dc258
3ca0: 00000800 00000800 00000000 c02f3d04 c02f3cbc c00e1838 c00e0d50
00000000
3cc0: c02e8000 00000000 00004000 00000000 00001000 00004000 c03fe000
00004000
3ce0: c03dc258 c3d11288 00001000 c02f3d38 c03fe000 00000000 c02f3d34
c02f3d08
3d00: c00dc0bc c00e1660 c02e8000 00001000 c03fe000 c022efc0 c3c16320
c01dbb28
3d20: 00000000 00000000 c02f3d60 c02f3d38 c00dbcd4 c00dc010 00004000
00000000
3d40: 00001000 00000000 c0218704 c022efc0 00004000 c02f3e00 c02f3d64
c004ad34
3d60: c00dbc54 00001000 000342d0 00001000 c3d11288 c01dbb2c c3d11320
c3c16320
3d80: 00000001 c02f3e6c 00000000 c02f3f10 00000000 08000000 00000001
00000000
3da0: c022efc0 c007d748 0000006d 1412bce5 c3d11288 00000001 c3d112d4
c02f3e04
3dc0: c02f3dcc c007d90c c0085794 0000006d 1412bce5 0000006d 00004000
00000000
3de0: 00000000 c02f3e34 c3c16320 00004000 00000000 c02f3e68 c02f3e08
c004b3c8
3e00: c004a9e4 00004000 00000000 c02f3f74 00001000 00000000 00000000
c3d11288
3e20: 00001000 c02f3f74 c02f3f10 c02f3e6c 00000001 00001000 00004000
00000000
3e40: 00000000 c02c6ce0 c02f3ecc c02f3e6c 00000000 00000000 c02f3f74
c02f3f08
3e60: c02f3e6c c004b4f4 c004af88 00000000 c02c6ce0 00000000 00000001
ffffffff
3e80: c3c16320 c03a0f04 00000000 c02f3e98 00000000 c00496c0 000342d0
c02c6ce0
3ea0: 00000000 00000000 00000000 00000001 ffffffff c3c16140 c03a0f04
00000000
3ec0: 23ca705f c02c6ce0 c00432b8 c02f3ecc c02f3ecc 00000000 00000000
c00585a4
3ee0: c0021cbc c3d112f0 c3d11320 00004000 c3d11288 c3c16320 000342d0
c02f3f3c
3f00: c02f3f0c c004b730 c004b480 c02f3fb0 000342d0 00001000 00000000
c3c16320
3f20: 00004000 00000000 00001000 c02f3f74 c02f3f70 c02f3f40 c00636b0
c004b6e4
3f40: 00000000 c02f3f78 c3c16344 fffffff7 c3c16320 c02f3f74 00004000
00000000
3f60: 40058178 c02f3fa4 c02f3f74 c00637ac c00635dc 00004000 00000000
00000000
3f80: 00001000 000342d0 00000004 00000004 c001b924 c02f2000 00000000
c02f3fa8
3fa0: c001b7a0 c006376c 00001000 c00221d4 00000004 000342d0 00001000
ffffc000
3fc0: 00001000 000342d0 00000004 00000004 00000004 00000000 40058178
00000000
3fe0: 0002ff1c befffc44 00021e18 40046ce0 20000010 00000004 00000000
00000000
Backtrace:
[<c00deef4>] (yaffs_FindObjectByNumber+0x0/0x74) from [<c00e03b0>]
(yaffs_Garbag
eCollectBlock+0x2c4/0x4d0)
 r5 =3D C02E8000  r4 =3D 00000000
[<c00e00ec>] (yaffs_GarbageCollectBlock+0x0/0x4d0) from [<c00e064c>]
(yaffs_Chec
kGarbageCollection+0x90/0x114)
[<c00e05bc>] (yaffs_CheckGarbageCollection+0x0/0x114) from [<c00e0d6c>]
(yaffs_W
riteChunkDataToObject+0x2c/0xc8)
 r8 =3D C02E8000  r7 =3D C03DC258  r6 =3D 00000009  r5 =3D C03DC258
 r4 =3D C03FE000
[<c00e0d40>] (yaffs_WriteChunkDataToObject+0x0/0xc8) from [<c00e1838>]
(yaffs_Wr
iteDataToFile+0x1e8/0x278)
[<c00e1650>] (yaffs_WriteDataToFile+0x0/0x278) from [<c00dc0bc>]
(yaffs_file_wri
te+0xbc/0x16c)
[<c00dc000>] (yaffs_file_write+0x0/0x16c) from [<c00dbcd4>]
(yaffs_commit_write+
0x90/0x13c)
[<c00dbc44>] (yaffs_commit_write+0x0/0x13c) from [<c004ad34>]
(generic_file_buff
ered_write+0x364/0x5a8)
 r8 =3D 00004000  r7 =3D C022EFC0  r6 =3D C0218704  r5 =3D 00000000
 r4 =3D 00001000
[<c004a9d4>] (generic_file_buffered_write+0x4/0x5a8) from [<c004b3c8>]
(__generi
c_file_aio_write_nolock+0x450/0x478)
[<c004af78>] (__generic_file_aio_write_nolock+0x0/0x478) from
[<c004b4f4>] (__ge
neric_file_write_nolock+0x84/0xac)
[<c004b470>] (__generic_file_write_nolock+0x0/0xac) from [<c004b730>]
(generic_f
ile_write+0x5c/0xe8)
 r9 =3D 000342D0  r8 =3D C3C16320  r7 =3D C3D11288  r6 =3D 00004000
 r5 =3D C3D11320  r4 =3D C3D112F0
[<c004b6d4>] (generic_file_write+0x0/0xe8) from [<c00636b0>]
(vfs_write+0xe4/0x1
1c)
[<c00635cc>] (vfs_write+0x0/0x11c) from [<c00637ac>]
(sys_write+0x50/0x74)
[<c006375c>] (sys_write+0x0/0x74) from [<c001b7a0>]
(ret_fast_syscall+0x0/0x2c)
 r9 =3D C02F2000  r8 =3D C001B924  r7 =3D 00000004  r6 =3D 00000004
 r5 =3D 000342D0  r4 =3D 00001000
Code: e3520000 e242000c e283e0b8 0a000002 (e5903030)