[prev in list] [next in list] [prev in thread] [next in thread] 

List:       yaffs
Subject:    [Yaffs] Help! yaffs2 checkpoint problems.
From:       Tian Jin <tad2k () msn ! com>
Date:       2007-11-01 13:08:01
Message-ID: BAY107-W9A25E15EA27680627224EED8C0 () phx ! gbl
[Download RAW message or body]

Hi,
   I'm using 4GB NAND Flash on my AT91RM9200 board, I can't mount yaffs2 partions \
recently:  ("bad block" report is not pasted here)
 
[ARM ~]# cat /proc/yaffs YAFFS built:Oct 21 2007 15:10:30$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 $[ARM ~]#   
[ARM mnt]# mount /dev/mtdblock6 /mnt/data/ -t yaffs
yaffs: dev is 32505862 name is "mtdblock6"yaffs: passed flags ""yaffs: Attempting MTD \
mount on 31.6, "mtdblock6"yaffs: auto selecting yaffs2Unable to handle kernel NULL \
pointer dereference at virtual address 00000000pgd = c3a4c000[00000000] \
*pgd=23d67031, *pte=00000000, *ppte=00000000Internal error: Oops: 817 [#1]Modules \
linked in:CPU: 0PC is at memcpy+0x30/0x29cLR is at __init_begin+0x3fff8000/0x30pc : \
[<c00fb310>]    lr : [<00000000>]    Not taintedsp : c3a4bb68  ip : 00000000  fp : \
c3a4bbacr10: c3fec974  r9 : 00000000  r8 : 00000000r7 : 00000000  r6 : 00000000  r5 : \
00000000  r4 : 00000000r3 : 00000000  r2 : ffffffec  r1 : c3fec994  r0 : \
00000000Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  Segment userControl: \
C000317FTable: 23A4C000  DAC: 00000015Process mount (pid: 227, stack limit = \
0xc3a4a250)Stack: (0xc3a4bb68 to 0xc3a4c000)bb60:                   00000000 00000000 \
c3a44448 c3c04000 00000000 00000000 bb80: c00e1498 c3fec974 00000001 c3c04000 \
00000001 c3c04000 c3a4bbc0 c3a44448 bba0: c3a4bc30 c3a4bbb0 c00e70d0 c00e1360 \
00000000 00000000 c0071c20 000041b6 bbc0: 00000000 0000001c 00000364 00000003 \
00003706 c3035f39 00000001 0000021e bbe0: 00000028 00003dca 000000f7 00000036 \
000f8573 00000342 000004b4 00000000 bc00: 303030f7 00000000 c001a2fc c3c04000 \
0000000a c3fc5000 00000046 00000002 bc20: c0267c28 c3a4bcd8 c3a4bc34 c00e77bc \
c00e6cf8 c3a4a000 00000000 c3a4bcb8 bc40: c3a4bc4c c003359c c01d2a58 00000000 \
00000020 00000000 00000000 00000000 bc60: c020b5f6 c3c24dcc c3a4bd08 c3c24dc0 \
00000000 00000000 00000001 c3f65000 bc80: c3a4bc9c c3a4bc90 c0101f08 c010194c \
c0267c28 c3f90000 c3c24ec0 c001aa00 bca0: 00000000 00000001 c3f65000 c3a4bcc8 \
00020000 c3c04000 c3c24ec0 c001aa00 bcc0: 00000000 00000002 c3c24ec8 c3a4bd54 \
c3a4bcdc c00df718 c00e7298 00000000 bce0: 00000000 00000000 00000020 c020b5f6 \
c3c24dcc c3a4bd68 00000000 00000000 bd00: 00000000 00000000 6264746d 6b636f6c \
c3a40036 c0101f08 c010194c c3a4bd54 bd20: c3a4bd34 c00afc68 c0101f00 c032a078 \
c001aa00 c032a060 00008000 c3f90000 bd40: c3a4befc c3f65000 c3a4bd64 c3a4bd58 \
c00df918 c00df0ac c3a4bda8 c3a4bd68 bd60: c0077d84 c00df904 6264746d 6b636f6c \
c3870036 c3a4befc c3f65000 c3a4bd9c bd80: c3a4bd8c c0324f70 c0324f20 fffffff4 \
c3f90000 c0267c68 00000000 c3a4bdc0 bda0: c3a4bdac c00df94c c0077ca4 c00df8f4 \
c0324f20 c3a4bde4 c3a4bdc4 c0077fe4 bdc0: c00df938 c0324f20 ffffffed c0267c68 \
c3f90000 00000000 c3a4be00 c3a4bde8 bde0: c0078058 c0077f9c 00008000 c3870000 \
c3d74000 c3a4bf74 c3a4be04 c008ea44 be00: c0078030 c3a4be10 c0023304 c00231f4 \
ffffffec c0376d60 c3d6317c c0019860 be20: c3a4be64 c3a4be30 c0023634 c00232f0 \
4012c000 c3a4bf48 00000017 ffffffff be40: c0242808 00000017 c3a4bf10 00081000 \
20000013 00000000 c3a4bf0c c3a4be68 be60: c0023734 c0023440 c3a4be74 c00ff41c \
c00ff12c c3a4becc c3a4be84 0000012b be80: 00000000 c3d63470 c3a4a000 c3d63470 \
000000e4 00000000 c3a4beb4 c3a4bea8 bea0: c3a4a000 c02456c8 00000000 00080078 \
c3a4bf04 c3a4bec0 c005bdb4 c005bca4 bec0: 00000044 00000000 00000000 c0245938 \
00000044 00000000 000200d0 c0245938 bee0: 00080078 000000d0 c0245934 ffffffff \
c3a4bf44 c3f90000 c3a4bf7c c3f82a0c bf00: c0324320 c3a4bf10 c001d9a0 c0023708 \
00000001 00000001 00000000 00000000 bf20: 00001000 00000078 c3f90000 c3a4bf7c \
c001df84 c3a4a000 00000000 c3a4bf74 bf40: 00000000 c3a4bf58 c02456a4 00000000 \
00000000 c3d74000 00008000 c001df84 bf60: c3a4a000 00000000 c3a4bfa4 c3a4bf78 \
c008edf4 c008e448 c3f90000 c3f90000 bf80: c3870000 c3f65000 00080078 bec76cac \
ffffffff 00000015 00000000 c3a4bfa8 bfa0: c001dde0 c008ed68 00080078 bec76cac \
bec76e45 bec76e54 bec76e62 00008000 bfc0: 00080078 bec76cac ffffffff 00008000 \
00000000 00000000 00000000 00000000 bfe0: 4013a150 bec76878 0005835c 4013a15c \
60000010 bec76e45 00000000 00000000 Backtrace: [<c00e1350>] \
(yaffs_AddOrFindLevel0Tnode+0x0/0x160) from [<c00e70d0>] \
(yaffs_CheckpointRestore+0x3e8/0x5a0)[<c00e6ce8>] (yaffs_CheckpointRestore+0x0/0x5a0) \
from [<c00e77bc>] (yaffs_GutsInitialise+0x534/0x1364)[<c00e7288>] \
(yaffs_GutsInitialise+0x0/0x1364) from [<c00df718>] \
(yaffs_internal_read_super+0x67c/0x858)[<c00df09c>] \
(yaffs_internal_read_super+0x0/0x858) from [<c00df918>] \
(yaffs_internal_read_super_mtd+0x24/0x34)[<c00df8f4>] \
(yaffs_internal_read_super_mtd+0x0/0x34) from [<c0077d84>] \
(get_sb_bdev+0xf0/0x154)[<c0077c94>] (get_sb_bdev+0x0/0x154) from [<c00df94c>] \
(yaffs_read_super+0x24/0x30) r8 = 00000000  r7 = C0267C68  r6 = C3F90000  r5 = \
FFFFFFF4 r4 = C0324F20 [<c00df928>] (yaffs_read_super+0x0/0x30) from [<c0077fe4>] \
(vfs_kern_mount+0x58/0x94)[<c0077f8c>] (vfs_kern_mount+0x0/0x94) from [<c0078058>] \
(do_kern_mount+0x38/0x4c) r7 = 00000000  r6 = C3F90000  r5 = C0267C68  r4 = \
FFFFFFED[<c0078020>] (do_kern_mount+0x0/0x4c) from [<c008ea44>] \
(do_mount+0x60c/0x648) r6 = C3D74000  r5 = C3870000  r4 = 00008000 [<c008e438>] \
(do_mount+0x0/0x648) from [<c008edf4>] (sys_mount+0x9c/0xe8)[<c008ed58>] \
(sys_mount+0x0/0xe8) from [<c001dde0>] (ret_fast_syscall+0x0/0x2c) r7 = 00000015  r6 \
= FFFFFFFF  r5 = BEC76CAC  r4 = 00080078Code: e92d01e0 ba000003 e8b151f8 e2522020 \
(e8a051f8)  Segmentation fault[ARM mnt]#   
 
Debugging into yaffs2 source code, I found the code which caused the Oops:
function yaffs_AddOrFindLevel0Tnode() In yaffs_guts.c:
 
  } } else {  /* top is level 0 */  if(passedTn) {   \
memcpy(tn,passedTn,(dev->tnodeWidth * YAFFS_NTNODES_LEVEL0)/8);   \
yaffs_FreeTnode(dev,passedTn);  } }  
tn is a NULL pointer when  fStruct->topLevel == 0 , fStruct->top == 0 and passedTn != \
NULL:  
/* Traverse down to level 0, adding anything we need */
 l = fStruct->topLevel; tn = fStruct->top;
 
