File system for a data storage device having a power fail recovery mechanism for write/replace operations
First Claim
1. In a data storage device under control of microprocessor and having storage locations for storing files written to the data storage device, a method is provided for preventing a microprocessor stall during reboot of the microprocessor and initialization of the data storage device, the method comprising the steps:
- writing files to a first storage area of the data storage device;
tagging those files successfully written to the first storage area of the data storage device with a first tag; and
commencing initialization of the data storage device upon reboot of the microprocessor, the data storage device initialization forming a garbage collection routine comprising the steps oftagging files stored in the first storage area of the data storage device comprising unwanted files which are no longer desired for use with a second tag, anderasing files stored in the first storage area of the data storage device comprising files not tagged with the first tag and files tagged with the second tag.
5 Assignments
0 Petitions
Accused Products
Abstract
The present invention provides a method and apparatus in a data storage device of a data storage system under the control of a microprocessor for preventing a microprocessor stall upon the occurrence of a power failure during read/write operations. During normal operations, files are written to a first storage area of the data storage device where a first flag associated with each file is set when the writing of the respective file has successfully completed. Upon the occurrence of a power failure, a data storage device initialization routine is commenced upon reboot of the microprocessor. During initialization, an analysis phase is begun to generate sequences of events for at least those files not having the first flag set. The events comprise memory operations and associated data and are each re-executable upon interruption of its execution and before execution of another event without modifying results of a previous execution of the respective event. The events generated are then written to an event storage area in the data storage device. During an execution phase of the data storage device initialization, the events are retrieved and executed by the microprocessor to cause the files having at least the first flag set to be written in a compacted manner to storage locations in a second storage area of the memory device to maintain the integrity of those files. Subsequently, the first storage area of the memory device is erased to provide additional storage space for the writing of new files to the memory device. If a power failure or system failure occurs during the two-phase initialization process, the process is re-started generally at the point where it was interrupted so as not to leave the data storage device in a partially compacted, and hence, a potentially inconsistent state.
1024 Citations
18 Claims
-
1. In a data storage device under control of microprocessor and having storage locations for storing files written to the data storage device, a method is provided for preventing a microprocessor stall during reboot of the microprocessor and initialization of the data storage device, the method comprising the steps:
-
writing files to a first storage area of the data storage device; tagging those files successfully written to the first storage area of the data storage device with a first tag; and commencing initialization of the data storage device upon reboot of the microprocessor, the data storage device initialization forming a garbage collection routine comprising the steps of tagging files stored in the first storage area of the data storage device comprising unwanted files which are no longer desired for use with a second tag, and erasing files stored in the first storage area of the data storage device comprising files not tagged with the first tag and files tagged with the second tag. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. In a data storage device under control of microprocessor and having storage locations for storing files written to the data storage device, a method is provided for preventing a microprocessor stall during reboot of the microprocessor and initialization of the data storage device, the method comprising the steps:
-
writing files to a first storage area of the data storage device; tagging those files successfully written to the first storage area of the data storage device; and commencing initialization of the data storage device upon reboot of the microprocessor, the data storage device initialization comprising the steps of generating sequences of executable events comprising memory operations and associated data for untagged files which when executed cause the untagged files to be removed from the data storage device, writing the generated events to an event storage area in the data storage device, and executing the events written to the event storage area of the data storage device to remove the untagged files from the first storage area of the data storage device. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. In a data storage system comprising a microprocessor for controlling access to a data storage device, the data storage device having storage locations for contiguously storing files written to the data storage device, a method is provided for ensuring the integrity of files written to the data storage device upon the occurrence of a failure comprising one of a power failure and a system failure in the data storage system, the method comprising the steps of:
-
(a) writing files to a first storage area of the data storage device; (b) tagging with a first tag those files successfully written to the first storage area of the data storage device; and (c) commencing initialization of the data storage device after occurrence of a failure, the initialization of the data storage device comprising the steps of (1) commencing a garbage collection analysis routine comprising the steps of (a) tagging with a second tag those files stored in the first storage area of the data storage device determined to be unwanted files no longer desired for use, and (b) writing to an event storage area of the data storage device sequences of executable events for files comprising one of files not tagged with the first tag and files tagged with the second tag, the sequences of executable events comprising memory operations and associated data which when executed cause the unwanted files to be removed from the data storage device, (2) commencing a garbage collection execution routine comprising the steps of; (a) executing the events written to the event storage area to cause the files tagged with the first tag and not tagged with the second tag to be copied from respective source storage locations in the first storage area to respective destination storage locations in a second storage area and further cause the files stored in the first storage area to be erased, and (b) setting an event executed flag for each event in the event storage area of the data storage device upon successful execution of each individual event, and (3) erasing the events stored in the event storage area of the data storage device. - View Dependent Claims (16, 17, 18)
-
Specification