Patent ID: 7640395

Claim:
A method comprising: storing a sequence of writes into a disk cache, including storing a sequence number corresponding to each write of the sequence of writes in the disk cache with metadata associated with the write, wherein a current value of the sequence number is stored in volatile memory and is saved on shutdown of a system for continuation on a next reboot of the system; ordering writes from the disk cache to a disk drive associated with the disk cache according to an order of the sequence of writes maintained in the disk cache; receiving a request to write directly to the disk drive without caching, and instead writing the data to the disk cache and not the disk drive; flushing the cache to the disk drive before permitting the direct write to the disk drive; determining whether the disk drive has been used in a system not including the disk cache, the determining including obtaining a count of spin-ups associated with the disk drive and comparing the count to a second count of spin-ups of the disk drive stored in the disk cache: and resetting the disk cache if the determination indicates the disk drive usage in the system not including the cache.