YAFFS_BLOCK_STATE_DIRTY, // All pages have been allocated and deleted. \r
// Erase me, reuse me.\r
\r
- YAFFS_BLOCK_STATE_DEAD = 0x99 // This block has failed and is not in use\r
+ YAFFS_BLOCK_STATE_DEAD = 0x77 // This block has failed and is not in use\r
\r
} yaffs_BlockState;\r
\r
__u32 pageBits; // bitmap of pages in use\r
__u8 blockState; // One of the above block states\r
__u8 pagesInUse; // number of pages in use\r
+ __u8 needsRetiring:1; // Data has failed on this block, need to get valid data off\r
+ // and retire the block.\r
} yaffs_BlockInfo;\r
\r
\r
int nBlockErasures;\r
int nGCCopies;\r
int nRetriedWrites;\r
+ int nRetiredBlocks;\r
\r
yaffs_Object *rootDir;\r
yaffs_Object *lostNFoundDir;\r
\r
+ // Buffer areas for storing data to recover from write failures\r
+ __u8 bufferedData[YAFFS_CHUNKS_PER_BLOCK][YAFFS_BYTES_PER_CHUNK];\r
+ yaffs_Spare bufferedSpare[YAFFS_CHUNKS_PER_BLOCK];\r
+ int bufferedBlock; // Which block is buffered here?\r
+ int doingBufferedBlockRewrite;\r
+ \r
+ int blockSelectedForGC;\r
+ \r
\r
};\r
\r
- typedef struct yaffs_DeviceStruct yaffs_Device;\r
+typedef struct yaffs_DeviceStruct yaffs_Device;\r
\r
\r
\r