Method for controlling disk drive
First Claim
1. A method for controlling a disk drive including a storage medium;
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
receiving a write command from the host;
reading out a logical block address included in the write command, when converting the read logical block address into a physical block address of the storage medium, converting the read logical block address into the next physical block address of a physical block address at which data has been written most recently so that data can be written to an unused area of the storage medium in an append manner;
writing data specified by the host at the converted physical block address; and
writing a value of the logical block address specified by the host to a management area corresponding to the converted physical block address.
2 Assignments
0 Petitions
Accused Products
Abstract
Embodiments of the invention achieve data write in an appending manner by conversion from a logical block address to a physical block address in a HDD that has only one storage device and does not have a large-scale cache memory. In one embodiment, a check is made as to whether or not the size of an address translation table in a cache memory exceeds a threshold value. If the size exceeds the threshold value, entries whose number is specified are selected by the LRU method. The selected entries are added to a WRITE buffer, and the address translation table is saved on the HDD by executing WRITE. Seek time of a head at the time of WRITE is reduced, thereby improving WRITE performance. There is produced an effect of building such a snapshot that while a usual access to a HDD volume is allowed, it is possible to make an access to a volume of the snapshot which is a past state of the HDD. Disabling write after writing to the HDD is disabled. Thus, it possible to roll back to a HDD state at an arbitrary point of time.
238 Citations
27 Claims
-
1. A method for controlling a disk drive including a storage medium;
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
receiving a write command from the host;
reading out a logical block address included in the write command, when converting the read logical block address into a physical block address of the storage medium, converting the read logical block address into the next physical block address of a physical block address at which data has been written most recently so that data can be written to an unused area of the storage medium in an append manner;
writing data specified by the host at the converted physical block address; and
writing a value of the logical block address specified by the host to a management area corresponding to the converted physical block address. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 20, 21, 25, 26)
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
-
9. A method for controlling a disk drive including a storage medium;
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
receiving a read command from the host;
reading out a logical block address included in the read command;
reading out an entry corresponding to the logical block address from an address translation table in a temporary storage area, said address translation table storing as one entry the correspondence between a logical block address and a physical block address;
reading out a physical block address from the read entry;
reading out data at the physical block address of the storage medium; and
transmitting the read data to the host. - View Dependent Claims (10, 27)
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
-
11. A method for controlling a disk drive including a storage medium;
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
receiving a read command from the host;
reading out a logical block address included in the read command;
reading out an entry corresponding to the logical block address from an address translation table capable of storing the correspondences of all logical block addresses and all physical block addresses, which can be specified by the host, in a specific area on the storage medium;
reading out a physical block address from the read entry;
reading out data at the physical block address of the storage medium; and
transmitting the read data to the host.
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
-
12. A method for controlling a disk drive including a storage medium;
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
initializing an address translation table in a temporary storage area, said address translation table storing as one entry the correspondence between a logical block address and a physical block address;
starting from a physical block address at which a write has been made most recently, searching for a block of the storage medium in which the address translation table has been saved, in the direction of lower physical block address;
reading out the block in which the address translation table has been saved, said block having been found by the searching, and then restoring the address translation table in the temporary storage area by use of the block;
starting from the next physical block address of the saved block toward a physical block address at which a write has been made most recently, reading out a physical block address of the block, and from a management area corresponding to the physical block address, reading out a logical block address that has been specified by the host when writing at the physical block address; and
storing as one entry the correspondence between the physical block address and the logical block address in the address translation table in the temporary storage area. - View Dependent Claims (15, 16)
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
-
13. A method for controlling a disk drive including a storage medium;
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
initializing an address translation table in a temporary storage area, said address translation table storing as one entry the correspondence between a logical block address and a physical block address;
starting from the lowest physical block address of the storage medium toward a physical block address at which a write has been made most recently, reading out a physical block address of a block, and from a management area corresponding to the physical block address, reading out a logical block address that has been specified by the host when writing at the physical block address; and
storing as one entry the correspondence between the physical block address and the logical block address in the address translation table.
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
-
14. A method for controlling a disk drive including a storage medium;
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
initializing an address translation table in a temporary storage area, said address translation table storing as one entry the correspondence between a logical block address and a physical block address;
starting from the lowest physical block address of the storage medium toward a physical block address at which a write has been made most recently, searching for a block in which the address translation table has been saved;
reading out the block in which the address translation table has been saved, said block having been found by the searching, and then adding the block to the address translation table in the temporary storage area;
comparing the number of entries stored in the address translation table with the allowable number of entries that is separately specified;
as a result of the comparison, if the number of stored entries exceeds the allowable number of entries, selecting entries to be deleted, the number of which is separately specified, from entries that are least recently used, in decreasing order of elapsed time after the last use;
deleting the selected entries from the address translation table;
starting from the next physical block address of the saved block, which has been read last, toward a physical block address at which a write has been made most recently, reading out a physical block address of the block, and from a management area corresponding to the physical block address, reading out a logical block address that has been specified by the host when writing at the physical block address; and
storing as one entry the correspondence between the physical block address and the logical block address in the address translation table in the temporary storage area.
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
-
17. A method for controlling a disk drive including a storage medium;
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
setting a value of the upper limit physical block address to be handled on the storage medium;
starting from the lowest physical block address toward the upper limit physical block address to be handled, for each block, checking whether or not the host is writing at a physical block address higher than the physical block address for the same logical block address as a value of the logical block address that has been specified by the host when writing at a physical block address of the block;
if the host is writing at the higher physical block address, writing, in a management area corresponding to the block, a dirty flag indicating that written data at the same logical block address is overwritten by the higher physical block address; and
starting from the lowest physical block address toward a physical block address at which a write has been made most recently, for each block, moving a block having no dirty flag in the direction of a lower physical block address so that the block having a dirty flag is overwritten.
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
-
18. A method for controlling a disk drive including a storage medium;
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
setting a value of the upper limit physical block address to be handled on the storage medium;
initializing a second address translation table in a temporary storage area, said address translation table storing as one entry the correspondence between a logical block address and a physical block address;
starting from the lowest physical block address toward the upper limit physical block address to be handled, reading out a physical block address of a block, and from a management area corresponding to the physical block address, reading out a logical block address that has been specified by the host when writing at the physical block address;
storing as one entry the correspondence between the physical block address and the logical block address in the second address translation table; and
when receiving a request from the host, enabling a mechanism to access the storage medium, said mechanism performing address conversion between a physical block address and a logical block address by use of the second address translation table.
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
-
19. A method for controlling a disk drive including a storage medium;
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
setting a value of the lower limit physical block address to be handled on the storage medium;
starting from the lower limit physical block address to be handled toward a physical block address at which a write has been made most recently, disabling written blocks for initialization;
initializing an address translation table in a temporary storage area, said address translation table storing as one entry the correspondence between a logical block address and a physical block address;
starting from the lowest physical block address toward the lower limit physical block address to be handled, reading out a physical block address of a block, and from a management area corresponding to the physical block address, reading out a logical block address that has been specified by the host when writing at the physical block address; and
storing as one entry the correspondence between the physical block address and the logical block address in the address translation table.
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
-
22. A method for controlling a disk drive including a storage medium;
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
receiving from the host a write command or a read command that accesses a logical block address which does not exist on the storage medium;
checking whether or not the logical block address is an address for receiving a control command;
if the logical block address is an address for receiving a control command, and at the same time, if the received command is a write command, reading out data in a data area of the write command;
checking whether or not the data is a control command of the disk drive;
if the data is a control command, executing the control command;
if the logical block address is an address for receiving a control command, and at the same time, the received command is a read command, reading out management information of the storage medium corresponding to the received logical block address; and
transmitting the read management information to the host.
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
-
23. A method for controlling a disk drive including a storage medium;
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
checking whether or not a command received from the host is a read command that requests a direct reference to an internal data structure of the storage medium;
if the command is a read command requesting a direct reference, seeking to an address that has been specified by the host as a logical block address, as a physical block address on the storage medium;
reading out user data stored in a block, and management data stored in a management area corresponding to the block; and
transmitting the user data and the management data to the host.
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
-
24. A method for controlling a disk drive including a storage medium;
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
checking whether or not a command received from the host is a read command for reading management data stored in a management area of the storage medium;
if the command is a read command for reading management data, reading out management data stored in a management area corresponding to a block, an address specified by the host as a logical block address being used as a physical block address in the storage medium; and
transmitting the management data to the host.
- and a control unit that transmits/receives a command and data to/from a host to control write or read to or from the storage medium, said method comprising;
Specification