| CPC G06F 12/0223 (2013.01) | 18 Claims |

|
1. A method for updating a redundant arrays of independent disks (RAID) 5 check value, comprising:
acquiring an update instruction for a data stripe, wherein the update instruction is carried with new state values of data blocks to be updated;
searching an established rule library for a matched check value update rule according to a proportion of all the data blocks to be updated in the data stripe and a usage state of the data stripe; and
processing the new state values of the data blocks to be updated by using the check value update rule to obtain a new check value of the data stripe;
wherein the rule library comprises: a first check value update rule corresponding to a situation where the proportion is zero and the data stripe has not been used; a second check value update rule corresponding to a situation where the proportion is zero and the data stripe has been used; a third check value update rule corresponding to a situation where the proportion is not zero and satisfies a pre-set condition; a fourth check value update rule corresponding to a situation where the proportion is not zero and does not satisfy the pre-set condition;
wherein the first check value update rule means that the new check value of the data stripe is determined according to new state values of all the data blocks to be updated; the second check value update rule means that the new check value of the data stripe is determined according to an original check value of the data stripe and the new state values of all the data blocks to be updated; the third check value update rule means that the new check value of the data stripe is determined according to state values of data blocks not required to be updated in the data stripe and the new state values of all the data blocks to be updated; the fourth check value update rule means that the new check value of the data stripe is determined according to the original check value of the data stripe, original state values of all the data blocks to be updated and the new state values of all the data blocks to be updated.
|