Cache control method and system for mixed streaming and non-streaming data
AssigneeWestern Digital Technologies, Inc.
InventorsSharon H. Yu, Gary K. Laatsch, Quoc N. Dang
Life of this patent
Estimating the term…
Abstract
The present invention may be embodied in a cache control method for caching disk data in a disk drive configured to receive commands for both streaming and non-streaming data from a host. A lossy state record is provided for memory segments in a cache memory. The lossy state record allows hosts commands to be mixed for streaming and non-streaming data without flushing of cache data for a command mode change.
Claims12
A method for caching disk data in a disk drive configured to receive commands for both streaming and non-streaming data from a host, the method comprising the steps of:
- providing a memory segment for caching disk data associated with a logical block address range;
- caching a plurality of data blocks in the memory segment;
- providing a lossy state record for the memory segment;
- setting the lossy state record to be true if one of the plurality of data blocks contains a data error, else setting the lossy state record to be false;
- receiving a host command specifying a commanded logical block address range and determining whether the commanded logical block address range overlaps the logical block address range cached in the memory segment;
- determining whether the host command is for streaming data or non-streaming data, and if the host command is for streaming data and the lossy state record is true, transferring the cached data blocks of the overlapping commanded logical block address range including the block containing the data error to the host;
- else if the host command is for non-streaming data:
- checking the lossy state record and if the lossy state record is false, transferring the cached data blocks of the overlapping commanded logical block address range to the host.
An apparatus for caching disk data in a disk drive configured to receive commands for both streaming and non-streaming data from a host, comprising:
- a memory segment for caching disk data associated with a logical block address range;
- means for caching a plurality of data blocks in the memory segment;
- a lossy state record for the memory segment;
- means for setting the lossy state record to be true if one of the plurality of data blocks contains a data error, else setting the lossy state record to be false;
- means for receiving a host command specifying a commanded logical block address range and determining whether the commanded logical block address range overlaps the logical block address range cached in the memory segment;
- means for determining whether the host command is for streaming data or non-streaming data, and if the host command is for streaming data and the lossy state record is true, transferring the cached data blocks of the overlapping commanded logical block address range including the block containing the data error to the host;
- else if the host command is for non-streaming data, checking the lossy state record and if the lossy state record is false, transferring the cached data blocks of the overlapping commanded logical block address range to the host.
A method for caching disk data in a disk drive configured to receive commands for both streaming and non-streaming data from a host, the method comprising the steps of:
- providing a memory segment for caching disk data associated with a logical block address range;
- caching a plurality of data blocks in the memory segment, wherein at least one of the data blocks comprises a data error and at least one of the data blocks is error free;
- receiving a host command specifying a commanded logical block address range and determining whether the commanded logical block address range overlaps the logical block address range cached in the memory segment;
- if the host command is for streaming data, transferring the cached data blocks of the overlapping commanded logical block address range including the data block containing the data error to the host;
- and
- if the host command is for non-streaming data, transferring the at least one error free cached data block of the overlapping commanded logical block address range to the host.
A disk drive for caching disk data, the disk drive configured to receive commands for both streaming and non-streaming data from a host, the disk drive comprising:
- a memory segment for caching a plurality of data blocks associated with a logical block address range, wherein at least one of the data blocks comprises a data error and at least one of the data blocks is error free;
- control circuitry for:
- receiving a host command specifying a commanded logical block address range and determining whether the commanded logical block address range overlaps the logical block address range cached in the memory segment;
- if the host command is for streaming data, transferring the cached data blocks of the overlapping commanded logical block address range including the data block containing the data error to the host;
- and
- if the host command is for non-streaming data, transferring the at least one error free cached data block of the overlapping commanded logical block address range to the host.
Dependencies are inferred from the claim text.