A disk drive is disclosed comprising a disk, a head actuated over the
disk, and a history array for storing a plurality of history records,
wherein each history record having a history range identifying a range of
sector addresses proximate the sector address of a host command. As new
host commands are received, the sector address of each host command is
compared to the history records in the history array. A counter is
adjusted in response to each comparison, and an operating mode of the
disk drive is configured into a new operating mode if the counter exceeds
a threshold, wherein the configuring includes adjusting at least one of
the history range and the threshold relative to the new operating mode.