Re: [Yaffs] FSX issues on YAFFS2

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: JiSheng Zhang
Date:  
To: yaffs
Subject: Re: [Yaffs] FSX issues on YAFFS2
> For testing I have been running tests on a nandsim to get better speed and not
> trash real flash. As follows:
> $sudo -s
> # linux-tests/initnandsim
> # insmod yaffs2.ko
> # mount -t yaffs2 /dev/mtdblock0 /mnt
> # echo +os > /proc/yaffs
> # cd /mnt
> run fsx
>

some findings: it seems that this is not related with vfs cache.

I add the some source to printk the yaffs2 internal cache "miss" or
"hit" and useful information such as in chunkInInode, tn, retVal in
yaffs_FindChunkInFile

firstly here is some fsx log:
Seed set to 1596
truncating to largest ever: 0x2cd11
truncating to largest ever: 0x37ed2
truncating to largest ever: 0x3a218
truncating to largest ever: 0x3a7f8
truncating to largest ever: 0x3c83b
truncating to largest ever: 0x3d880
truncating to largest ever: 0x3eec4
truncating to largest ever: 0x3f9bf
truncating to largest ever: 0x3fdba
truncating to largest ever: 0x3fe70
truncating to largest ever: 0x3fef4
READ BAD DATA: offset = 0xac7d, size = 0xe681
OFFSET    GOOD    BAD    RANGE
0x1684b    000000    0xbe38       0x95
....
6569: 1261387577.480687 TRUNCATE DOWN    from 0x294bc to 0x113d0    ******WWWW
6570: 1261387577.480789 READ     0xcbcd thru 0x113cf (0x4803 bytes)
6571: 1261387577.480812 TRUNCATE UP    from 0x113d0 to 0x3db8b    ******WWWW
6572: 1261387577.480938 WRITE    0xf492 thru 0xf5d7 (0x146 bytes)
6573: 1261387577.480960 MAPREAD  0x33ae6 thru 0x3db8a (0xa0a5 bytes)
6574: 1261387577.481220 READ     0xac7d thru 0x192fd (0xe681 bytes)    ***RRRR***


