You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uint32_tdwLogAge; /* log age - uses a global counter starting from 0 */
20
21
uint16_twVbn; /* the virtual block number of log block */
21
22
uint16_twLbn; /* the logical block number of log block */
22
-
uint16_t*paPOffsetL2P; /* L2P page offset mapping table *//* size - PAGES_PER_SUBLK * sizeof(UInt16) functionality - maps pages of a logical block inside the block */
23
+
uint32_tpaPOffsetL2P; /* L2P page offset mapping table *//* size - PAGES_PER_SUBLK * sizeof(UInt16) functionality - maps pages of a logical block inside the block */
23
24
uint16_twFreePOffset; /* free page offset in log block *//* the next physical page to write to */
24
25
uint16_twNumOfValidLP; /* the number of valid page *//* the number of valid pages in the log - stay the same when rewriting a page */
25
26
uint32_tboolCopyMerge; /* can be copymerged or not *//* ??? */
@@ -48,9 +49,9 @@ typedef struct
48
49
uint32_tadwECTablePtrs[MAX_NUM_OF_EC_TABLES]; /* page address of the Erase Counter table */
49
50
uint32_tadwLOGCxtMapPtrs[MAX_NUM_OF_LOGCXT_MAPS]; /* page address of the LOGCxt map table */
50
51
51
-
uint16_t*pawMapTable; /* cached map table logical blocks to virtual blocks - value will be recalculated in FTL_Init */
52
-
uint16_t*pawECCacheTable; /* cached Erase counter table - value will be recalculated in FTL_Init - data is recovered from the last valid Erase Map in case of power failure */
53
-
uint16_t*pawLOGCxtMapTable; /* pointer to the map of the logs - this is a pointer and will be calculated in the Init - data can be restored if the info is flushed */
52
+
uint32_tpawMapTable; /* cached map table logical blocks to virtual blocks - value will be recalculated in FTL_Init */
53
+
uint32_tpawECCacheTable; /* cached Erase counter table - value will be recalculated in FTL_Init - data is recovered from the last valid Erase Map in case of power failure */
54
+
uint32_tpawLOGCxtMapTable; /* pointer to the map of the logs - this is a pointer and will be calculated in the Init - data can be restored if the info is flushed */
uint32_tdwMetaWearLevelCounter; /* used to decide whether the index info super blocks need to be replaced or not (slows down VFL Cxt blocks wear) */
@@ -63,7 +64,7 @@ typedef struct
63
64
64
65
// this code was added Apr 4th 2007
65
66
uint32_tadwRCTablePtrs[MAX_NUM_OF_EC_TABLES]; /* page address of the Read Counter table */
66
-
uint16_t*pawRCCacheTable; /* cached Erase counter table - value will be recalculated in FTL_Init - data is recovered from the last valid Erase Map in case of power failure */
67
+
uint32_tpawRCCacheTable; /* cached Erase counter table - value will be recalculated in FTL_Init - data is recovered from the last valid Erase Map in case of power failure */
printf("Writing HFS partition offset %d to virtual page %d (writing to bank %d, page %d)\n", i*BYTES_PER_PAGE, (FTL_CXT_SECTION_START+1) *PAGES_PER_SUBLOCK+i, bank, pbi*PAGES_PER_BLOCK+pib);
146
+
write_page(page, (uint8_t*)spare, bank, pbi*PAGES_PER_BLOCK+pib);
0 commit comments