Flash Recovery Employing Transaction Log
First Claim
1. A method to be executed at least in part in a computing device for flash memory recovery employing a transaction log, the method comprising:
- during flash memory operations, generating the transaction log comprising a chained sequence of blocks specifying performed flash memory operations;
performing a checkpoint by writing an entire flash memory state into a specified location in the flash memory;
upon completing the checkpoint, deleting all transaction log entries, wherein a final checkpoint is performed prior to a flash driver unload during a safe shutdown;
if the flash memory is initialized following the safe shutdown, loading the entire flash state based on the final checkpoint; and
if the flash memory is initialized following an unexpected shutdown without performing a complete checkpoint prior to the flash driver unload, recovering the flash memory state by scanning transaction log entries after a last checkpoint.
2 Assignments
0 Petitions
Accused Products
Abstract
A transaction log for flash recovery includes a chained sequence of blocks specifying the operations that have been performed, such as a write to a sector or an erase to a block. Checkpoints are performed writing the entire flash state to flash. Once a checkpoint is performed, all of the log entries prior to the checkpoint are deleted and the log processing on recovery begins with the latest checkpoint. If the system is able to safely shutdown, then a checkpoint may be performed before the driver unloads, and on initialization, the entire persisted flash state may be loaded into the flash memory with a minimal amount of flash scanning. If a power failure occurs during system operation, then on the next boot-up, only the sectors or blocks specified in the log entries after the latest checkpoint have to be scanned, rather than all the sectors on the part.
-
Citations
20 Claims
-
1. A method to be executed at least in part in a computing device for flash memory recovery employing a transaction log, the method comprising:
-
during flash memory operations, generating the transaction log comprising a chained sequence of blocks specifying performed flash memory operations; performing a checkpoint by writing an entire flash memory state into a specified location in the flash memory; upon completing the checkpoint, deleting all transaction log entries, wherein a final checkpoint is performed prior to a flash driver unload during a safe shutdown; if the flash memory is initialized following the safe shutdown, loading the entire flash state based on the final checkpoint; and if the flash memory is initialized following an unexpected shutdown without performing a complete checkpoint prior to the flash driver unload, recovering the flash memory state by scanning transaction log entries after a last checkpoint. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. A computing device capable of flash memory recovery employing a transaction log, comprising:
-
a flash memory; and a processor coupled to the flash memory arranged to execute; a flash driver configured to interact with flash memory hardware, implement programming and erasing algorithms, and implement error correction algorithms; a flash abstraction layer configured to process input/output requests from a file system, implement wear-leveling operations, maintain data integrity, and manage recovery following an unexpected shutdown by recovering flash memory state employing the transaction log recorded during regular flash memory operations and a checkpoint reflecting an entire state of the flash memory at a time point prior to the unexpected shutdown; and the file system. - View Dependent Claims (17, 18)
-
-
19. A computer-readable storage medium with instructions stored thereon for flash memory recovery employing a transaction log, the instructions comprising:
-
during flash memory operations, generating the transaction log comprising a chained sequence of blocks specifying performed flash memory operations; performing a checkpoint by writing an entire flash memory state into a specified location in the flash memory; upon completing the checkpoint, deleting all transaction log entries, wherein a final checkpoint is performed prior to a flash driver unload during a safe shutdown; if the flash memory is initialized following the safe shutdown, loading the entire flash state based on the final checkpoint; and if the flash memory is initialized following an unexpected shutdown without performing a complete checkpoint prior to the flash driver unload, recovering the flash memory state by; scanning each block from a beginning of the flash memory until a block with a special log bit is found in order to locate the transaction log, wherein each log block is identified by the special log bit in a spare area of the flash memory within each corresponding sector; upon locating the block with the special log bit, locating a remainder of the transaction log by following forward and backward pointers in each block of the transaction log; and locating a last checkpoint by starting at an end of the transaction log and examining each log entry backwards until the last checkpoint is found. - View Dependent Claims (20)
-
Specification