I'm using 4GB samsung NAND flash on a AT91RM9200 board, the filesystem is yaffs2.
I got this error message at mount time from yaffs:
 
[ARM ~]# mount /dev/mtdblock6 /mnt/data -t yaffs2
yaffs: dev is 32505862 name is "mtdblock6"
yaffs: Attempting MTD mount on 31.6, "mtdblock6"
restore entry: isCheckpointed 0
...
...
...
found no more checkpt blocks
checkpoint byte count 1835008
restore exit: isCheckpointed 0
block 1587 is bad
block 2325 is bad
block 5306 is bad
block 9116 is bad
block 12580 is bad
block 14643 is bad
block 16458 is bad
block 16615 is bad
block 17820 is bad
block 18628 is bad
block 18915 is bad
block 20245 is bad
block 20787 is bad
block 21433 is bad
Freechunks verification failure 105824 52912 52912
 
[ARM ~]# df
Filesystem           1k-blocks      Used Available Use% Mounted on
tmpfs                    31228         4     31224   0% /dev
/dev/mtdblock6         4194304   3978684    215620  95% /mnt/data
 
The available space was reported incorrectly, the available space should be 107810 NOT 215620.
 
[ARM ~]# cat /proc/meminfo
MemTotal:        62460 kB
MemFree:         38104 kB
Buffers:          3228 kB
Cached:           3292 kB
SwapCached:          0 kB
Active:           2452 kB
Inactive:         4416 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:               0 kB
Writeback:           0 kB
AnonPages:         380 kB
Mapped:           1324 kB
Slab:            16632 kB
SReclaimable:      480 kB
SUnreclaim:      16152 kB
PageTables:         44 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:     31228 kB
Committed_AS:      952 kB
VmallocTotal:   956416 kB
VmallocUsed:     28272 kB
VmallocChunk:   907260 kB
 
The kernel Oops if I umount it:
 
[ARM ~]# umount /mnt/data
save entry: isCheckpointed 0
checkpt blocks available = -5
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c34fc000
[00000000] *pgd=23666031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1]
Modules linked in:
CPU: 0
PC is at yaffs_CheckpointClose+0x44/0x150
LR is at yaffs_CheckpointSave+0x3a8/0x408
pc : [<c00e80cc>]    lr : [<c00e270c>]    Not tainted
sp : c3ec3dec  ip : c3ec3e08  fp : c3ec3e04
r10: c3ec3f14  r9 : c3ec3f1c  r8 : 00000000
r7 : 00000000  r6 : 00000000  r5 : c3a41400  r4 : c037e000
r3 : 0000000e  r2 : 00000000  r1 : 00000000  r0 : c037e000
Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: C000317F
Table: 234FC000  DAC: 00000015
Process umount (pid: 217, stack limit = 0xc3ec2250)
Stack: (0xc3ec3dec to 0xc3ec4000)
3de0:                            00000000 c3a41400 c3a41400 c3ec3e84 c3ec3e08
3e00: c00e270c c00e8098 c3b3b1cc 00000003 c037e000 c3ec3e20 c3b3b0d4 c3b3b0d4
3e20: c3ec3e6c c3ec3e44 c3ec3e34 c008a098 c0071318 c3b3b0dc c3ec3e64 c3ec3e48
3e40: c008b11c c008a050 c3a41468 c3ec2000 c3a41458 c3b3b0e4 c3ec3e9c c037e000
3e60: c3a41400 c3a41400 00000000 00000000 c3ec3f1c c3ec3f14 c3ec3e9c c3ec3e88
3e80: c00df054 c00e2374 c3a41400 c0265d1c c3ec3eb4 c3ec3ea0 c0076edc c00df024
3ea0: c0328060 c3a41400 c3ec3ecc c3ec3eb8 c0077e10 c0076e6c c3a41400 c0265c14
3ec0: c3ec3ee4 c3ec3ed0 c0076d24 c0077df8 c3a41400 c03228a0 c3ec3efc c3ec3ee8
3ee0: c008d038 c0076ccc c3ec3f1c c3ec2000 c3ec3f10 c3ec3f00 c007d088 c008cfd8
3f00: 00000000 c3ec3f94 c3ec3f14 c008d9c4 c007d078 c3ec3f14 c3ec3f14 c3b1ae28
3f20: c03228a0 000000c4 c001df84 c3ec2000 00000001 00000001 00000000 c00792a0
3f40: c0079098 00000001 00000000 01f00006 400141ff 00000001 00000000 00000000
3f60: 00000000 00000800 00000000 00080348 bea68d2c 00080370 00000016 c001df84
3f80: c3ec2000 bea6ad9c c3ec3fa4 c3ec3f98 c008d9ec c008d7d0 00000000 c3ec3fa8
3fa0: c001dde0 c008d9e8 00080348 bea68d2c 00080370 0008037a bea68d36 00000000
3fc0: 00080348 bea68d2c 00080370 00000000 00000000 00000000 bea6ad9c 00080348
3fe0: 40139f00 bea68d0c 00059ebc 40139f04 60000010 00080370 20002031 20002431
Backtrace:
[<c00e8088>] (yaffs_CheckpointClose+0x0/0x150) from [<c00e270c>] (yaffs_CheckpointSave+0x3a8/0x408)
 r6 = C3A41400  r5 = C3A41400  r4 = 00000000
