Patent ID: 7930480

Claim:
A data storage device comprising: a data storing medium for storing file system identifier data in a master boot record, the file system identifier data identifying one of a plurality of file systems; a sector buffer in which write data to the data storing medium and/or read data from the data storing medium are temporally stored; a cache mode determining section configured to determine at a start-up time, a cache mode that is suitable for the file system based on the file system identifier data stored on the data storing medium, wherein the cache mode is one of a plurality of cache modes comprising: a) no specific feature; b) Write Back Read Cache; c) Inhibit Read Abort Operation; d) Write Back Read Cache and Inhibit Read Abort Operation; e) Read Before Pending Write and Inhibit Read Abort Operation; and f) Write Back Read Cache and Read Before Pending Write and Inhibit Read Abort Operation; a cache mode table having registered therein the plurality of file systems, wherein the cache mode table associates each file system with a corresponding cache mode, and the cache mode table includes each of the plurality of cache modes including: a) no specific feature, b) Write Back Read Cache, c) Inhibit Read Abort Operation, d) Write Back Read Cache and Inhibit Read Abort Operation, e) Read Before Pending Write and Inhibit Read Abort Operation, and f) Write Back Read Cache and Read Before Pending Write and Inhibit Read Abort Operation; and a control section handling the sector buffer according to the determined cache mode, wherein the cache mode is a method for processing the write data and/or the read data stored in the sector buffer and for controlling execution of write commands and read commands received from a host; wherein the cache mode is determined by reading the master boot record to identify a file system associated with the host and identified by the file system identifier data and by using the identified file system to access the cache mode table to determine the cache mode that is suitable for the file system, the cache mode being determined when the host is started and prior to transmission of user data; wherein when the cache mode is a Write Back Read Cache mode, then if data to be read by a received read command corresponds to write data held in the sector buffer, the write data is returned to the host regardless of whether or not the write data has been written to the data storing medium; wherein when the cache mode is a Inhibit Read Abort Operation cache mode, then if a write command is received while data is being looked ahead, a current read operation is aborted and processing of the write command is started; and wherein when the cache mode is a Read Before Pending Write cache mode, then processing of a subsequent read command is executed before processing of a preceding write command.