A method of operating a disk drive, the disk drive comprising a disk having a plurality of tracks, each track comprising a plurality of blocks and a plurality of embedded servo sectors recorded at a predetermined interval, and a head actuated radially over the disk, the method comprising the steps of:
- (a) receiving a first command from a host computer, the first command comprising a command size representing a number of blocks of read data to read from the disk;
- (b) executing the first command by reading the read data from a selected one of the tracks and executing a read-ahead operation by reading read-ahead data from the disk following the read data;
- (c) pre-computing first seek parameters to seek the head to a continuation track storing at least part of the read-ahead data;
- (d) receiving a second command from the host computer;
- (e) computing an abort window in response to the second command for aborting the read-ahead operation of the first command;
- (f) pre-computing second seek parameters to seek the head to a target track of the second command;
- (g) processing the embedded servo sectors to detect when the head enters the abort window;
- (h) if the head enters the abort window, programming the disk drive with the second seek parameters to seek the head to the target track of the second command;
- and
- (i) if the read-ahead operation requires a seek to the continuation track prior to the head entering the abort window, programming the disk drive with the first seek parameters to seek the head to the continuation track.