Hi YAFFSers Before doing this check in, I placed a tag on CVS called "Pre-retirement-changes" so those of you who want the pre-changed stuff can still get it. The retirement changes better implement the policies recommended by flash manufacturers. The previous policy was to retire a block if it showed any misbehaviour (ie any ecc errors or erasure check failures). Now we only retire blocks when the write fails. Depending on flash geometry, the most common cause of these retirements was caused by partial page writes failing the erasure checks (or for those brave souls who were not doing erasure checks, these would shjow up as ecc failures). So now we do a bit more clever handling of erasured page checking. Erased checking *was* an all or nothing affair controlled by YAFFS_DISABLE_CHUNK_ERASED_CHECK. Erasure checking every page is costly (for those that like it fast), so the erasure checking has been made a bit smarter..... Now erasure checking is controlled by YAFFS_ALWAYS_CHECK_CHUNK_ERASED. If this is ON you get what you used to have: paranoid erasure checks. If this is OFF then you get the new cleverness: 1) After moiunt-time scanning we set a blockInfo flag to say that erasure checking should be performed on pages in this block. 2) If the flag is set, we do an erasure check before any write. 3) If the erasure check passes on the first page we look at, then we assume that the rest of the pages will pass and turn off the blockInfo flag. 4) If we get a successful erasure on a block we also turn off the flag. The only real leap of faith in the above is item (3). The rationale is that the most likely cause of an erasure check failing is a partial page write caused by power loss during the write. If so, then this should only happen with the first page in the block that we try to allocate. Suggest you be paranoid if you don't need/want the speed and during driver/hardware development. -- Charles