US6606717B1ExpiredUtility

Cache control method and system for mixed streaming and non-streaming data

Assignee: WESTERN DIGITAL TECH INCPriority: Jul 31, 2000Filed: Jul 31, 2000Granted: Aug 12, 2003
Est. expiryJul 31, 2020(expired)· nominal 20-yr term from priority
G06F 12/0866G06F 2212/312
89
PatentIndex Score
159
Cited by
7
References
12
Claims

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.

Claims

exact text as granted — not AI-modified
We claim:  
     
       1. 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.  
     
     
       2. The method for caching disk data of  claim 1 , wherein the step of receiving a host command for non-streaming data further comprises the steps of: 
       checking the lossy state record and if the lossy state record is true, transferring a subset of the cached data blocks to the host wherein the subset comprises the cached data blocks preceding the data block having an error; and  
       scheduling a disk operation to recover the data block having an error.  
     
     
       3. The method for caching disk data of  claim 1 , wherein: 
       the host command is a mode-change host command in that the host command is for streaming data following a previous command for non-streaming data or the host command is for non-streaming data following a previous command for streaming data; and  
       the plurality of data blocks remain cached in the memory segment for the mode-change host command.  
     
     
       4. 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.  
     
     
       5. The apparatus for caching disk data of  claim 4 , wherein for a host command for non-streaming data, the means for determining further: 
       checks the lossy state record and if the lossy state record is true, transfers a subset of the cached data blocks to the host wherein the subset comprises the cached data blocks preceding the data block having an error; and  
       schedules a disk operation to recover the data block having an error.  
     
     
       6. The apparatus for caching disk data of  claim 4 , wherein: 
       the host command is a mode-change host command in that the host command is for streaming data following a previous command for non-streaming data or the host command is for non-streaming data following a previous command for streaming data; and  
       the plurality of data blocks remain cached in the memory segment for the mode-change host command.  
     
     
       7. 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.  
     
     
       8. The method for caching disk data of  claim 4 , wherein the step of receiving a host command for non-streaming data further comprises the step of scheduling a disk operation to recover the data block having an error. 
     
     
       9. The method for caching disk data of  claim 4 , wherein: 
       the host command is a mode-change host command in that the host command is for streaming data following a previous command for non-streaming data or the host command is for non-streaming data following a previous command for streaming data; and  
       the plurality of data blocks remain cached in the memory segment for the mode-change host command.  
     
     
       10. 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.  
     
     
       11. The disk drive for caching disk data of  claim 10 , wherein the control circuitry for scheduling a disk operation to recover the data block having an error. 
     
     
       12. The disk data for caching disk data of  claim 10 , wherein: 
       the host command is a mode-change host command in that the host command is for streaming data following a previous command for non-streaming data or the host command is for non-streaming data following a previous command for streaming data; and  
       the plurality of data blocks remain cached in the memory segment for the mode-change host command.

Join the waitlist — get patent alerts

Track US6606717B1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.