[<c00e2364>] (yaffs_CheckpointSave+0x0/0x408) from [<c00df054>] (yaffs_put_super+0x40/0xb8)
[<c00df014>] (yaffs_put_super+0x0/0xb8) from [<c0076edc>] (generic_shutdown_super+0x80/0x124)
 r5 = C0265D1C  r4 = C3A41400
[<c0076e5c>] (generic_shutdown_super+0x0/0x124) from [<c0077e10>] (kill_block_super+0x28/0x3c)
 r5 = C3A41400  r4 = C0328060
[<c0077de8>] (kill_block_super+0x0/0x3c) from [<c0076d24>] (deactivate_super+0x68/0x80)
 r5 = C0265C14  r4 = C3A41400
[<c0076cbc>] (deactivate_super+0x0/0x80) from [<c008d038>] (mntput_no_expire+0x70/0xbc)
 r5 = C03228A0  r4 = C3A41400
[<c008cfc8>] (mntput_no_expire+0x0/0xbc) from [<c007d088>] (path_release_on_umount+0x20/0x24)
 r5 = C3EC2000  r4 = C3EC3F1C
[<c007d068>] (path_release_on_umount+0x0/0x24) from [<c008d9c4>] (sys_umount+0x204/0x218)
 r4 = 00000000
[<c008d7c0>] (sys_umount+0x0/0x218) from [<c008d9ec>] (sys_oldumount+0x14/0x18)
[<c008d9d8>] (sys_oldumount+0x0/0x18) from [<c001dde0>] (ret_fast_syscall+0x0/0x2c)
Code: e1a06002 e1520003 aa000023 e59010f8 (e5913000)
 WARNING at kernel/exit.c:853 do_exit()
Segmentation fault
 
 
After reboot and remount, the "Freechunks verification failure" problem remains, but I can still write data to that partition with error messages:

checkpt blocks available = -5
checkpoint invalidate
checkpt blocks available = -5
checkpoint invalidate
checkpt blocks available = -5
...
...
...
checkpt blocks available = -1
checkpoint invalidate
checkpt blocks available = -1
...
checkpt blocks available = 0
checkpoint invalidate
checkpt blocks available = 0..
..
checkpoint invalidate
checkpt blocks available = 0
checkpoint invalidate
checkpt blocks available = 1
checking blocks 1 to 32768      <- the error message ends here
 
When the partition is full yaffs show errors:
 
yaffs tragedy: no more eraased blocks
!!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!
yaffs tragedy: no more eraased blocks
!!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!
yaffs tragedy: no more eraased blocks
...
...
...
 
Reboot and remount:
 
found no more checkpt blocks
checkpoint byte count 0
restore exit: isCheckpointed 0
block 1587 is bad
block 2325 is bad
block 5306 is bad
block 9116 is bad
block 12580 is bad
block 14643 is bad
block 16458 is bad
block 16615 is bad
block 17820 is bad
block 18628 is bad
block 18915 is bad
block 20245 is bad
block 20787 is bad
block 21433 is bad
[ARM ~]# df
Filesystem           1k-blocks      Used Available Use% Mounted on
tmpfs                    31228         4     31224   0% /dev
/dev/mtdblock6         4194304   4194304         0 100% /mnt/data
 
[ARM ~]# cat /proc/yaffs
YAFFS built:Apr  6 2007 06:30:53
$Id: yaffs_fs.c,v 1.59 2007/03/20 20:59:40 charles Exp $
$Id: yaffs_guts.c,v 1.48 2007/03/12 20:55:39 charles Exp $
Device 0 "NAND Data Storage"
startBlock......... 0
endBlock........... 32767
chunkGroupBits..... 0
chunkGroupSize..... 1
nErasedBlocks...... 0
nTnodesCreated..... 156800
nFreeTnodes........ 54
nObjectsCreated.... 15000
nFreeObjects....... 21
nFreeChunks........ 0
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
 
To make free space I have to delete files, but I always failed:

[ARM ~]# rm /mnt/data/data.idx
yaffs tragedy: no more eraased blocks
!!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!
rm: cannot remove '/mnt/data/data.idx': Directory not empty
 
[ARM ~]# umount /mnt/data/
save entry: isCheckpointed 0
checkpt blocks available = -5
checkpoint byte count 0
save exit: isCheckpointed 0
 
 
Is there any solution for this?
 
 
Thank you very much.
 
 
 


Play free games, earn tickets, get cool prizes! Join Live Search Club.   Join Live Search Club!