A magnetoresistive state-solid state storage device having arrays of magnetoresistive
storage cells. Sparing resources such as a plurality of spare rows are allocated
to replace rows of storage cells which are affected by physical failures. A count
is made for the number of failed rows within each array, and a count is also made
of the number of failed rows within a cross-array row set spread across plural
arrays. A spare row or rows are allocated by selecting a cross-array row set affected
by the highest number of failed rows and therefore most likely to lead to unreliable
data storage, and then selecting an array in this cross-array row set having the
lowest number of failed rows, and therefore the least competition for sparing resources.
The method proceeds iteratively with counts updated as sparing resources are allocated.