Patent ID: 8880803
Filing Date: 2014-11-04
Classification: G06F

Abstract:
1. A storage device comprising: a processor; a memory; a first input output (I/O) controller; a second I/O controller; and a storage unit; wherein the first I/O controller receives write data including at least one block datum having a predetermined size, and wherein the memory stores therein generation control information, the generation control information includes; a flag indicating whether a consecutive generation code is valid or invalid, the generation control information is being assigned to the consecutive data set; when the processor detects a first consecutive data set in the write data that includes a predetermined number of consecutive block data, assigns a new consecutive generation code to the consecutive generation code and sets the flag to valid for the detected first consecutive data set; when the processor detects a non-consecutive data set in the write data, assigns a new generation code to the block datum generation code for each block datum in the non-consecutive data set and sets the flag to invalid for the detected non-consecutive data set; wherein when a flag of a specific consecutive data set is currently valid and is to be set to invalid, assigning the new generation code to the block datum generation code of a specific block datum included in the specific consecutive data set and assigning the consecutive generation code to the block data generation code of each of the other blocks of the specific consecutive data set, and further setting the flag of the specific consecutive data set from valid to invalid, determines whether each of the block datum generation code added to each of the block datum that is read by the I/O controller is accordant with a current generation code of the read block datum that is stored in the memory or the consecutive generation code added to the first consecutive data set that is read by the I/O controller is accordant with a current consecutive generation code of the first consecutive data set that is stored in the memory; the second I/O controller adds the new block datum generation code to each of the block datum and writes each of the block datum to the storage unit or the new consecutive generation code to the first consecutive data set and writes the first consecutive data to the storage unit, and reads each of the block datum or the first consecutive data set from the storage unit.