Patent ID: 8065479

Claim:
In a storage system having a storage controller coupled to a plurality of disk drives wherein the storage controller has a cache memory and wherein each disk drive of the plurality of disk drives has a local cache memory controlled by a local disk controller of each disk drive, a method operable in the storage controller comprising: receiving a write request having associated write data from an attached host device; in response to receiving the write request, performing the steps of; allocating one or more empty blocks of memory in the cache memory of the storage controller to store the write data; storing the write data in the allocated blocks and; marking each of the allocated blocks as a dirty block; determining, subsequent to receipt of the write request, that one or more dirty blocks should be flushed from the cache memory to one or more disk drives of the plurality of disk drives; in response to the determination to flush the one or more dirty blocks, performing the steps of: transferring the one or more dirty blocks to the one or more disk drives using the local cache memory of each of the one or more disk drives in a write-back mode of operation; and marking each of the transferred dirty blocks as a written block; determining, subsequent to the determination to flush the dirty blocks, that the written blocks should be flushed from the local cache memory of the one or more disk drives; in response to the determination to flush the written blocks, performing the step of: forcing the flushing of local cache memory of each of the one or more disk drives; determining subsequent to the forcing of flushing whether the flushing has succeeded or failed; in response to the determination that the flushing succeeded, performing the step of: marking each of the flushed written blocks as a clean block; and in response to the determination that the flushing failed, performing the step of: marking each of the flushed written blocks as a dirty block.