A method of performing a write operation in a disk drive in response to a write command received from a host computer, the write command comprising a plurality of logical block addresses and a plurality of data blocks, wherein:
- the plurality of data blocks comprises at least one non-relocated data block (NRDB) and at least one relocated data block (RDB), and
- at least one of the LBAs corresponds to the at least one NRDB and at least one of the LBAs corresponds to the at least one RDB,
- the disk drive comprising:
- a disk comprising:
- a plurality of first disk locations each having a defect;
- a plurality of second disk locations for storing NRDBs;
- and
- a plurality of spare disk locations for storing RDBs;
- a defect list for mapping a LBAs from the plurality of first disk locations to the plurality of spare disk locations;
- and
- a cache logically partitioned into a first set of memory locations managed using a first cache data structure, and a second set of memory locations managed using a second cache data structure,
- the method of performing the write operation comprising the steps of:
- using the first cache data structure to store the NRDB in a first memory location selected from the first set of memory locations;
- evaluating the defect list using the LBAs to identify the RDB and using the second cache data structure to store the RDB in a second memory location selected from the second set of memory locations;
- during a first time interval established for writing NRDBs, using the first cache data structure to write the NRDB to one of the second disk locations;
- and
- during a second time interval established for writing RDBs, using the second cache data structure to write the RDB to one of the spare disk locations.