A disk drive is disclosed comprising a cache buffer for caching data written
to
the disk and data read from the disk, the cache buffer comprising a plurality of
cache segments linked together to form a plurality of cache links. At least one
segment attribute is associated with each cache segment, including an allocation
state, and at least one link attribute is associated with the segment attributes
within each cache link. When a host command is received from a host computer, the
link attributes are evaluated to allocate cache segments for a cache link associated
with the host command.