I resend the message (it was to big for the list).
---------- Forwarded message ----------
From: Cédric Brégardis <
cedric.bregardis@gmail.com>
Date: 2008/9/4
Subject: Re: [Yaffs] File erase problem
To:
manningc2@actrix.co.nz
Hi
2008/9/3 <
manningc2@actrix.co.nz>
Hi
>
> Could you send that again with the following:
>
> add the output from
> # cat /proc/yaffs
>
> Changes all the
> #ls
> to
> #ls -ial
>
> That really helps give more info.
>
> I suspect there is some issue with the way your mtd imlementation or
> hook-up is handling the deletion markers.
Thanks for your help ! Here is the new output :
# flash_eraseall /dev/mtd3
Erasing 16 Kibyte @ ffc000 -- 99 % complete.
# mount -t yaffs /dev/mtdblock3 DFS
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs_read_super: Using yaffs1
yaffs_read_super: block size 4096
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
erase c01518bc
read c0151344
write c015168c
readoob c0151508
writeoob c0151744
block_isbad c0151ae4
block_markbad c0151b38
writesize 512
oobsize 16
erasesize 16384
size 16777216
yaffs locking
yaffs: yaffs_GutsInitialise()
yaffs_Scan starts intstartblk 1 intendblk 1024...
Block scanning block 1 state 3 seq 0
Block empty
Block scanning block 2 state 3 seq 0
Block empty
[...]
Block scanning block 1019 state 3 seq 0
Block empty
Block scanning block 1020 state 3 seq 0
Block empty
Block scanning block 1021 state 3 seq 0
Block empty
Block scanning block 1022 state 3 seq 0
Block empty
Block scanning block 1023 state 3 seq 0
Block empty
Block scanning block 1024 state 3 seq 0
Block empty
yaffs_Scan ends
Block summary
0 blocks have illegal states
Unknown 0 blocks
Needs scanning 0 blocks
Scanning 0 blocks
Empty 1024 blocks
Allocating 0 blocks
Full 0 blocks
Dirty 0 blocks
Checkpoint 0 blocks
Collecting 0 blocks
Dead 0 blocks
yaffs: yaffs_GutsInitialise() done.
yaffs_read_super: guts initialised OK
yaffs unlocking
yaffs_get_inode for object 1
yaffs_read_inode for 1
yaffs locking
yaffs_FillInode mode 41b6 uid 0 gid 0 size 512 count 1
yaffs unlocking
yaffs_read_super: got root inode
yaffs_read_super: d_alloc_root done
yaffs_read_super: done
# cd DFS
# touch toto
yaffs locking
yaffs_lookup for 1:toto
yaffs unlocking
yaffs_lookup not found
yaffs_create
yaffs_mknod: parent object 1 type 3
yaffs_mknod: making oject for toto, mode 81a4 dev 0
yaffs locking
yaffs_mknod: making file
yaffs: Tnodes added
Allocated block 1, seq 4097, 1023 left
Writing chunk 0 tags 270 0
yaffs unlocking
yaffs_get_inode for object 270
yaffs_read_inode for 270
yaffs locking
yaffs_FillInode mode 81a4 uid 0 gid 0 size 0 count 1
yaffs unlocking
yaffs_mknod created object 270 count = 1
yaffs_file_flush object 270 (clean)
yaffs locking
yaffs unlocking
# rm toto
yaffs_unlink 1:toto
yaffs locking
Obj 0 header mismatch objectId 270
Writing chunk 1 tags 270 0
line 3727 delete of chunk 32
Writing chunk 0 tags 0 0
yaffs unlocking
yaffs_put_inode: ino 270, count 2
yaffs_put_inode: ino 270, count 1
yaffs_delete_inode: ino 270, count 0 object exists
yaffs locking
line 5069 delete of chunk 33
Writing chunk 1 tags 0 0
yaffs unlocking
yaffs_clear_inode: ino 270, count 0 object exists
yaffs locking
yaffs unlocking
# sync
yaffs_sync_fs
yaffs_sync_fs
# touch toto
yaffs_create
yaffs_mknod: parent object 1 type 3
yaffs_mknod: making oject for toto, mode 81a4 dev 0
yaffs locking
yaffs_mknod: making file
Writing chunk 2 tags 271 0
yaffs unlocking
yaffs_get_inode for object 271
yaffs_read_inode for 271
yaffs locking
yaffs_FillInode mode 81a4 uid 0 gid 0 size 0 count 1
yaffs unlocking
yaffs_mknod created object 271 count = 1
yaffs_file_flush object 271 (clean)
yaffs locking
yaffs unlocking
# rm toto
yaffs_unlink 1:toto
yaffs locking
Obj 0 header mismatch objectId 271
Writing chunk 3 tags 271 0
line 3727 delete of chunk 34
Writing chunk 2 tags 0 0
yaffs unlocking
yaffs_put_inode: ino 271, count 2
yaffs_put_inode: ino 271, count 1
yaffs_delete_inode: ino 271, count 0 object exists
yaffs locking
line 5069 delete of chunk 35
Writing chunk 3 tags 0 0
yaffs unlocking
yaffs_clear_inode: ino 271, count 0 object exists
yaffs locking
yaffs unlocking
# sync
yaffs_sync_fs
yaffs_sync_fs
# ls -ial
yaffs locking
yaffs_readdir: starting at 0
yaffs_readdir: entry . ino 1
yaffs_readdir: entry .. ino 1
yaffs_readdir: lost+found inode 2
yaffs unlocking
yaffs locking
yaffs_lookup for 1:lost+found
yaffs unlocking
yaffs_lookup found 2
yaffs_get_inode for object 2
yaffs_read_inode for 2
yaffs locking
yaffs_FillInode mode 41b6 uid 0 gid 0 size 512 count 1
yaffs unlocking
yaffs_loookup dentry
yaffs locking
yaffs_readdir: starting at 3
yaffs unlocking
1 drw-rw-rw- 1 root root 512 Dec 31 17:05 .
315 drwxr-xr-x 4 root root 1024 Aug 18 2008 ..
2 drw-rw-rw- 1 root root 512 Dec 31 17:05 lost+found
# cat /proc/yaffs
YAFFS built:May 20 2008 13:57:04
$Id: yaffs_fs.c,v 1.62 2007-08-16 20:42:11 imcd Exp $
$Id: yaffs_guts.c,v 1.51 2007-07-23 05:14:08 charles Exp $
Device 0 "AFS"
startBlock......... 0
endBlock........... 2047
nDataBytesPerChunk. 512
chunkGroupBits..... 0
chunkGroupSize..... 1
nErasedBlocks...... 2044
nReservedBlocks.... 5
nCheckptResBlocks.. 0
blocksInCheckpoint. 0
nTnodesCreated..... 100
nFreeTnodes........ 97
nObjectsCreated.... 100
nFreeObjects....... 93
nFreeChunks........ 65469
nPageWrites........ 0
nPageReads......... 0
nBlockErasures..... 0
nGCCopies.......... 0
garbageCollections. 0
passiveGCs......... 0
nRetriedWrites..... 0
nShortOpCaches..... 10
nRetireBlocks...... 0
eccFixed........... 0
eccUnfixed......... 0
tagsEccFixed....... 71
tagsEccUnfixed..... 1
cacheHits.......... 0
nDeletedFiles...... 0
nUnlinkedFiles..... 0
nBackgroudDeletions 0
useNANDECC......... 1
isYaffs2........... 0
Device 1 "DFS"
startBlock......... 0
endBlock........... 1023
nDataBytesPerChunk. 512
chunkGroupBits..... 0
chunkGroupSize..... 1
nErasedBlocks...... 1023
nReservedBlocks.... 5
nCheckptResBlocks.. 0
blocksInCheckpoint. 0
nTnodesCreated..... 100
nFreeTnodes........ 100
nObjectsCreated.... 100
nFreeObjects....... 96
nFreeChunks........ 32768
nPageWrites........ 8
nPageReads......... 3
nBlockErasures..... 0
nGCCopies.......... 0
garbageCollections. 0
passiveGCs......... 0
nRetriedWrites..... 0
nShortOpCaches..... 10
nRetireBlocks...... 0
eccFixed........... 0
eccUnfixed......... 0
tagsEccFixed....... 0
tagsEccUnfixed..... 0
cacheHits.......... 0
nDeletedFiles...... 0
nUnlinkedFiles..... 2
nBackgroudDeletions 0
useNANDECC......... 1
isYaffs2........... 0
# cd ..
# umount DFS
yaffs_put_inode: ino 2, count 1
yaffs_put_inode: ino 1, count 1
yaffs_put_inode: ino 1, count 1
yaffs_sync_fs
yaffs_clear_inode: ino 1, count 0 object exists
yaffs locking
yaffs unlocking
yaffs_clear_inode: ino 2, count 0 object exists
yaffs locking
yaffs unlocking
yaffs_put_super
yaffs locking
save entry: isCheckpointed 0
Block summary
0 blocks have illegal states
Unknown 0 blocks
Needs scanning 0 blocks
Scanning 0 blocks
Empty 1023 blocks
Allocating 1 blocks
Full 0 blocks
Dirty 0 blocks
Checkpoint 0 blocks
Collecting 0 blocks
Dead 0 blocks
skipping checkpoint write
checkpoint byte count 0
save exit: isCheckpointed 0
yaffs unlocking
# mount -t yaffs /dev/mtdblock3 DFS
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs_read_super: Using yaffs1
yaffs_read_super: block size 4096
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
erase c01518bc
read c0151344
write c015168c
readoob c0151508
writeoob c0151744
block_isbad c0151ae4
block_markbad c0151b38
writesize 512
oobsize 16
erasesize 16384
size 16777216
yaffs locking
yaffs: yaffs_GutsInitialise()
yaffs_Scan starts intstartblk 1 intendblk 1024...
Block scanning block 1 state 2 seq 68
Block scanning block 2 state 3 seq 0
Block empty
Block scanning block 3 state 3 seq 0
Block empty
Block scanning block 4 state 3 seq 0
Block empty
Block scanning block 5 state 3 seq 0
Block empty
[...]
Block empty
Block scanning block 1020 state 3 seq 0
Block empty
Block scanning block 1021 state 3 seq 0
Block empty
Block scanning block 1022 state 3 seq 0
Block empty
Block scanning block 1023 state 3 seq 0
Block empty
Block scanning block 1024 state 3 seq 0
Block empty
yaffs: Tnodes added
line 5660 delete of chunk 33
Writing chunk 1 tags 0 0
line 5660 delete of chunk 35
Writing chunk 3 tags 0 0
Allocating from 1 4
yaffs_Scan ends
Block summary
0 blocks have illegal states
Unknown 0 blocks
Needs scanning 0 blocks
Scanning 0 blocks
Empty 1023 blocks
Allocating 1 blocks
Full 0 blocks
Dirty 0 blocks
Checkpoint 0 blocks
Collecting 0 blocks
Dead 0 blocks
yaffs: yaffs_GutsInitialise() done.
yaffs_read_super: guts initialised OK
yaffs unlocking
yaffs_get_inode for object 1
yaffs_read_inode for 1
yaffs locking
yaffs_FillInode mode 41b6 uid 0 gid 0 size 512 count 1
yaffs unlocking
yaffs_read_super: got root inode
yaffs_read_super: d_alloc_root done
yaffs_read_super: done
# cd DFS
# ls -ial
yaffs locking
yaffs_readdir: starting at 0
yaffs_readdir: entry . ino 1
yaffs_readdir: entry .. ino 1
yaffs_readdir: toto inode 271
yaffs_readdir: toto inode 270
yaffs_readdir: lost+found inode 2
yaffs unlocking
yaffs locking
yaffs_lookup for 1:toto
yaffs unlocking
yaffs_lookup found 271
yaffs_get_inode for object 271
yaffs_read_inode for 271
yaffs locking
yaffs_FillInode mode 81a4 uid 0 gid 0 size 0 count 1
yaffs unlocking
yaffs_loookup dentry
yaffs locking
yaffs_lookup for 1:lost+found
yaffs unlocking
yaffs_lookup found 2
yaffs_get_inode for object 2
yaffs_read_inode for 2
yaffs locking
yaffs_FillInode mode 41b6 uid 0 gid 0 size 512 count 1
yaffs unlocking
yaffs_loookup dentry
yaffs locking
yaffs_readdir: starting at 5
yaffs unlocking
1 drw-rw-rw- 1 root root 512 Dec 31 17:06 .
315 drwxr-xr-x 4 root root 1024 Aug 18 2008 ..
2 drw-rw-rw- 1 root root 512 Dec 31 17:06 lost+found
271 -rw-r--r-- 1 root root 0 Dec 31 17:05 toto
271 -rw-r--r-- 1 root root 0 Dec 31 17:05 toto
# cat /proc/yaffs
YAFFS built:May 20 2008 13:57:04
$Id: yaffs_fs.c,v 1.62 2007-08-16 20:42:11 imcd Exp $
$Id: yaffs_guts.c,v 1.51 2007-07-23 05:14:08 charles Exp $
Device 0 "AFS"
startBlock......... 0
endBlock........... 2047
nDataBytesPerChunk. 512
chunkGroupBits..... 0
chunkGroupSize..... 1
nErasedBlocks...... 2044
nReservedBlocks.... 5
nCheckptResBlocks.. 0
blocksInCheckpoint. 0
nTnodesCreated..... 100
nFreeTnodes........ 97
nObjectsCreated.... 100
nFreeObjects....... 93
nFreeChunks........ 65469
nPageWrites........ 0
nPageReads......... 0
nBlockErasures..... 0
nGCCopies.......... 0
garbageCollections. 0
passiveGCs......... 0
nRetriedWrites..... 0
nShortOpCaches..... 10
nRetireBlocks...... 0
eccFixed........... 0
eccUnfixed......... 0
tagsEccFixed....... 71
tagsEccUnfixed..... 1
cacheHits.......... 0
nDeletedFiles...... 0
nUnlinkedFiles..... 0
nBackgroudDeletions 0
useNANDECC......... 1
isYaffs2........... 0
Device 1 "DFS"
startBlock......... 0
endBlock........... 1023
nDataBytesPerChunk. 512
chunkGroupBits..... 0
chunkGroupSize..... 1
nErasedBlocks...... 1023
nReservedBlocks.... 5
nCheckptResBlocks.. 0
blocksInCheckpoint. 0
nTnodesCreated..... 100
nFreeTnodes........ 98
nObjectsCreated.... 100
nFreeObjects....... 94
nFreeChunks........ 32766
nPageWrites........ 0
nPageReads......... 0
nBlockErasures..... 0
nGCCopies.......... 0
garbageCollections. 0
passiveGCs......... 0
nRetriedWrites..... 0
nShortOpCaches..... 10
nRetireBlocks...... 0
eccFixed........... 0
eccUnfixed......... 0
tagsEccFixed....... 0
tagsEccUnfixed..... 0
cacheHits.......... 0
nDeletedFiles...... 0
nUnlinkedFiles..... 0
nBackgroudDeletions 0
useNANDECC......... 1
isYaffs2........... 0
#
Cedric