Then I tried to use no-checkpoint option after system reboot:
 
[ARM ~]# mount /dev/mtdblock6 /mnt/data/  -t yaffs2 -o no-checkpoint-readyaffs: dev \
is 32505862 name is "mtdblock6"yaffs: passed flags "no-checkpoint"yaffs: Attempting \
MTD mount on 31.6, "mtdblock6"restore entry: isCheckpointed 0skipping checkpoint \
readcheckpoint byte count 0restore exit: isCheckpointed 0Partially written block 137 \
being set for retirementPartially written block 137 being set for retirementPartially \
written block 137 being set for retirementPartially written block 137 being set for \
retirementPartially written block 137 being set for retirementmount: mounting \
/dev/mtdblock6 on /mnt/data failed  
[ARM ~]# cat /proc/ysaffs YAFFS built:Nov  1 2007 18:33:07$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 "NAND Data Storage"startBlock......... 0endBlock........... \
32767nDataBytesPerChunk. 2048chunkGroupBits..... 0chunkGroupSize..... \
1nErasedBlocks...... 32363nReservedBlocks.... 5nCheckptResBlocks.. \
10blocksInCheckpoint. 5nTnodesCreated..... 100nFreeTnodes........ \
0nObjectsCreated.... 200nFreeObjects....... 0nFreeChunks........ \
2071315nPageWrites........ 0nPageReads......... 0nBlockErasures..... \
0nGCCopies.......... 0garbageCollections. 0passiveGCs......... 0nRetriedWrites..... \
0nShortOpCaches..... 10nRetireBlocks...... 0eccFixed........... 0eccUnfixed......... \
0tagsEccFixed....... 0tagsEccUnfixed..... 0cacheHits.......... 0nDeletedFiles...... \
0nUnlinkedFiles..... 0nBackgroudDeletions 0useNANDECC......... 1isYaffs2........... 1 \
 Still failed, then I tried many times with or without no-checkpoint option:(the \
                error reports were not same each time!)
