[Yaffs] FSX issues on YAFFS2 - truncate on non-page boundari…

Top Page
Attachments:
Message as email
+ (text/plain)
+ foo.truncated.fsxlog (text/plain)
Delete this message
Reply to this message
Author: Andre Renaud
Date:  
To: yaffs
Subject: [Yaffs] FSX issues on YAFFS2 - truncate on non-page boundaries
When running fsx (file system exerciser, from freebsd/apple -
http://www.freebsd.org/cgi/cvsweb.cgi/src/tools/regression/fsx/), we are
seeing some failures when doing truncate operations. The behaviour seems
to be:
Open a new file
Write some data
truncate the file so that it is shorter
lseek past the eof - the intervening space should be all
nuls (see lseek manpage).
Write some data at the new end of the file, thus leaving the hole in the
middle.

fsx complains that the intervening space is not-nul.

I haven't been able to write a straight forward test case, so it is
possible that this bug is intermittent, or my interpretation of the fsx
output is wrong.

Also, the problem seems to go away if I force fsx to only truncate onto
page boundaries (multiples of 2048 bytes).

I used the following command line to trigger the failure:
./fsx -N 10000 /mnt/foo

I've attached the truncated output of fsx, although the relevant parts
are the top:
READ BAD DATA: offset = 0xdd7c, size = 0xd933
OFFSET  GOOD    BAD     RANGE
0x f000 0x0000  0x6c22  0x  7fc


and the bottom:
9602(130 mod 256): MAPREAD      0x2d86c thru 0x382f1    (0xaa86 bytes)
9603(131 mod 256): TRUNCATE DOWN        from 0x3c5fd to 0xb013  ******WWWW
9604(132 mod 256): WRITE        0x19606 thru 0x282e0    (0xecdb bytes)
HOLE     ***WWWW
9605(133 mod 256): WRITE        0x1d4e2 thru 0x1dfd5    (0xaf4 bytes)
9606(134 mod 256): MAPREAD      0xdd7c thru 0x1b6ae     (0xd933 bytes)
***RRRR***


This indicates that at offset 0xf000, it was expecting to read nuls
(GOOD: 0x0000), but it read non null (BAD: 0x6c22), having done a
truncate down to 0xb013,

Does anyone know about anything like this?
Andre

--
Bluewater Systems Ltd - ARM Technology Solutions Centre

       Andre Renaud                             Bluewater Systems Ltd
Phone: +64 3 3779127 (Aus 1 800 148 751)        Level 17, 119 Armagh St
Fax:   +64 3 3779135                            PO Box 13889
Email:                  Christchurch
Web:   http://www.bluewatersys.com              New Zealand


truncating to largest ever: 0x13e76
truncating to largest ever: 0x2e52c
truncating to largest ever: 0x3c2c2
truncating to largest ever: 0x3f15f
truncating to largest ever: 0x3fcb9
truncating to largest ever: 0x3fe96
truncating to largest ever: 0x3ff9d
READ BAD DATA: offset = 0xdd7c, size = 0xd933
OFFSET    GOOD    BAD    RANGE
0x f000    0x0000    0x6c22    0x  7fc
operation# (mod 256) for the bad data may be 108
LOG DUMP (9606 total operations):
9607(135 mod 256): MAPWRITE 0x3906 thru 0x3a7c    (0x177 bytes)
9608(136 mod 256): MAPWRITE 0x26e63 thru 0x2c6e2    (0x5880 bytes)
9609(137 mod 256): MAPWRITE 0x27e15 thru 0x37d32    (0xff1e bytes)
9610(138 mod 256): WRITE    0x83e2 thru 0x11af4    (0x9713 bytes)    ***WWWW
9611(139 mod 256): MAPREAD    0x2607d thru 0x32518    (0xc49c bytes)
9612(140 mod 256): READ    0x2c84a thru 0x2e69a    (0x1e51 bytes)
9613(141 mod 256): WRITE    0x257ae thru 0x2732b    (0x1b7e bytes)
9614(142 mod 256): WRITE    0x1a401 thru 0x26d00    (0xc900 bytes)
9615(143 mod 256): MAPWRITE 0x3f357 thru 0x3ffff    (0xca9 bytes)
9616(144 mod 256): READ    0x7b78 thru 0xa56a    (0x29f3 bytes)
9617(145 mod 256): MAPREAD    0x3009 thru 0x4819    (0x1811 bytes)
9618(146 mod 256): MAPWRITE 0x16efa thru 0x254f5    (0xe5fc bytes)


.............. SKIPPED SOME BITS .....................

9539(67 mod 256): READ    0xe4a3 thru 0x190c5    (0xac23 bytes)    ***RRRR***
9540(68 mod 256): WRITE    0x342d5 thru 0x3b027    (0x6d53 bytes)
9541(69 mod 256): WRITE    0x3075d thru 0x37fb0    (0x7854 bytes)
9542(70 mod 256): WRITE    0x251e0 thru 0x2bca8    (0x6ac9 bytes)
9543(71 mod 256): READ    0x31c12 thru 0x3c229    (0xa618 bytes)
9544(72 mod 256): MAPREAD    0x3335 thru 0x10620    (0xd2ec bytes)    ***RRRR***
9545(73 mod 256): READ    0x27678 thru 0x28789    (0x1112 bytes)
9546(74 mod 256): TRUNCATE DOWN    from 0x3c22a to 0x261c5
9547(75 mod 256): MAPREAD    0x9aef thru 0x1585a    (0xbd6c bytes)    ***RRRR***
9548(76 mod 256): READ    0x1d668 thru 0x261c4    (0x8b5d bytes)
9549(77 mod 256): MAPREAD    0x965e thru 0xd049    (0x39ec bytes)
9550(78 mod 256): WRITE    0x11903 thru 0x1ac41    (0x933f bytes)
9551(79 mod 256): WRITE    0x10fa1 thru 0x112dc    (0x33c bytes)
9552(80 mod 256): MAPREAD    0x225e thru 0x3209    (0xfac bytes)
9553(81 mod 256): READ    0x1f4dc thru 0x25666    (0x618b bytes)
9554(82 mod 256): MAPREAD    0x1c327 thru 0x1fa19    (0x36f3 bytes)
9555(83 mod 256): TRUNCATE UP    from 0x261c5 to 0x366e6
9556(84 mod 256): WRITE    0x1d8b2 thru 0x2174c    (0x3e9b bytes)
9557(85 mod 256): WRITE    0x2d5e0 thru 0x38dc9    (0xb7ea bytes) EXTEND
9558(86 mod 256): MAPREAD    0x65bb thru 0x14d89    (0xe7cf bytes)    ***RRRR***
9559(87 mod 256): MAPWRITE 0x262ef thru 0x2fc8b    (0x999d bytes)
9560(88 mod 256): MAPWRITE 0xf641 thru 0x1386b    (0x422b bytes)    ******WWWW
9561(89 mod 256): TRUNCATE DOWN    from 0x38dca to 0x31ff8
9562(90 mod 256): MAPWRITE 0x3ee1e thru 0x3ffff    (0x11e2 bytes)
9563(91 mod 256): MAPWRITE 0x89ad thru 0xaf3b    (0x258f bytes)
9564(92 mod 256): READ    0x25dc6 thru 0x34768    (0xe9a3 bytes)
9565(93 mod 256): MAPWRITE 0x1c233 thru 0x1d43d    (0x120b bytes)
9566(94 mod 256): WRITE    0x2e409 thru 0x3a5a1    (0xc199 bytes)
9567(95 mod 256): MAPWRITE 0x24549 thru 0x2e047    (0x9aff bytes)
9568(96 mod 256): MAPWRITE 0x6bb4 thru 0x12ee9    (0xc336 bytes)    ******WWWW
9569(97 mod 256): WRITE    0x21d0c thru 0x27460    (0x5755 bytes)
9570(98 mod 256): MAPREAD    0x187fb thru 0x206d8    (0x7ede bytes)
9571(99 mod 256): MAPWRITE 0x28e9e thru 0x2c684    (0x37e7 bytes)
9572(100 mod 256): WRITE    0x247a5 thru 0x2804c    (0x38a8 bytes)
9573(101 mod 256): READ    0x53f1 thru 0x83a0    (0x2fb0 bytes)
9574(102 mod 256): MAPWRITE 0x5f95 thru 0x60e2    (0x14e bytes)
9575(103 mod 256): TRUNCATE DOWN    from 0x40000 to 0x27d43
9576(104 mod 256): TRUNCATE DOWN    from 0x27d43 to 0x40e1    ******WWWW
9577(105 mod 256): MAPWRITE 0x23511 thru 0x2d8b4    (0xa3a4 bytes)
9578(106 mod 256): WRITE    0x240d4 thru 0x29fb1    (0x5ede bytes)
9579(107 mod 256): MAPWRITE 0x1d615 thru 0x2b54b    (0xdf37 bytes)
9580(108 mod 256): WRITE    0xe8eb thru 0x16db0    (0x84c6 bytes)    ***WWWW
9581(109 mod 256): MAPREAD    0x529c thru 0x576c    (0x4d1 bytes)
9582(110 mod 256): MAPREAD    0x65e5 thru 0x12e06    (0xc822 bytes)    ***RRRR***
9583(111 mod 256): MAPWRITE 0xa3fc thru 0xeaa5    (0x46aa bytes)
9584(112 mod 256): WRITE    0x122f7 thru 0x216f2    (0xf3fc bytes)
9585(113 mod 256): READ    0x10879 thru 0x1dbf3    (0xd37b bytes)
9586(114 mod 256): WRITE    0x3757e thru 0x3ffff    (0x8a82 bytes) HOLE
9587(115 mod 256): WRITE    0x2b24b thru 0x325fa    (0x73b0 bytes)
9588(116 mod 256): TRUNCATE DOWN    from 0x40000 to 0x3b097
9589(117 mod 256): MAPREAD    0x3183a thru 0x3b096    (0x985d bytes)
9590(118 mod 256): WRITE    0x94c8 thru 0x14cc3    (0xb7fc bytes)    ***WWWW
9591(119 mod 256): WRITE    0x278e0 thru 0x3654b    (0xec6c bytes)
9592(120 mod 256): READ    0x1065 thru 0xcc58    (0xbbf4 bytes)
9593(121 mod 256): TRUNCATE DOWN    from 0x3b097 to 0x1d5ee
9594(122 mod 256): MAPWRITE 0xb7da thru 0x1660f    (0xae36 bytes)    ******WWWW
9595(123 mod 256): TRUNCATE DOWN    from 0x1d5ee to 0x18d35
9596(124 mod 256): WRITE    0x2f429 thru 0x340a1    (0x4c79 bytes) HOLE
9597(125 mod 256): READ    0x11331 thru 0x18bfa    (0x78ca bytes)
9598(126 mod 256): WRITE    0x2160b thru 0x26bd7    (0x55cd bytes)
9599(127 mod 256): TRUNCATE UP    from 0x340a2 to 0x3c5fd
9600(128 mod 256): MAPWRITE 0x1391b thru 0x1c94a    (0x9030 bytes)
9601(129 mod 256): WRITE    0x375aa thru 0x3878a    (0x11e1 bytes)
9602(130 mod 256): MAPREAD    0x2d86c thru 0x382f1    (0xaa86 bytes)
9603(131 mod 256): TRUNCATE DOWN    from 0x3c5fd to 0xb013    ******WWWW
9604(132 mod 256): WRITE    0x19606 thru 0x282e0    (0xecdb bytes) HOLE    ***WWWW
9605(133 mod 256): WRITE    0x1d4e2 thru 0x1dfd5    (0xaf4 bytes)
9606(134 mod 256): MAPREAD    0xdd7c thru 0x1b6ae    (0xd933 bytes)    ***RRRR***
Correct content saved for comparison
(maybe hexdump "/mnt/foo" vs "/mnt/foo.fsxgood")