Author: zheng shi Date: To: YAFFS Subject: [Yaffs] blockState could be changed to ALLOCATING before calling
yaffs_VerifyCollectedBlock
Hi,
After GC selected block has been erased, it maybe chosen as an
allocating block when doing object final clean-up later in
yaffs_GarbageCollectBlock.
This caused yaffs_VerifyCollectedBlock to print "Block ?? is in state
4 after gc, should be erased".
Though it's not a critical question, I just wanna have a confirmation
from other people. :-)
I produced this by:
1. create a 80MByte partition
2. copying the mtd-utils source directory into it using yaffs2 for 5 times
You may probably reproduce the log below.
BTW: My flash geometry: page size 2048+64, 128 pages per block.
***************My log *******************
GC Selected block 61 with 128 free, prioritised:0
yaffs: GC erasedBlocks 255 aggressive 0
Collecting page 1, 884 1 2048
Collecting page 2, 884 2 2048
Collecting page 3, 884 3 2048
Collecting page 4, 884 4 2048
Collecting page 5, 884 5 2048
Collecting page 6, 884 6 344
Collecting page 10, 635 1 2048
Collecting page 11, 635 2 2048
Collecting page 12, 635 3 2048
Collecting page 13, 635 4 2048
Collecting page 14, 635 5 2048
Collecting page 15, 635 6 2048
Collecting page 16, 635 7 2048
Collecting page 17, 635 8 2048
Collecting page 18, 635 9 2048
Collecting page 19, 635 10 2048
Collecting page 20, 635 11 2048
Collecting page 21, 635 12 2048
Collecting page 22, 635 13 2048
Collecting page 23, 635 14 2048
Collecting page 24, 635 15 2048
Collecting page 25, 635 16 2048
Collecting page 26, 635 17 2048
Collecting page 27, 635 18 2048
Collecting page 28, 635 19 2048
Collecting page 29, 635 20 2048
Collecting page 30, 635 21 2048
Collecting page 31, 635 22 2048
Collecting page 32, 635 23 2048
Collecting page 33, 635 24 2048
Collecting page 34, 635 25 1667
Collecting page 38, 649 1 1539
Collecting page 42, 664 1 1736
Collecting page 46, 413 1 2048
Collecting page 47, 413 2 2048
Collecting page 48, 413 3 2048
Collecting page 49, 413 4 1644
Collecting page 53, 423 1 2048
Collecting page 54, 423 2 2048
Collecting page 55, 423 3 2048
Collecting page 56, 423 4 2048
Collecting page 57, 423 5 2048
Collecting page 58, 423 6 2048
Collecting page 59, 423 7 2048
Collecting page 60, 423 8 2048
Collecting page 61, 423 9 2048
Collecting page 62, 423 10 2048
Collecting page 63, 423 11 1661
Collecting page 67, 433 1 2048
Collecting page 68, 433 2 2048
Collecting page 69, 433 3 2048
Collecting page 70, 433 4 2048
Collecting page 71, 433 5 2048
Collecting page 72, 433 6 714
Collecting page 76, 442 1 1980
Collecting page 80, 452 1 2048
Collecting page 81, 452 2 2048
Collecting page 82, 452 3 2048
Collecting page 83, 452 4 2048
Collecting page 84, 452 5 2048
Collecting page 85, 452 6 2048
Collecting page 86, 452 7 2048
Collecting page 87, 452 8 1812
Collecting page 91, 463 1 1965
Collecting page 95, 734 1 727
Collecting page 99, 482 1 1041
Collecting page 103, 493 1 2048
Collecting page 104, 493 2 2048
Collecting page 105, 493 3 2048
Collecting page 106, 493 4 2048
Collecting page 107, 493 5 2048
Collecting page 108, 493 6 2048
Collecting page 109, 493 7 2048
Collecting page 110, 493 8 596
Collecting page 114, 503 1 2048
Collecting page 115, 503 2 2048
Collecting page 116, 503 3 2048
Collecting page 117, 503 4 444
Collecting page 121, 258 1 2048
Collecting page 122, 258 2 2048
Collecting page 123, 258 3 2048
Collecting page 124, 258 4 2048
Collecting page 125, 258 5 2048
Collecting page 126, 258 6 2048
Collecting page 127, 258 7 675
yaffs_BlockBecameDirty block 61 state 8
yaffs: About to finally delete object 884 poid 3 inDevDeletedDir 0 hdrChunk 8310
after final delete object 884 block 61 state 3
yaffs: About to finally delete object 635 poid 3 inDevDeletedDir 0 hdrChunk 8319
after final delete object 635 block 61 state 3
yaffs: About to finally delete object 649 poid 3 inDevDeletedDir 0 hdrChunk 8347
after final delete object 649 block 61 state 3
yaffs: About to finally delete object 664 poid 3 inDevDeletedDir 0 hdrChunk 8351
after final delete object 664 block 61 state 3
yaffs: About to finally delete object 413 poid 3 inDevDeletedDir 0 hdrChunk 8355
after final delete object 413 block 61 state 3
yaffs: About to finally delete object 423 poid 3 inDevDeletedDir 0 hdrChunk 8362
after final delete object 423 block 61 state 3
yaffs: About to finally delete object 433 poid 3 inDevDeletedDir 0 hdrChunk 8376
after final delete object 433 block 61 state 3
yaffs: About to finally delete object 442 poid 3 inDevDeletedDir 0 hdrChunk 8385
Allocated block 61, seq 4189, 255 left
<===================================block is allocated to store the
hdr chunk of object 442 during yaffs_DoGenericObjectDeletion
after final delete object 442 block 61 state 4
<===============================block state changed!!!!!
yaffs: About to finally delete object 452 poid 3 inDevDeletedDir 0 hdrChunk 8389
after final delete object 452 block 61 state 4
yaffs: About to finally delete object 463 poid 3 inDevDeletedDir 0 hdrChunk 8400
after final delete object 463 block 61 state 4
yaffs: About to finally delete object 734 poid 3 inDevDeletedDir 0 hdrChunk 8404
after final delete object 734 block 61 state 4
yaffs: About to finally delete object 482 poid 3 inDevDeletedDir 0 hdrChunk 8408
after final delete object 482 block 61 state 4
yaffs: About to finally delete object 493 poid 3 inDevDeletedDir 0 hdrChunk 8412
after final delete object 493 block 61 state 4
yaffs: About to finally delete object 503 poid 3 inDevDeletedDir 0 hdrChunk 8423
after final delete object 503 block 61 state 4
yaffs: About to finally delete object 258 poid 3 inDevDeletedDir 0 hdrChunk 8430
after final delete object 258 block 61 state 4
after doing required cleanups block 61 state 4
Block 61 is in state 4 after gc, should be erased
GC Selected block 2 with 126 free, prioritised:0