Patent ID: 7827469

Claim:
A storage system, comprising: a plurality of storage elements for storing information comprising data and a parity; a storage controller for controlling transfer of said information between said plurality of storage elements and at least one host, said storage controller comprising: a parity unit comprising a script table for storing as a plurality of scripts, each of said scripts defining a set of relationships between said parity and said data, and a nexus table for storing a plurality of nexuses, each nexus comprising a plurality of sector addresses in said plurality of storage elements; a computer system coupled to said parity unit for creating said plurality of scripts; a mapping engine coupled to said parity unit for mapping an address asserted by said at least one host into an address space of said plurality of storage elements and for identifying one of said plurality of scripts stored in said script table by issuing a buffer instruction to said parity unit when said storage controller receives a write command and write data from said at least one host; and a buffer, for storing information in transit between said at least one host and said plurality of storage elements, wherein each script comprises a set of instructions and respectively corresponds to a failure mode of a set of at least one failed storage elements, such that said parity unit is capable of regenerating information previously stored on the set of at least one failed storage element by executing said set of instructions, each instruction in each script including at least a first field for selecting one of said nexuses in said buffer instruction, the first field comprising: a first subfield for indicating whether to treat said instruction as a no operation (NOP) instruction; a second subfield for indicating whether said second field stores said sector address offset or said number of sectors; a third subfield for indicating whether said instruction corresponds to a beginning of a chain of exclusive OR operations; a fourth subfield for indicating whether said instruction corresponds to a last instruction in said script; a fifth subfield for indicating whether said instruction is associated with a source or a destination; and a sixth subfield for selecting one of the plurality of nexuses in a buffer instruction.