Patent ID: 8032782

Claim:
A processor-implemented method of providing a RAID engine, comprising; accepting an access request comprising any of the following I/O operations: a read request, a write request, a file read request, a file write request, a block read request, a block write request, a stripe rebuild request, a stripe scrub request, and a stripe migrate request; accepting a metadata input comprising a layout description and, optionally, a plurality of resource optimization objectives; accepting a dynamic input comprising a dynamic state of an I/O stack comprising the RAID engine and a fault configuration of a plurality of storage devices in the I/O stack; accepting a generator matrix input comprising information about a RAID code used by one or more of the I/O operations; transforming the write request, wherein the transforming of the write request comprises: constructing a plurality of affected parity vectors, preparing a plurality of failure vectors as required by a degraded layout; computing a plurality of inverse matrices; generating a plurality of sub-plans by combining individual vectors, reblockinq the vectors as per the physical layout; and generating a write I/O plan comprising the inverse matrices for performing individual device reads, XORs and writes; transforming the read request, wherein the transforming of the read request comprises: determining if any faults exist in one or more of the storage devices that prevent a successful read, wherein if faults exist, performing the following steps: computing a pseudo-inverse matrix of the generator matrix input for the RAID code; translating the pseudo-inverse matrix for consideration to device reads and XORs; and generating a read I/O plan for performing individual device reads and XORs; implementing RAID scrubbing by generating a parity check matrix based on the generator matrix input for the RAID code and utilizing the parity check matrix to ensure that all elements in the RAID code maintain the necessary RAID relationship at all times; and providing an optimizer for optimizing I/O plans for available hardware resources.