1. Field of the Invention
The present invention relates to a method, system, and computer program product for providing versioning in a storage device.
2. Description of the Related Art
A solid state drive controller manages read and write requests to a solid state storage device, such as a flash disk. The controller may write new data to a different location on the solid state storage device to distribute new writes so as to avoid continually overwriting the same location, which can reduce the life of the solid state storage device. As the storage capacity of solid state storage devices increases and cost decreases, solid state storage devices are being increasingly deployed in storage environments and in some deployments are replacing hard disk drives.
There is a need in the art to provide additional functionality and storage options for solid state storage devices.
Provided are a computer program product, system and method for managing Input/Output (I/O) requests to a storage device. A write request is received having write data for a logical address in the storage device. A determination is made as to whether preserve mode is enabled. A first entry is located in a volume control table for the logical address indicating a version number of the data in the storage device for the logical address and a first physical location in the storage device having the data for the logical address. The write data is written to a second physical location in the storage device. A second entry is added to the volume control table for the logical address to write in response to determining that the preserve mode is enabled. In response to determining that the preserve mode is enabled, the volume control table is updated to have one of the first and second entry for the logical address point to the second physical location and have the version number indicate a current version and to have the first or second entry not indicating the current version to indicate the first physical location and the version number indicate a previous version.
The controller 2 may persistently store the VCT 10 and preservation setting 12 in the storage device 4 or some other non-volatile persistent storage in the controller 2 and load into the memory 8 to access. In alternative embodiments, the volume control table 10 and preservation setting 12 may be stored in a storage device external with respect to the controller 2 to provide a persistent storage of control table 10 and preservation setting 12.
The controller 2 may communicate using different storage protocols, such as Small Computer System Interface (SCSI), Universal Serial Bus (USB), etc. The storage device 4 may be comprised of one or more storage devices, such as a solid state storage device comprised of solid state electronics, such as a EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, flash disk, storage-class memory (SCM), etc., magnetic storage disk, optical disk, tape, etc. The memory 8 may comprise one or more volatile or non-volatile memory devices. The I/O manager 6 may be implemented with hardware logic, such as an Application Specific Integrated Circuit (ASIC), or as a programmable processor executing code in a computer readable storage medium.
In one embodiment, the controller 2 may comprise a hardware component in a computer system 50, such as shown in
Alternatively, some or all of the I/O manager 6 code may be implemented as software loaded into the memory 54 and executed by the processor 52. The storage controller 2 may operate within a server, enterprise storage server, blade server, storage controller card, etc., or other computer devices known in the art, such as workstations, personal computers, laptops, servers, personal digital assistants (PDAs), telephony devices, etc.
If there is available storage space for the new write (from the yes branch of block 252) or after deallocating an entry 100 for physical location to make space available (from block 260), the I/O manager 6 writes (at block 262) the write data to an available physical location in the storage device 4. If (at block 264) preserve mode is not enabled, i.e., enabled flag 150 of the preservation setting 12 indicates disabled, then the I/O manager 6 updates (at block 266) the entry 100 for the logical address 102 to update having the current version to set the physical location 104 field in the entry 100 to the new physical location to which the data is written. Control then ends. If (at block 264) preserve mode is enabled and if (at block 268) the preservation setting 12 indicates a number of versions limit 152, then the I/O manager 6 determines (at block 270) whether an increase in the number of versions for the logical address due to the write causes the number of previous versions in storage to exceed the number of versions limit 152. If creating a new version as a result of the write will cause the number of versions for the logical address to exceed the limit, then the I/O manager 6 deallocates (at block 272) the VCT entry 100 for the logical address having the oldest version number to limit the number of entries for the logical address to the number of versions limit 152.
If (at block 268) there is no number of versions limit 152 or if (at block 270) increasing the number of versions for the logical address will not exceed the number of versions limit, and if (at block 274) the preservation setting 12 indicates a version storage capacity limit 154, then the I/O manager 6 determines (at block 276) whether an increase in storage including data that is not the current version, i.e., used by previous versions, as a result of creating a new previous version due to the write, causes storage for previous versions to exceed the version storage capacity 154. If (at block 276) the version storage capacity 154 will be exceeded, then the I/O manager 6 deallocates (at block 278) a VCT entry 100 for a logical address having a previous version number to limit the amount of space used by previous versions to the version storage capacity 154. The deallocated VCT entry 100 may be for the oldest version of the logical address being updated or for a previous version of another logical address, such as an oldest version that has been in the VCT table 10 the longest. After deallocating an entry 100 (at block 272 or 278) or if no entry 100 needs to be deallocated to satisfy the preservation settings 152 and/or 154 (from the no branch of block 274), the I/O manager 6 reduces (at block 280) the version number 106 for each entry 100 for the logical address 102 to write in the VCT 10 to indicate a further previous version. The I/O manager 6 then adds (at block 282) a new entry 100 to the VCT 6 for the logical address to write, setting the physical location field 104 to the physical location to which the data is written in the storage device 4 and to indicate the version number 106 as having a current version number. This new entry 100 may be added at the head pointer 122 in the VCT 10.
Described embodiments provide for the storage of multiple versions for a logical address in storage devices, such as solid state storage devices, by maintaining information on the versions in a volume control table. Further, with described embodiments, the preservation settings may be altered to allow for modifications to the number of previous versions to maintain for a logical address and a storage capacity limit for previous versions. Further, with described embodiments, the read request may specific a version number to return of the requested data.
The described operations may be implemented as a method, apparatus or computer program product using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof. Accordingly, aspects of the embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.” Furthermore, aspects of the embodiments may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied thereon.
Any combination of one or more computer readable medium(s) may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
Aspects of the present invention are described below with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
The terms “an embodiment”, “embodiment”, “embodiments”, “the embodiment”, “the embodiments”, “one or more embodiments”, “some embodiments”, and “one embodiment” mean “one or more (but not all) embodiments of the present invention(s)” unless expressly specified otherwise.
The terms “including”, “comprising”, “having” and variations thereof mean “including but not limited to”, unless expressly specified otherwise.
The enumerated listing of items does not imply that any or all of the items are mutually exclusive, unless expressly specified otherwise.
The terms “a”, “an” and “the” mean “one or more”, unless expressly specified otherwise.
Devices that are in communication with each other need not be in continuous communication with each other, unless expressly specified otherwise. In addition, devices that are in communication with each other may communicate directly or indirectly through one or more intermediaries.
A description of an embodiment with several components in communication with each other does not imply that all such components are required. On the contrary a variety of optional components are described to illustrate the wide variety of possible embodiments of the present invention.
Further, although process steps, method steps, algorithms or the like may be described in a sequential order, such processes, methods and algorithms may be configured to work in alternate orders. In other words, any sequence or order of steps that may be described does not necessarily indicate a requirement that the steps be performed in that order. The steps of processes described herein may be performed in any order practical. Further, some steps may be performed simultaneously.
When a single device or article is described herein, it will be readily apparent that more than one device/article (whether or not they cooperate) may be used in place of a single device/article. Similarly, where more than one device or article is described herein (whether or not they cooperate), it will be readily apparent that a single device/article may be used in place of the more than one device or article or a different number of devices/articles may be used instead of the shown number of devices or programs. The functionality and/or the features of a device may be alternatively embodied by one or more other devices which are not explicitly described as having such functionality/features. Thus, other embodiments of the present invention need not include the device itself.
The illustrated operations of
The foregoing description of various embodiments of the invention has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is intended that the scope of the invention be limited not by this detailed description, but rather by the claims appended hereto. The above specification, examples and data provide a complete description of the manufacture and use of the composition of the invention. Since many embodiments of the invention can be made without departing from the spirit and scope of the invention, the invention resides in the claims hereinafter appended.
This application is a continuation of U.S. patent application Ser. No. 12/749,186, filed on Mar. 29, 2010, which issued as U.S. Pat. No. 8,473,700 on Jun. 25, 2013, which is a continuation of U.S. patent application Ser. No. 13/860,481, filed Apr. 10, 2013, which patent and patent applications are incorporated herein by reference in their entirety.
Number | Date | Country | |
---|---|---|---|
Parent | 13860481 | Apr 2013 | US |
Child | 14197097 | US | |
Parent | 12749186 | Mar 2010 | US |
Child | 13860481 | US |