-------------------------------------------------------------
 
Partially written block 137 being set for retirement**>> Block 137 retiredBlock 137 \
                is in state 9 after gc, should be erased
mount: mounting /dev/mtdblock6 on /mnt/data/ failed
 
-------------------------------------------------------------
 
page 9553 in gc has no object: 603 1 1449 mount: mounting /dev/mtdblock6 on \
/mnt/data/ failed  
-------------------------------------------------------------
 
Partially written block 150 being set for retirementPartially written block 150 being \
set for retirementPartially written block 150 being set for retirementPartially \
written block 150 being set for retirementPartially written block 150 being set for \
retirementPartially written block 150 being set for retirementmount: mounting \
/dev/mtdblock6 on /mnt/data/ failed  
-------------------------------------------------------------
 
Partially written block 150 being set for retirementPartially written block 150 being \
set for retirementPartially written block 150 being set for retirementPartially \
written block 150 being set for retirementPartially written block 137 being set for \
retirementPartially written block 137 being set for retirement  
[ARM ~]# dfFilesystem           1k-blocks      Used Available Use% Mounted \
on/dev/mtdblock5            5930      5930         0 100% /tmpfs                    \
31224         4     31220   0% /devtmpfs                    31224         0     31224 \
0% /tmptmpfs                    31224        28     31196   0% /var/dev/mtdblock4     \
6781      6781         0 100% /mnt/app/dev/mtdblock6         4194304     56544   \
4137760   1% /mnt/data  
Finally, mounted OK with no-checkpoint, but some files were corrupted:
 
