Patent ID: 7627725

Claim:
A stored data processing apparatus for use in a storage apparatus that performs at least write processing for a storage medium on which data is allocated in units of a first block having a predetermined data length, the first block is allocated in units of a second block constituted by a plurality of the first blocks, and a third block having the same data length as the first block is allocated in correspondence with the second block, comprising: a management information storage section that stores, for each second block, management information including information indicating whether the third block corresponding to the second block is valid or invalid; a calculation section that performs calculation for each bit position using data of all the first blocks in an update target in the case where the management information stored in the management information storage section indicates that the third block corresponding to the second block specified as the update area is invalid and outputs a result of the calculation as calculation data; a write section that writes the calculation data output from the calculation section in the third block associated with the update target and validates the third block in the management information stored in the management information storage section; and a read section that reads out data from the first block that has been specified as a read target, sets the first block from which data has not normally been read out as an error block in the case where the data read has failed, reads out normal data which is data of all the first blocks other than the error block in the second block in the case where the management information stored in the management information storage section indicates that the third block corresponding to the second block including the read target is valid, and reads out redundant data which is data of the third block corresponding to the second block, wherein the calculation section further performs calculation for each bit position using the normal data and redundant data and outputs a result of the calculation as data of the error block.