Technical Field
This disclosure relates to data storage systems for computer systems. More particularly, the disclosure relates to fast saving of data during power interruption.
Description of the Related Art
Data storage systems maintain host data and system data in memory. During operation, certain data is maintained in volatile memory. When power loss or interruption is experienced, data should be moved from volatile memory to non-volatile memory in order to maintain data integrity. It is desirable to provide more efficient mechanisms for saving data during power loss and maintaining data integrity.
Systems and methods that embody the various features of the invention will now be described with reference to the following drawings, in which:
While certain embodiments are described, these embodiments are presented by way of example only, and are not intended to limit the scope of protection. Indeed, the novel methods and systems described herein may be embodied in a variety of other forms. Furthermore, various omissions, substitutions, and changes in the form of the methods and systems described herein may be made without departing from the scope of protection.
Overview
A data storage system may experience unexpected power interruption or power loss during which the data storage system may operate using backup power. A backup power source may provide power for only a short duration of time during which the data storage system needs to save critical data to ensure integrity of the data. Disclosed systems and methods can ensure data integrity even when the reliability of backup power sources is an issue. In one embodiment, by skipping the updating and saving of system data while operating on backup power, significant reduction of time for saving critical data can be achieved. System data can be restored next time the data storage system is restarted.
System Overview
In some embodiments, non-volatile solid-state memory array 150 is divided into physical blocks, which are further divided into physical pages (or F-pages). A block (such as blocks A through N) can represent the smallest grouping of memory cells that can be erased in a single operation or as a unit, and a page (such as pages a, b, through n) can represent the smallest grouping of memory cells that can be programmed in a single operation or as a unit. While a single memory array 150 is illustrated for convenience, the data storage system 120 may include a plurality of memory arrays.
The controller 130 can be configured to receive data and/or storage access commands from a storage interface module 112 (e.g., a device driver) of a host system 110. Storage access commands communicated by the storage interface module 112 can include write data and read data commands issued by the host system 110. Read and write commands can specify a logical address (e.g., logical block addresses or LBAs) used to access the data storage system 120. The controller 130 can execute the received commands in the memory array 150.
Data storage system 120 can store data communicated by the host system 110. In other words, the data storage system 120 can act as memory storage for the host system 110. To facilitate this function, the controller 130 can implement a logical interface. The logical interface can present to the host system 110 data storage system's memory as a set of logical addresses (e.g., contiguous address) where host or user data can be stored. Internally, the controller 130 can map logical addresses to various physical locations or addresses in the memory 150. The controller 130 includes a buffer 132, which can comprise volatile memory, such RAM, SRAM, DRAM, SDRAM, etc. In one embodiment, the buffer 132 is external to the controller 130. The controller 130 also includes a data integrity module 134 configured to monitor and maintain the integrity of data stored in the data storage system 120. In some embodiments, the data integrity module 134 maintains integrity of the data when the data storage system 120 experiences a power interruption or loss condition.
In some embodiments, buffer 132 (or volatile memory 140) can be utilized as cache memory, such as write cache buffer for the memory array 150. For example, even if the data storage system 120 does not claim support for write cache or expose write cache to the host system 110 or when the host system 110 does not request or enable write cache support, the data storage system 120 may still cache a small amount of host data for various reasons, such as in order to improve write performance. In such cases, however, the data storage system 120 should ensure integrity of host data, particularly in the event that the data storage system experiences a sudden or unexpected power loss. That is, the data storage system 120 should move cached host data from the buffer 132 to the non-volatile memory 150.
Data storage system 120 includes a primary power source 160 and a backup power source 170. The primary power source 160, which can be an alternating current (AC) or direct current (DC) power source, is configured to provide power to the data storage system 120 during normal operation. The backup power source is configured to provide temporary power to the data storage system 120 when primary power is interrupted or lost. The backup power source can include one or more power storage devices. In one embodiment, the backup power source includes one or more capacitors, such as one or more onboard capacitors or super-capacitors.
In some embodiments, the data storage system 120 maintains a map or mapping between logical addresses used by the host system 120 and physical memory locations in the non-volatile solid-state memory array 150. The mapping may be maintained as a table and/or any other suitable data structure. Physical memory location corresponding to a given logical address (e.g., LBA) may change as a result of host data being moved. For example, host data can be moved within the memory array 150 due to one or more housekeeping operations, such as garbage collection (e.g., reclaiming memory space used by invalid data), wear leveling (e.g., spreading out the write load substantially evenly across memory pages and/or blocks), memory refresh (e.g., periodically refreshing stored data), bad block management (e.g., discovering and not using for storage unreliable memory blocks), etc. In addition, when the host system 110 writes data for a particular logical address, the mapping for this logical address usually changes because data is stored in a different physical memory location. For example, the host system 110 can store data for a LBA, which is programmed in physical address 102,167. At a later time, the host system 110 can update the data for the LBA, which is written to physical address 1,029. Data stored at physical address 102,167 becomes invalid, and mapping for the LBA is updated to reflect the physical address 1,029 where latest data is stored.
In certain embodiments, the data storage system 120 records or tracks the changes to the mapping, such as the change described in the above example, in a mapping table. The mapping table can be structured to provide a look-up of a physical address corresponding to a logical address, and the table can be indexed based on the logical addresses. In various embodiments, the table is indexed based on physical addresses. In some embodiments, the data storage system 120 further creates metadata that provides logical-to-physical mapping and stores the metadata along with host data in memory. This can be advantageous for performing reverse lookup, such as during execution of housekeeping operations, in cases when the mapping table is indexed based on the logical addresses. For example, the data storage system 120 can use the metadata to determine which logical address a particular physical address corresponds to.
In certain embodiments, non-volatile solid-state memory array 150 includes multiple channels and each channel contains multiple dies. The dies can be accessed (read or programmed) concurrently, and utilizing the dies concurrently can increase performance. In order to take advantage of this parallelism, the memory array 150 blocks can be organized into Super Blocks.
In some embodiments, the data storage system 120 maintains bands for various types of data stored in the non-volatile solid-state memory array 150. Bands may be collections of Super Blocks managed together as independent flash management system. The data storage system 120 can maintain a data band and a system band. A data band can contain host data and may include hot and cold blocks for storing, respectively, incoming data received from the host and valid data that has been garbage collected. System band contains non-host system data, such as flash management system data, metadata, and the like.
In certain embodiments, the data storage system 120 maintains a Super Block Journal (S-Journal) which contains mapping information for a Super Block. For example, S-Journal contains logical-to-physical (and/or physical-to-logical) mapping information for a given Super Block, and S-Journal can be used to track the host data written to the given superblock in the data band. Effectively, S-Journal includes a history of host commands ordered chronologically. S-Journal data can be periodically flushed or written to the non-volatile solid-state memory array 150, such as written to the system band. According to one embodiment, the S-Journal may constitute main flash management data written to the media.
In some embodiments, because the logical-to-physical mapping may be stored or kept in the volatile memory 140, such as for faster access, it necessarily must be rebuilt upon startup or any other loss of power to the volatile memory. This, therefore, requires some mechanism and information to be stored in a non-volatile memory that will enable the data storage system 120 to reconstruct the logical-to-physical mapping before the data storage system (e.g., via the controller 130) can “know” where logical data is stored in the non-volatile solid-state memory array 150 after startup and/or after a power-fail event. According to one embodiment, such mechanism and information may be embodied the S-Journal. In one embodiment, each S-Journal may cover a pre-determined range of physical pages, and each S-Journal may comprise a plurality of journal entries, with each entry being configured to associate one or more physical pages to a logical page. According to one embodiment, each time the data storage system 120 is powered-up, restarted, or whenever the logical-to-physical mapping needs to be rebuilt, the controller 130 reads S-Journal data (e.g., from the system band) and, using the information stored in S-Journal entries, rebuilds the logical-to-physical mapping. The mapping may then be loaded into the volatile memory 140.
Saving of Data During Power Interruption or Loss
In various embodiments, incoming (or hot) host data can be partially of fully cached in the buffer 132 before being written to the non-volatile solid-state memory array 150. Upon normal shutdown or restart of the data storage system 120, it may save or flush host data from the buffer 132 to the non-volatile memory array 150 along with performing other shutdown operations, including for example updating the logical-to-physical mapping, creating S-Journal data (or logical-to-physical mapping) and updating the S-Journal, and saving other system data. When power is lost or interrupted, the data storage system 120 may be powered by the backup power source 170. In some embodiments, the backup power source 170 provides power for a short period of time, and hence the data storage system 120 needs to perform shutdown operations quickly before power has been exhausted.
In some embodiments, the process of saving data during power interruption or loss is performed faster and more efficiently by flushing host data from the buffer 132 along with a metadata or header that includes, for example, logical-to-physical mapping. In certain embodiments, the header can include physical-to-logical-mapping or a combination of physical-to-logical and logical-to-physical mapping. For example, suppose that X is the Super Block location or number of the currently active Super Block from the hot data band (e.g., X may correspond to Super Block 310 illustrated in
If in block 402 the process 400 determines that power was lost or interrupted unexpectedly (and the data storage system 120 is operating on backup power), the process transitions to block 408 where it saves memory locations of non-volatile memory array 150 regions where host data will be (or has already been) flushed. The amount of data saved in block 408 is small in comparison with system data updated and saved in block 406. The process 400 can quickly save the minimum amount of data in block 408. In one embodiment, the process 400 saves this information to a boot block in the non-volatile solid-state memory array 150 where start-up or boot data is saved. Boot block can be a fixed known location that is accessed statically or can be a block that is accessed dynamically via, for example, a pointer. Boot block can be a page, collection of pages, block, collection of blocks (e.g., Super Block), etc. In one embodiment, the process 400 saves critical system data to the boot block so that the data storage system 120 can restart correctly and so that data integrity is maintained on restart after power loss. For example, the process 400 can save the following data to the boot block: Super Block numbers X and Y, atomic write information (e.g., table and/or sequence number), and file system directory. Atomic write information is saved in case the host system 110 requested an atomic write operation during which the power interruption or loss event occurred, so that atomic write data can be rolled back when the data storage system 120 restarts. In one embodiment, saved system data fits into a page of the memory array 150. The process 400 transitions to block 410 where it writes cached (or hot) host data to the memory array 150. For example, host data can be programmed in Super Block numbers X and Y. The process 400 also stores one or more headers with mapping data (or metadata), such as logical-to-physical mapping. The mapping may takes up N bytes (where N is a small integer number) for each solid-state memory page. In one embodiment, process 400 performs the same operations in block 410 as in block 404.
In some embodiments, when an unexpected power loss event occurs, the data storage system 120 saves cached host data without updating the logical-to-physical mapping or the S-Journal. Not performing these updates saves time. In one embodiment, system and cold data bands are closed or shutdown when unexpected power loss event is detected. In addition, because system data stored in the volatile memory 140 (e.g., S-Journal) is not updated, volatile memory 140 can be powered off or shutdown earlier to save power, provided that operations in blocks 408 and 410 do not utilize the volatile memory or after the volatile memory no longer needs to be accessed. For example, the volatile memory 140 can be powered off when cached host data has been saved in the non-volatile memory array 150 and/or otherwise retrieved from the volatile memory. In one embodiment, volatile memory 140 comprises more than one portion (e.g., module), and one portion of the volatile memory 140 is used for caching host data. Such caching portion of the volatile memory 140 can be one or more DDR modules. The caching portion of the volatile memory 140 can be powered off or shutdown (e.g., by turning of the clock signal(s)) when cached host data has been saved in the non-volatile memory array 150 and/or otherwise retrieved from the volatile memory. Other portions of the volatile memory 140 may continue to be operational, for example, for use by the controller 130.
Resuming Operation Following Power Interruption or Loss
In various embodiments, when the data storage system 120 resumes normal operation (powered by the primary power source 160), it needs to restore the system data that was not saved during unexpected power interruption or loss. For example, the mapping needs to be restored. In one embodiment, the data storage system 120, via the controller 130, accesses the boot block and determines the location of Super Blocks numbers X and Y using saved Super Block numbers. Super Blocks numbers X and Y are scanned for header data that contains mapping data, and mapping data is used to restore the logical-to-physical mapping.
In block 510, the process 500 initializes the data storage system 120 by loading in block 512 updated logical-to-physical map (indexed by logical addresses or LBAs) and by loading in block 514 updated physical-to-logical map (indexed by physical addresses or PBAs). Logical-to-physical map can be reconstructed from saved system data and can be loaded into the volatile memory 140. For example, logical-to-physical map can be reconstructed from saved S-Journal. The process 500 transitions to block 520 where normal operation of the data storage system 120 resumes. As is illustrated, the data storage system 120 can, for instance, store incoming host data in the non-volatile solid-state memory array 150 and also store logical-to-physical mapping entry corresponding to stored incoming host data.
In block 530, the process 500 determines whether power interruption or loss condition has occurred. If no such condition has occurred, the process 500 transitions back to block 520. If power interruption or loss condition has occurred, the process 500 determines in block 532 whether this condition is unexpected. If not, the process 500 transitions to block 534 where it updates and saves in the memory array 150 critical system data. The process 500 then transitions to block 536, where it saves cached (or hot) host data in the memory array 150. In one embodiment, the process 500 also generates and saves one or more headers with mapping data to the memory array 150 along with cached host data. The process 500 shuts down the data storage system 120. If in block 532 the process 500 determines that the power interruption or loss condition is unexpected, the process transitions to block 536 where it saves cached host data as explained above.
Disclosed systems and methods ensure integrity of data during unexpected power interruption of loss. Critical data is saved quickly and efficiently using backup power. Disclosed systems and methods can advantageously ensure data integrity even when the reliability of backup power sources, such as power capacitors, is an issue. In one embodiment, by skipping the updating and saving of system data while operating on backup power, significant reduction of time for saving critical data can be achieved. System data can be restored next time the data storage system is restarted. Accordingly, improvements of data storage system reliability are attained. In addition, performance is a data storage system is increased.
Other Variations
Those skilled in the art will appreciate that in some embodiments, other approaches and methods can be used. For example, additional or alternative data may be saved during power interruption of loss. The data storage system can be a hard disk drive, hybrid hard disk, etc. The actual steps taken in the disclosed processes, such as the processes illustrated in
While certain embodiments of the disclosure have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the disclosure. Indeed, the novel methods, devices and systems described herein may be embodied in a variety of other forms. Furthermore, various omissions, substitutions and changes in the form of the methods and systems described herein may be made without departing from the spirit of the disclosure. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the disclosure. For example, those skilled in the art will appreciate that in various embodiments, the actual physical and logical structures may differ from those shown in the figures. Depending on the embodiment, certain steps described in the described examples and processes may be performed in different order, removed, and others may be added. Also, the features and attributes of the specific embodiments disclosed above may be combined in different ways to form additional embodiments, all of which fall within the scope of the present disclosure. Although the present disclosure provides certain preferred embodiments and applications, other embodiments that are apparent to those of ordinary skill in the art, including embodiments which do not provide all of the features and advantages set forth herein, are also within the scope of this disclosure. Accordingly, the scope of the present disclosure is intended to be defined only by reference to the appended claims.
This application claims priority to provisional U.S. Patent Application Ser. No. 61/834,229, filed on Jun. 12, 2013, which is hereby incorporated by reference in its entirety.
Number | Name | Date | Kind |
---|---|---|---|
6856556 | Hajeck | Feb 2005 | B1 |
7126857 | Hajeck | Oct 2006 | B2 |
7430136 | Merry, Jr. et al. | Sep 2008 | B2 |
7447807 | Merry et al. | Nov 2008 | B1 |
7502256 | Merry, Jr. et al. | Mar 2009 | B2 |
7509441 | Merry et al. | Mar 2009 | B1 |
7596643 | Merry, Jr. et al. | Sep 2009 | B2 |
7653778 | Merry, Jr. et al. | Jan 2010 | B2 |
7685337 | Merry, Jr. et al. | Mar 2010 | B2 |
7685338 | Merry, Jr. et al. | Mar 2010 | B2 |
7685374 | Diggs et al. | Mar 2010 | B2 |
7733712 | Walston et al. | Jun 2010 | B1 |
7765373 | Merry et al. | Jul 2010 | B1 |
7898855 | Merry, Jr. et al. | Mar 2011 | B2 |
7912991 | Merry et al. | Mar 2011 | B1 |
7936603 | Merry, Jr. et al. | May 2011 | B2 |
7962792 | Diggs et al. | Jun 2011 | B2 |
8037232 | Chu | Oct 2011 | B2 |
8078918 | Diggs et al. | Dec 2011 | B2 |
8090899 | Syu | Jan 2012 | B1 |
8095851 | Diggs et al. | Jan 2012 | B2 |
8108692 | Merry et al. | Jan 2012 | B1 |
8122185 | Merry, Jr. et al. | Feb 2012 | B2 |
8127048 | Merry et al. | Feb 2012 | B1 |
8135903 | Kan | Mar 2012 | B1 |
8151020 | Merry, Jr. et al. | Apr 2012 | B2 |
8161227 | Diggs et al. | Apr 2012 | B1 |
8166245 | Diggs et al. | Apr 2012 | B2 |
8243525 | Kan | Aug 2012 | B1 |
8254172 | Kan | Aug 2012 | B1 |
8261012 | Kan | Sep 2012 | B2 |
8296625 | Diggs et al. | Oct 2012 | B2 |
8312207 | Merry, Jr. et al. | Nov 2012 | B2 |
8316176 | Phan et al. | Nov 2012 | B1 |
8316257 | Royer et al. | Nov 2012 | B2 |
8341339 | Boyle et al. | Dec 2012 | B1 |
8375151 | Kan | Feb 2013 | B1 |
8380944 | Dumitru et al. | Feb 2013 | B2 |
8380945 | Ye et al. | Feb 2013 | B2 |
8392635 | Booth et al. | Mar 2013 | B2 |
8397101 | Goss et al. | Mar 2013 | B2 |
8397107 | Syu et al. | Mar 2013 | B1 |
8407449 | Colon et al. | Mar 2013 | B1 |
8423722 | Deforest et al. | Apr 2013 | B1 |
8433858 | Diggs et al. | Apr 2013 | B1 |
8443167 | Fallone et al. | May 2013 | B1 |
8447920 | Syu | May 2013 | B1 |
8458435 | Rainey, III et al. | Jun 2013 | B1 |
8478930 | Syu | Jul 2013 | B1 |
8489854 | Colon et al. | Jul 2013 | B1 |
8503237 | Horn | Aug 2013 | B1 |
8521972 | Boyle et al. | Aug 2013 | B1 |
8549236 | Diggs et al. | Oct 2013 | B2 |
8583835 | Kan | Nov 2013 | B1 |
8601311 | Horn | Dec 2013 | B2 |
8601313 | Horn | Dec 2013 | B1 |
8612669 | Syu et al. | Dec 2013 | B1 |
8612804 | Kang et al. | Dec 2013 | B1 |
8615681 | Horn | Dec 2013 | B2 |
8638602 | Horn | Jan 2014 | B1 |
8639872 | Boyle et al. | Jan 2014 | B1 |
8683113 | Abasto et al. | Mar 2014 | B2 |
8700834 | Horn et al. | Apr 2014 | B2 |
8700950 | Syu | Apr 2014 | B1 |
8700951 | Call et al. | Apr 2014 | B1 |
8706985 | Boyle et al. | Apr 2014 | B1 |
8707104 | Jean | Apr 2014 | B1 |
8713066 | Lo et al. | Apr 2014 | B1 |
8713357 | Jean et al. | Apr 2014 | B1 |
8719531 | Strange et al. | May 2014 | B2 |
8724422 | Agness et al. | May 2014 | B1 |
8725931 | Kang | May 2014 | B1 |
8745277 | Kan | Jun 2014 | B2 |
8751728 | Syu et al. | Jun 2014 | B1 |
8769190 | Syu et al. | Jul 2014 | B1 |
8769232 | Suryabudi et al. | Jul 2014 | B2 |
8775720 | Meyer et al. | Jul 2014 | B1 |
8782327 | Kang et al. | Jul 2014 | B1 |
8788778 | Boyle | Jul 2014 | B1 |
8788779 | Horn | Jul 2014 | B1 |
8788880 | Gosla et al. | Jul 2014 | B1 |
8793429 | Call et al. | Jul 2014 | B1 |
9201783 | Song | Dec 2015 | B2 |
9286198 | Bennett | Mar 2016 | B2 |
20060072369 | Madter et al. | Apr 2006 | A1 |
20090327589 | Moshayedi | Dec 2009 | A1 |
20100174849 | Walston et al. | Jul 2010 | A1 |
20100217920 | Song | Aug 2010 | A1 |
20100250793 | Syu | Sep 2010 | A1 |
20110099323 | Syu | Apr 2011 | A1 |
20110239043 | Vedder et al. | Sep 2011 | A1 |
20110283049 | Kang et al. | Nov 2011 | A1 |
20120239853 | Moshayedi | Sep 2012 | A1 |
20120254503 | Chiu et al. | Oct 2012 | A1 |
20120260020 | Suryabudi et al. | Oct 2012 | A1 |
20120278531 | Horn | Nov 2012 | A1 |
20120284460 | Guda | Nov 2012 | A1 |
20120324191 | Strange et al. | Dec 2012 | A1 |
20130132638 | Horn et al. | May 2013 | A1 |
20130145106 | Kan | Jun 2013 | A1 |
20130290793 | Booth et al. | Oct 2013 | A1 |
20140059405 | Syu et al. | Feb 2014 | A1 |
20140101369 | Tomlin et al. | Apr 2014 | A1 |
20140115427 | Lu | Apr 2014 | A1 |
20140133220 | Danilak et al. | May 2014 | A1 |
20140136753 | Tomlin et al. | May 2014 | A1 |
20140149826 | Lu et al. | May 2014 | A1 |
20140157078 | Danilak et al. | Jun 2014 | A1 |
20140181432 | Horn | Jun 2014 | A1 |
20140223255 | Lu et al. | Aug 2014 | A1 |
20150012690 | Bruce et al. | Jan 2015 | A1 |
Number | Date | Country | |
---|---|---|---|
61834229 | Jun 2013 | US |