[ARM data]# ls -lls: ./MC200710312033417.cld: Value too large for defined data \
typels: ./MC2007103120335019.cld: Value too large for defined data typels: \
./MC200710312034278.cld: Value too large for defined data type-rw-r--r--    1 0       \
0         1446407 Oct 31 21:20 LB20071031211758180.cld-rw-r--r--    1 0        0      \
1196419 Oct 31 21:24 LB20071031212218149.cld  
[ARM ~]# umount /mnt/data
 
 
Remounted and failed again:
Partially written block 150 being set for retirementPartially written block 150 being \
set for retirementPartially written block 150 being set for retirementPartially \
written block 7316 being set for retirementPartially written block 7316 being set for \
retirementPartially written block 7316 being set for retirementmount: mounting \
/dev/mtdblock6 on /mnt/data/ failed  
It seems that my yaffs filesystem can not work(be mounted) steadily, I don't know If \
it's a hardware or software problem.  
Can somebody please help me.
 
 
Thank you very much!
 
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE


[Attachment #3 (text/html)]

<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hi,<BR>
&nbsp;&nbsp; I'm using 4GB NAND Flash on my AT91RM9200 board, I can't mount yaffs2 \
partions recently:<BR> &nbsp;&nbsp; ("bad block" report is not pasted here)<BR>
&nbsp;<BR>
[ARM ~]# cat /proc/yaffs <BR>YAFFS built:Oct 21 2007 15:10:30<BR>$Id: yaffs_fs.c,v \
1.62 2007-08-16 20:42:11 imcd Exp $<BR>$Id: yaffs_guts.c,v 1.51 2007-07-23 05:14:08 \
charles Exp $<BR>[ARM ~]# <BR> &nbsp;<BR>
[ARM mnt]# mount /dev/mtdblock6 /mnt/data/ -t yaffs<BR>
<BR>yaffs: dev is 32505862 name is "mtdblock6"<BR>yaffs: passed flags ""<BR>yaffs: \
Attempting MTD mount on 31.6, "mtdblock6"<BR>yaffs: auto selecting yaffs2<BR>Unable \
to handle kernel NULL pointer dereference at virtual address 00000000<BR>pgd = \
c3a4c000<BR>[00000000] *pgd=23d67031, *pte=00000000, *ppte=00000000<BR>Internal \
error: Oops: 817 [#1]<BR>Modules linked in:<BR>CPU: 0<BR>PC is at \
memcpy+0x30/0x29c<BR>LR is at __init_begin+0x3fff8000/0x30<BR>pc : \
[&lt;c00fb310&gt;]&nbsp;&nbsp;&nbsp; lr : [&lt;00000000&gt;]&nbsp;&nbsp;&nbsp; Not \
tainted<BR>sp : c3a4bb68&nbsp; ip : 00000000&nbsp; fp : c3a4bbac<BR>r10: \
c3fec974&nbsp; r9 : 00000000&nbsp; r8 : 00000000<BR>r7 : 00000000&nbsp; r6 : \
00000000&nbsp; r5 : 00000000&nbsp; r4 : 00000000<BR>r3 : 00000000&nbsp; r2 : \
ffffffec&nbsp; r1 : c3fec994&nbsp; r0 : 00000000<BR>Flags: Nzcv&nbsp; IRQs on&nbsp; \
FIQs on&nbsp; Mode SVC_32&nbsp; Segment user<BR>Control: C000317F<BR>Table: \
23A4C000&nbsp; DAC: 00000015<BR>Process mount (pid: 227, stack limit = \
0xc3a4a250)<BR>Stack: (0xc3a4bb68 to \
0xc3a4c000)<BR>bb60:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
00000000 00000000 c3a44448 c3c04000 00000000 00000000 <BR>bb80: c00e1498 c3fec974 \
00000001 c3c04000 00000001 c3c04000 c3a4bbc0 c3a44448 <BR>bba0: c3a4bc30 c3a4bbb0 \
c00e70d0 c00e1360 00000000 00000000 c0071c20 000041b6 <BR>bbc0: 00000000 0000001c \
00000364 00000003 00003706 c3035f39 00000001 0000021e <BR>bbe0: 00000028 00003dca \
000000f7 00000036 000f8573 00000342 000004b4 00000000 <BR>bc00: 303030f7 00000000 \
c001a2fc c3c04000 0000000a c3fc5000 00000046 00000002 <BR>bc20: c0267c28 c3a4bcd8 \
c3a4bc34 c00e77bc c00e6cf8 c3a4a000 00000000 c3a4bcb8 <BR>bc40: c3a4bc4c c003359c \
c01d2a58 00000000 00000020 00000000 00000000 00000000 <BR>bc60: c020b5f6 c3c24dcc \
c3a4bd08 c3c24dc0 00000000 00000000 00000001 c3f65000 <BR>bc80: c3a4bc9c c3a4bc90 \
c0101f08 c010194c c0267c28 c3f90000 c3c24ec0 c001aa00 <BR>bca0: 00000000 00000001 \
c3f65000 c3a4bcc8 00020000 c3c04000 c3c24ec0 c001aa00 <BR>bcc0: 00000000 00000002 \
c3c24ec8 c3a4bd54 c3a4bcdc c00df718 c00e7298 00000000 <BR>bce0: 00000000 00000000 \
00000020 c020b5f6 c3c24dcc c3a4bd68 00000000 00000000 <BR>bd00: 00000000 00000000 \
6264746d 6b636f6c c3a40036 c0101f08 c010194c c3a4bd54 <BR>bd20: c3a4bd34 c00afc68 \
c0101f00 c032a078 c001aa00 c032a060 00008000 c3f90000 <BR>bd40: c3a4befc c3f65000 \
c3a4bd64 c3a4bd58 c00df918 c00df0ac c3a4bda8 c3a4bd68 <BR>bd60: c0077d84 c00df904 \
6264746d 6b636f6c c3870036 c3a4befc c3f65000 c3a4bd9c <BR>bd80: c3a4bd8c c0324f70 \
c0324f20 fffffff4 c3f90000 c0267c68 00000000 c3a4bdc0 <BR>bda0: c3a4bdac c00df94c \
c0077ca4 c00df8f4 c0324f20 c3a4bde4 c3a4bdc4 c0077fe4 <BR>bdc0: c00df938 c0324f20 \
ffffffed c0267c68 c3f90000 00000000 c3a4be00 c3a4bde8 <BR>bde0: c0078058 c0077f9c \
00008000 c3870000 c3d74000 c3a4bf74 c3a4be04 c008ea44 <BR>be00: c0078030 c3a4be10 \
c0023304 c00231f4 ffffffec c0376d60 c3d6317c c0019860 <BR>be20: c3a4be64 c3a4be30 \
c0023634 c00232f0 4012c000 c3a4bf48 00000017 ffffffff <BR>be40: c0242808 00000017 \
c3a4bf10 00081000 20000013 00000000 c3a4bf0c c3a4be68 <BR>be60: c0023734 c0023440 \
c3a4be74 c00ff41c c00ff12c c3a4becc c3a4be84 0000012b <BR>be80: 00000000 c3d63470 \
c3a4a000 c3d63470 000000e4 00000000 c3a4beb4 c3a4bea8 <BR>bea0: c3a4a000 c02456c8 \
00000000 00080078 c3a4bf04 c3a4bec0 c005bdb4 c005bca4 <BR>bec0: 00000044 00000000 \
00000000 c0245938 00000044 00000000 000200d0 c0245938 <BR>bee0: 00080078 000000d0 \
c0245934 ffffffff c3a4bf44 c3f90000 c3a4bf7c c3f82a0c <BR>bf00: c0324320 c3a4bf10 \
c001d9a0 c0023708 00000001 00000001 00000000 00000000 <BR>bf20: 00001000 00000078 \
c3f90000 c3a4bf7c c001df84 c3a4a000 00000000 c3a4bf74 <BR>bf40: 00000000 c3a4bf58 \
c02456a4 00000000 00000000 c3d74000 00008000 c001df84 <BR>bf60: c3a4a000 00000000 \
c3a4bfa4 c3a4bf78 c008edf4 c008e448 c3f90000 c3f90000 <BR>bf80: c3870000 c3f65000 \
00080078 bec76cac ffffffff 00000015 00000000 c3a4bfa8 <BR>bfa0: c001dde0 c008ed68 \
00080078 bec76cac bec76e45 bec76e54 bec76e62 00008000 <BR>bfc0: 00080078 bec76cac \
ffffffff 00008000 00000000 00000000 00000000 00000000 <BR>bfe0: 4013a150 bec76878 \
0005835c 4013a15c 60000010 bec76e45 00000000 00000000 <BR>Backtrace: \
<BR>[&lt;c00e1350&gt;] (yaffs_AddOrFindLevel0Tnode+0x0/0x160) from [&lt;c00e70d0&gt;] \
(yaffs_CheckpointRestore+0x3e8/0x5a0)<BR>[&lt;c00e6ce8&gt;] \
(yaffs_CheckpointRestore+0x0/0x5a0) from [&lt;c00e77bc&gt;] \
(yaffs_GutsInitialise+0x534/0x1364)<BR>[&lt;c00e7288&gt;] \
(yaffs_GutsInitialise+0x0/0x1364) from [&lt;c00df718&gt;] \
(yaffs_internal_read_super+0x67c/0x858)<BR>[&lt;c00df09c&gt;] \
(yaffs_internal_read_super+0x0/0x858) from [&lt;c00df918&gt;] \
(yaffs_internal_read_super_mtd+0x24/0x34)<BR>[&lt;c00df8f4&gt;] \
(yaffs_internal_read_super_mtd+0x0/0x34) from [&lt;c0077d84&gt;] \
(get_sb_bdev+0xf0/0x154)<BR>[&lt;c0077c94&gt;] (get_sb_bdev+0x0/0x154) from \
[&lt;c00df94c&gt;] (yaffs_read_super+0x24/0x30)<BR>&nbsp;r8 = 00000000&nbsp; r7 = \
C0267C68&nbsp; r6 = C3F90000&nbsp; r5 = FFFFFFF4<BR>&nbsp;r4 = C0324F20 \
<BR>[&lt;c00df928&gt;] (yaffs_read_super+0x0/0x30) from [&lt;c0077fe4&gt;] \
(vfs_kern_mount+0x58/0x94)<BR>[&lt;c0077f8c&gt;] (vfs_kern_mount+0x0/0x94) from \
[&lt;c0078058&gt;] (do_kern_mount+0x38/0x4c)<BR>&nbsp;r7 = 00000000&nbsp; r6 = \
C3F90000&nbsp; r5 = C0267C68&nbsp; r4 = FFFFFFED<BR>[&lt;c0078020&gt;] \
(do_kern_mount+0x0/0x4c) from [&lt;c008ea44&gt;] (do_mount+0x60c/0x648)<BR>&nbsp;r6 = \
C3D74000&nbsp; r5 = C3870000&nbsp; r4 = 00008000 <BR>[&lt;c008e438&gt;] \
(do_mount+0x0/0x648) from [&lt;c008edf4&gt;] \
(sys_mount+0x9c/0xe8)<BR>[&lt;c008ed58&gt;] (sys_mount+0x0/0xe8) from \
[&lt;c001dde0&gt;] (ret_fast_syscall+0x0/0x2c)<BR>&nbsp;r7 = 00000015&nbsp; r6 = \
FFFFFFFF&nbsp; r5 = BEC76CAC&nbsp; r4 = 00080078<BR>Code: e92d01e0 ba000003 e8b151f8 \
e2522020 (e8a051f8) <BR>&nbsp;Segmentation fault<BR>[ARM mnt]# <BR> &nbsp;<BR>
&nbsp;<BR>
Debugging into yaffs2 source code, I found the code which caused the Oops:<BR>
function yaffs_AddOrFindLevel0Tnode() In yaffs_guts.c:<BR>
&nbsp;<BR>
&nbsp; }<BR>&nbsp;} else {<BR>&nbsp; /* top is level 0 */<BR>&nbsp; if(passedTn) \
{<BR>&nbsp;&nbsp; memcpy(tn,passedTn,(dev-&gt;tnodeWidth * \
YAFFS_NTNODES_LEVEL0)/8);<BR>&nbsp;&nbsp; yaffs_FreeTnode(dev,passedTn);<BR>&nbsp; \
}<BR>&nbsp;}<BR> &nbsp;<BR>
tn is a NULL pointer when&nbsp; fStruct-&gt;topLevel == 0 , fStruct-&gt;top == 0 and \
passedTn != NULL:<BR> &nbsp;<BR>
/* Traverse down to level 0, adding anything we need */<BR>
&nbsp;l = fStruct-&gt;topLevel;<BR>&nbsp;tn = fStruct-&gt;top;<BR>
&nbsp;<BR>
Then I tried to use no-checkpoint option after system reboot:<BR>
&nbsp;<BR>
[ARM ~]# mount /dev/mtdblock6 /mnt/data/&nbsp; -t yaffs2 -o \
no-checkpoint-read<BR>yaffs: dev is 32505862 name is "mtdblock6"<BR>yaffs: passed \
flags "no-checkpoint"<BR>yaffs: Attempting MTD mount on 31.6, "mtdblock6"<BR>restore \
entry: isCheckpointed 0<BR>skipping checkpoint read<BR>checkpoint byte count \
0<BR>restore exit: isCheckpointed 0<BR>Partially written block 137 being set for \
retirement<BR>Partially written block 137 being set for retirement<BR>Partially \
written block 137 being set for retirement<BR>Partially written block 137 being set \
for retirement<BR>Partially written block 137 being set for retirement<BR>mount: \
mounting /dev/mtdblock6 on /mnt/data failed<BR> &nbsp;<BR>
[ARM ~]# cat /proc/ysaffs <BR>YAFFS built:Nov&nbsp; 1 2007 18:33:07<BR>$Id: \
yaffs_fs.c,v 1.62 2007-08-16 20:42:11 imcd Exp $<BR>$Id: yaffs_guts.c,v 1.51 \
2007-07-23 05:14:08 charles Exp $<BR> Device 0 "NAND Data \
Storage"<BR>startBlock......... 0<BR>endBlock........... 32767<BR>nDataBytesPerChunk. \
2048<BR>chunkGroupBits..... 0<BR>chunkGroupSize..... 1<BR>nErasedBlocks...... \
32363<BR>nReservedBlocks.... 5<BR>nCheckptResBlocks.. 10<BR>blocksInCheckpoint. \
5<BR>nTnodesCreated..... 100<BR>nFreeTnodes........ 0<BR>nObjectsCreated.... \
200<BR>nFreeObjects....... 0<BR>nFreeChunks........ 2071315<BR>nPageWrites........ \
0<BR>nPageReads......... 0<BR>nBlockErasures..... 0<BR>nGCCopies.......... \
0<BR>garbageCollections. 0<BR>passiveGCs......... 0<BR>nRetriedWrites..... \
0<BR>nShortOpCaches..... 10<BR>nRetireBlocks...... 0<BR>eccFixed........... \
0<BR>eccUnfixed......... 0<BR>tagsEccFixed....... 0<BR>tagsEccUnfixed..... \
0<BR>cacheHits.......... 0<BR>nDeletedFiles...... 0<BR>nUnlinkedFiles..... \
0<BR>nBackgroudDeletions 0<BR>useNANDECC......... 1<BR>isYaffs2........... 1<BR> \
&nbsp;<BR> Still failed, then I tried many times with or without no-checkpoint \
option:<BR>(the error reports were not same each time!)<BR> \
<BR>-------------------------------------------------------------<BR> &nbsp;<BR>
Partially written block 137 being set for retirement<BR>**&gt;&gt; Block 137 \
                retired<BR>Block 137 is in state 9 after gc, should be erased<BR>
