Rapid crash recovery for flash storage
Recovery is expedited for crashes involving flash memory. Rather than requiring an entire flash memory to be read to reconstruct lost information, only a subset of the memory need be read thereby reducing system down time, among other things. In particular, state information such as a logical to physical mapping is captured via a checkpoint operation periodically. Moreover, a deterministic usage pattern is employed to facilitate recovery of actions performed after a checkpoint.
1. A system to facilitate crash recovery with respect to flash storage, comprising:
at least one processor coupled to at least one computer readable storage medium storing instructions executable by the at least one processor to implement:
an acquisition component configured to acquire checkpoint data;
a selection component configured to select a deterministic flash usage pattern from among a plurality of deterministic flash usage patterns respectively corresponding to a plurality of deterministic flash usage pattern generating mechanisms; and
a restoration component configured to restore a flash processing state as a function of the checkpoint data and a deterministic flash usage pattern selected by the selection component, wherein the selected deterministic flash usage pattern is to be employed to identify changes made after a checkpoint.
2. The system of claim 1 , further comprising a checkpoint component configured to capture the checkpoint data at least one of periodically or upon occurrence of one or more events.
3. The system of claim 2 , wherein the checkpoint data includes a logical to physical mapping.
4. The system of claim 1 , wherein the selection component is further configured to identify a hybrid of the deterministic flash usage pattern generating mechanisms for use at least in part as a function of application characteristics.
5. The system of claim 1 , wherein the selected deterministic flash usage pattern corresponds to a list that identifies free and/or dirty space.
6. The system of claim 1 , is wherein the selected deterministic flash usage pattern corresponds to a log that identifies at least one of free or dirty space.
7. The system of claim 1 , wherein the plurality of deterministic flash usage pattern generating mechanisms include a sequence generation function.
8. The system of claim 4 , wherein the plurality of deterministic flash usage pattern generating mechanisms include a pseudorandom sequence generation function.
9. The system of claim 4 , wherein the selection component is configured to select the deterministic flash usage pattern at least in part as a function of application characteristics.
10. The system of claim 1 , wherein the acquisition component, the selection component and the restoration component form at least part of at least one of a flash driver or microcontroller.
11. A method to facilitate rapid crash recovery with respect to flash memory, comprising:
generating a checkpoint comprising state information pertaining to flash memory utilization;
selecting a deterministic manner of storage usage from among a plurality of deterministic manners of storage usage;
persisting additional checkpoint information pertaining to the selected deterministic manner of storage usage after a checkpoint; and
recovering flash memory state information after a crash utilizing the checkpoint and additional checkpoint information.
12. The method of claim 11 , wherein the persisting additional checkpoint information comprises storing a free storage unit list.
13. The method of claim 11 , wherein the persisting additional checkpoint information comprises storing logs identifying free space usage.
14. The method of claim 13 , further comprising storing the logs prior to making any changes.
15. The method of claim 13 , further comprising generating and storing log entries identifying at least one of dirty space erasure or block erasure.
16. The method of claim 11 , wherein the persisting additional checkpoint information comprises identifying a position in a sequence.
17. The method of claim 16 , further comprising reading the position and identifying further positions based on a sequence generation function.
18. The method of claim 17 , further comprising utilizing a pseudo-random sequence generation function.
19. The method of claim 11 , further comprising:
reading a subset of data from flash memory in accordance with the additional information; and
updating a state captured by the checkpoint as a function of the subset of data.
20. A computer-readable storage medium storing instructions, the instructions to, if executed by a computing device, cause the computing device to perform operations comprising:
selecting a deterministic flash usage pattern for usage of a flash memory from among a plurality of deterministic flash usage patterns, based at least in part on an application using the flash memory; and
recovering changes made subsequent to a checkpoint taken of a state of the flash memory at least in part as a function of the selected deterministic flash usage pattern.