here is some of the according kernel log:
...
yaffs_setattr of object 261
35 df5d60f0 -1
35 df5d60f0 -1
yaffs_setattr of object 261
start yaffs_write_begin
end yaffs_write_begin - ok
yaffs_write_end addr cfe5e492 pos f492 nBytes 146
yaffs_file_write about to write writing 146 bytesto object 105 at f492
31 df5d61b8 226434
yaffs_file_write writing 146 bytes, 146 written at f492
yaffs_readpage at 00023000, size 00001000
23000 47 0 800 miss
23800 48 0 800 miss
yaffs_readpage done
yaffs_readpage at 00024000, size 00001000
24000 49 0 800 miss
24800 4a 0 800 miss
yaffs_readpage done
yaffs_readpage at 00025000, size 00001000
25000 4b 0 800 miss
25800 4c 0 800 miss
yaffs_readpage done
yaffs_readpage at 00026000, size 00001000
26000 4d 0 800 miss
26800 4e 0 800 miss
yaffs_readpage done
yaffs_readpage at 00027000, size 00001000
27000 4f 0 800 miss
27800 50 0 800 miss
yaffs_readpage done
yaffs_readpage at 00028000, size 00001000
28000 51 0 800 miss
28800 52 0 800 miss
yaffs_readpage done
yaffs_readpage at 00029000, size 00001000
29000 53 0 800 miss
29800 54 0 800 miss
yaffs_readpage done
yaffs_readpage at 0002a000, size 00001000
2a000 55 0 800 miss
2a800 56 0 800 miss
yaffs_readpage done
yaffs_readpage at 0002b000, size 00001000
2b000 57 0 800 miss
2b800 58 0 800 miss
yaffs_readpage done
yaffs_readpage at 0002c000, size 00001000
2c000 59 0 800 miss
2c800 5a 0 800 miss
yaffs_readpage done
yaffs_readpage at 0002d000, size 00001000
2d000 5b 0 800 miss
2d800 5c 0 800 miss
yaffs_readpage done
yaffs_readpage at 0002e000, size 00001000
2e000 5d 0 800 miss
2e800 5e 0 800 miss
yaffs_readpage done
yaffs_readpage at 0002f000, size 00001000
2f000 5f 0 800 miss
2f800 60 0 800 miss
yaffs_readpage done
yaffs_readpage at 00030000, size 00001000
30000 61 0 800 miss
30800 62 0 800 miss
yaffs_readpage done
yaffs_readpage at 00031000, size 00001000
31000 63 0 800 miss
31800 64 0 800 miss
yaffs_readpage done
yaffs_readpage at 00032000, size 00001000
32000 65 0 800 miss
32800 66 0 800 miss
yaffs_readpage done
yaffs_readpage at 00033000, size 00001000
33000 67 0 800 miss
33800 68 0 800 miss
yaffs_readpage done
yaffs_readpage at 00034000, size 00001000
34000 69 0 800 miss
34800 6a 0 800 miss
yaffs_readpage done
yaffs_readpage at 00035000, size 00001000
35000 6b 0 800 miss
35800 6c 0 800 miss
yaffs_readpage done
yaffs_readpage at 00036000, size 00001000
36000 6d 0 800 miss
36800 6e 0 800 miss
yaffs_readpage done
yaffs_readpage at 00037000, size 00001000
37000 6f 0 800 miss
37800 70 0 800 miss
yaffs_readpage done
yaffs_readpage at 00038000, size 00001000
38000 71 0 800 miss
38800 72 0 800 miss
yaffs_readpage done
yaffs_readpage at 00039000, size 00001000
39000 73 0 800 miss
39800 74 0 800 miss
yaffs_readpage done
yaffs_readpage at 0003a000, size 00001000
3a000 75 0 800 miss
3a800 76 0 800 miss
yaffs_readpage done
yaffs_readpage at 0003b000, size 00001000
3b000 77 0 800 miss
3b800 78 0 800 miss
yaffs_readpage done
yaffs_readpage at 0003c000, size 00001000
3c000 79 0 800 miss
3c800 7a 0 800 miss
yaffs_readpage done
yaffs_readpage at 0003d000, size 00001000
3d000 7b 0 800 miss
3d800 7c 0 800 miss
yaffs_readpage done
yaffs_readpage at 00012000, size 00001000
12000 25 0 800 miss
37 df5d60f0 -1
12800 26 0 800 miss
38 df5d60f0 -1
yaffs_readpage done
yaffs_readpage at 00013000, size 00001000
13000 27 0 800 miss
39 df5d60f0 -1
13800 28 0 800 miss
40 df5d60f0 -1
yaffs_readpage done
yaffs_readpage at 00014000, size 00001000
14000 29 0 800 miss
41 df5d60f0 -1
14800 2a 0 800 miss
42 df5d60f0 -1
yaffs_readpage done
yaffs_readpage at 00015000, size 00001000
15000 2b 0 800 miss
43 df5d60f0 -1
15800 2c 0 800 miss
44 df5d60f0 -1
yaffs_readpage done
yaffs_readpage at 00016000, size 00001000
16000 2d 0 800 miss
45 df5d60f0 -1
16800 2e 0 800 miss
46 df5d60f0 226451
yaffs_readpage done
yaffs_readpage at 00017000, size 00001000
17000 2f 0 800 miss
47 df5d60f0 -1
17800 30 0 800 miss
yaffs_readpage done
yaffs_readpage at 00018000, size 00001000
18000 31 0 800 miss
18800 32 0 800 miss
yaffs_readpage done
yaffs_readpage at 00019000, size 00001000
19000 33 0 800 miss
19800 34 0 800 miss
yaffs_readpage done
yaffs_readpage at 0001a000, size 00001000
1a000 35 0 800 miss
1a800 36 0 800 miss
yaffs_readpage done
yaffs_readpage at 0001b000, size 00001000
1b000 37 0 800 miss
1b800 38 0 800 miss
yaffs_readpage done
yaffs_readpage at 0001c000, size 00001000
1c000 39 0 800 miss
1c800 3a 0 800 miss
yaffs_readpage done
yaffs_readpage at 0001d000, size 00001000
1d000 3b 0 800 miss
1d800 3c 0 800 miss
yaffs_readpage done
yaffs_readpage at 0001e000, size 00001000
1e000 3d 0 800 miss
1e800 3e 0 800 miss
yaffs_readpage done
yaffs_readpage at 0001f000, size 00001000
1f000 3f 0 800 miss
1f800 40 0 800 miss
yaffs_readpage done
yaffs_readpage at 00020000, size 00001000
20000 41 0 800 miss
20800 42 0 800 miss
yaffs_readpage done
yaffs_readpage at 00021000, size 00001000
21000 43 0 800 miss
21800 44 0 800 miss
yaffs_readpage done
yaffs_file_flush object 261 (dirty)


As is shown above, when read one page at offset 16800,
"16800 2e 0 800 miss"
yaffs_ReadDataFromFile=>cache miss so =>
yaffs_ReadChunkDataFromObject(chunInInode is 0x2e)=>
yaffs_FindChunkInFile=>
yaffs_FindChunkInGroup which return 226451 rather than -1
so, yaffs_ReadChunkWithTagsFromNAND is called.

IMHO, there may be some thing wrong with logical address=>
physical address translation when handling hole.


Cheers,
Jisheng