mount: mounting /dev/mtdblock6 on /mnt/data/ failed<BR>
&nbsp;<BR>
-------------------------------------------------------------<BR>
&nbsp;<BR>
page 9553 in gc has no object: 603 1 1449 <BR>mount: mounting /dev/mtdblock6 on \
/mnt/data/ failed<BR> &nbsp;<BR>
-------------------------------------------------------------<BR>
&nbsp;<BR>
Partially written block 150 being set for retirement<BR>Partially written block 150 \
being set for retirement<BR>Partially written block 150 being set for \
retirement<BR>Partially written block 150 being set for retirement<BR>Partially \
written block 150 being set for retirement<BR>Partially written block 150 being set \
for retirement<BR>mount: mounting /dev/mtdblock6 on /mnt/data/ failed<BR> &nbsp;<BR>
-------------------------------------------------------------<BR>
&nbsp;<BR>
Partially written block 150 being set for retirement<BR>Partially written block 150 \
being set for retirement<BR>Partially written block 150 being set for \
retirement<BR>Partially written block 150 being set for retirement<BR>Partially \
written block 137 being set for retirement<BR>Partially written block 137 being set \
for retirement<BR> &nbsp;<BR>
[ARM ~]# df<BR>Filesystem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
1k-blocks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Used Available Use% Mounted \
on<BR>/dev/mtdblock5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
5930&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
5930&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 100% \
/<BR>tmpfs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
31224&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp; \
31220&nbsp;&nbsp; 0% \
/dev<BR>tmpfs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
31224&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; \
31224&nbsp;&nbsp; 0% \
/tmp<BR>tmpfs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
31224&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 28&nbsp;&nbsp;&nbsp;&nbsp; \
31196&nbsp;&nbsp; 0% \
/var<BR>/dev/mtdblock4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
6781&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
6781&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 100% \
/mnt/app<BR>/dev/mtdblock6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
4194304&nbsp;&nbsp;&nbsp;&nbsp; 56544&nbsp;&nbsp; 4137760&nbsp;&nbsp; 1% \
/mnt/data<BR> &nbsp;<BR>
Finally, mounted OK with no-checkpoint, but some files were corrupted:<BR>
&nbsp;<BR>
[ARM data]# ls -l<BR>ls: ./MC200710312033417.cld: Value too large for defined data \
type<BR>ls: ./MC2007103120335019.cld: Value too large for defined data type<BR>ls: \
./MC200710312034278.cld: Value too large for defined data \
type<BR>-rw-r--r--&nbsp;&nbsp;&nbsp; 1 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1446407 Oct 31 21:20 \
LB20071031211758180.cld<BR>-rw-r--r--&nbsp;&nbsp;&nbsp; 1 \
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1196419 Oct 31 21:24 \
LB20071031212218149.cld<BR> &nbsp;<BR>
[ARM ~]# umount /mnt/data<BR>
&nbsp;<BR>
&nbsp;<BR>
Remounted and failed again:<BR>
<BR>Partially written block 150 being set for retirement<BR>Partially written block \
150 being set for retirement<BR>Partially written block 150 being set for \
retirement<BR>Partially written block 7316 being set for retirement<BR>Partially \
written block 7316 being set for retirement<BR>Partially written block 7316 being set \
for retirement<BR>mount: mounting /dev/mtdblock6 on /mnt/data/ failed<BR> &nbsp;<BR>
It seems that my yaffs filesystem can not work(be mounted) steadily, I don't know If \
it's a hardware or software problem.<BR> &nbsp;<BR>
Can somebody please help me.<BR>
&nbsp;<BR>
&nbsp;<BR>
Thank you very much!<BR>
&nbsp;<BR><br /><hr />Explore the seven wonders of the world <a \
href='http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE' \
target='_new'>Learn more!</a></body> </html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic