WO2011091761A1 - 存储设备和数据存储方法 - Google Patents

存储设备和数据存储方法 Download PDF

Info

Publication number
WO2011091761A1
WO2011091761A1 PCT/CN2011/070728 CN2011070728W WO2011091761A1 WO 2011091761 A1 WO2011091761 A1 WO 2011091761A1 CN 2011070728 W CN2011070728 W CN 2011070728W WO 2011091761 A1 WO2011091761 A1 WO 2011091761A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
management data
storage module
incremental
data
Prior art date
Application number
PCT/CN2011/070728
Other languages
English (en)
French (fr)
Inventor
杨继涛
柯乔
张琴
李欣
Original Assignee
成都市华为赛门铁克科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 成都市华为赛门铁克科技有限公司 filed Critical 成都市华为赛门铁克科技有限公司
Publication of WO2011091761A1 publication Critical patent/WO2011091761A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1441Resetting or repowering

Definitions

  • a flash memory in an SSD solid state disk
  • the management data information of the flash memory in the SSD is the key data required for the SSD to process the data, and the management data information is, for example, a logical block address (Logo Block Address; hereinafter referred to as LBA) of the host side and a physical block address of the storage medium of the flash memory.
  • LBA Logo Block Address
  • PBA Physical Block Address
  • Embodiments of the present invention provide a storage device and a data storage method, which effectively improve data storage reliability of an SSD.
  • the embodiment of the invention provides a storage device, including a data storage module, and a management data storage module, configured to manage the data storage module for data processing after the storage device receives the data processing request sent by the host.
  • Management data information including a data storage module, and a management data storage module, configured to manage the data storage module for data processing after the storage device receives the data processing request sent by the host.
  • An incremental information storage module configured to store incremental information of management data information generated during data processing, for recovering the management in combination with the backed up management data information in the data storage module when the power is abnormally powered off
  • the management data information stored in the data storage module the incremental information storage module adopts a non-volatile storage medium
  • a controller configured to perform data processing according to the management data information, and update the management data information and the incremental information of adding the management data information according to the data processing result.
  • the embodiment of the invention provides a data storage method, including:
  • the management data information used to manage the data storage module for data processing is stored in the management data storage module;
  • the incremental information of the management data information generated in the data processing process is stored in the incremental information storage module, and is used in combination with the data storage module when the latest management data information needs to be restored after an abnormal power failure occurs.
  • the backup management data information recovers the management data information stored in the management data storage module; the incremental information storage module uses a non-volatile storage medium; performs data processing according to the management data information, and according to the data
  • the processing result updates the management data information and the incremental information of adding the management data information accordingly.
  • the storage device and the data storage method of the embodiment of the present invention use a non-volatile storage medium to store incremental information of management data information of the data storage module, for combining with the backed up management in the data storage module when the power is abnormally powered off.
  • the data information is recovered, and the management data information for managing the data storage module for data processing is recovered; the management data information of the data storage module is lost when the SSD is abnormally powered off, and the normal operation of the SSD can be ensured. It can effectively reduce or eliminate the dependence of SSD on standby power supply such as super capacitor, and improve the reliability of SSD.
  • FIG. 1 is a schematic structural diagram of a storage device according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a data storage method according to an embodiment of the present invention.
  • the technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention.
  • the embodiments are a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
  • the flash memory management data information is stored in Synchronous Dynamic Random Access Memory (SDRAM), the second generation double rate synchronous dynamic random access memory (Double Data Rate Synchronous Dynamic Random Access Memory II; hereinafter referred to as DDR II) or third-generation Double Rate Rate Synchronous Dynamic Random Access Memory III (DDR III) and other volatile memory .
  • SDRAM Synchronous Dynamic Random Access Memory
  • DDR II Double Data Rate Synchronous Dynamic Random Access Memory II
  • DDR III third-generation Double Rate Rate Synchronous Dynamic Random Access Memory III
  • the SSD and the traditional mechanical hard disk usually adopt a fixed mapping relationship
  • the mapping relationship between the logical block address LBA of the host side and the physical block address PBA of the storage medium has certain principles, but It is not fixed.
  • the mapping table for maintaining the mapping relationship between LBA and PBA is usually stored in a memory such as SDRAM, DDR II or DDR III.
  • the management data information of the flash memory may also include log information, which usually includes some status information during the operation of the SSD, especially when the SSD fails, according to The abnormal information recorded in the information of the Zhizhi is of great significance for solving the SSD failure.
  • the management data information of the flash memory may also include information such as bad block information of the FLASH chip in the flash memory and the like which are important for the SSD management.
  • the SSD controller When the SSD is to stop working, the SSD controller will back up the management data information to the flash memory. The system will be powered on next time, and then export the management data information to the SSD memory according to the backup management data information to ensure the SSD. Continue to work normally.
  • FIG. 1 is a schematic structural diagram of a storage device according to an embodiment of the present invention; as shown in FIG. 1, the storage device of the embodiment includes: a data storage module 10, a management data storage module 11, an incremental information storage module 12, and a control 13.
  • the data storage module 10 is a main storage structure of the storage device and is used to store service data.
  • the data storage module may be a flash memory and is composed of several FLASH chips.
  • the management data storage module 11 is configured to store management data information for managing the data storage module 10 for data processing. That is, the management data storage module 11 stores some key data information, that is, management data information, which manages the above-mentioned data storage module 10, in order to perform correct data processing on the data storage module 10. Since the management data information is frequently accessed during processing, the management data storage module 11 preferably uses a volatile storage medium to store management data information according to a storage mechanism of the volatile storage medium to provide high read and write. performance.
  • the management data information of the embodiment includes: a mapping relationship between the host LBA and the PBA in the FLASH chip in the data storage module 10, log information, and bad block information of the FLASH chip in the data storage module 10, and the like. Some key data information of the data storage module 10 is managed.
  • the incremental information storage module 12 is configured to store incremental information of the management data information generated during the data processing process, to recover the management data storage module in combination with the backed up management data information in the data storage module 10 when the power is abnormally powered off.
  • the management data information stored in 11; the incremental information storage module 12 preferably uses a magnetic random access memory (MRAM), a ferroelectric random access memory (FRAM) Or a high-speed nonvolatile storage medium such as a nonvolatile static random access memory (NVSRAM) or the like.
  • MRAM magnetic random access memory
  • FRAM ferroelectric random access memory
  • NVSRAM nonvolatile static random access memory
  • the controller 13 is configured to perform data processing according to the management data information, and process the data according to the data And updating the management data information and the incremental information of the management data information.
  • the controller 13 performs operation processing such as reading and writing data and deleting data in the data storage module 10 according to the management data information stored in the management data storage module 11, the corresponding management data storage module 10 is used.
  • Some key data that is, management data information, etc., will change accordingly.
  • the mapping relationship between the corresponding host LBA and the PBA in the FLASH chip in the data storage module 10 changes. Performing this data processing changes the old PBA corresponding to the LBA to correspond to a new PBA, and changes "LBA ⁇ PBA (old)" to "LBA ⁇ PBA (new)".
  • the incremental information of the mapping information between the corresponding LBA and PBA is the new PBA corresponding to the LBA, which can be recorded as "LBA ⁇ PBA (new)".
  • this data processing may also generate incremental information of log information and incremental information of bad block information.
  • the incremental information can be updated in the incremental information storage module 12, that is, the incremental information can be "LBA ⁇ PBA (new)", the incremental information of the log information, the incremental information of the bad block information, and the like, and the management data. Incremental information of the information.
  • the management data information in the management data storage module 11 is also updated based on the data processing result. In order to reduce the probability of data loss caused by abnormal power failure occurring during data update, preferably, the incremental information of the management data information in the incremental information storage module 12 is first updated according to the data processing result, and then the management data storage is updated. Management data information in module 11.
  • the incremental information of the management data information in the incremental information storage module 12 and the data storage module 10 can be obtained according to the incremental management of the management data information in the update management data storage module 11
  • the backed up management data information recovers the management data information in the management data storage module 11.
  • the management data storage module 11 storing the management data information is preferably a volatile storage medium, the storage management data information therein is backed up in the data before the power failure.
  • the backup management data information in the data storage module 10 is copied to the management data storage module 11 for efficient data processing by the storage device. Therefore, a data management information is always backed up in the data storage module 10.
  • the incremental information storage module 12 When the power is abnormally powered off, since the incremental information storage module 12 preferably uses a non-volatile storage medium Quality, even if the power is abnormally turned off, the incremental information of the management data information stored by the incremental information storage module 12 is not lost. At this time, in combination with the incremental information of the management data information stored in the incremental information storage module 12 and the management data information backed up in the data storage module 10, the management data information stored in the management data storage module 11 at the time of power failure can be restored. This ensures the normal operation of the storage device.
  • the storage device of this embodiment may be a solid state drive SSD.
  • the storage device of the embodiment stores the management data information by using the non-volatile storage medium to store the incremental information of the management data information, and the management data storage module 11 of the volatile storage medium is used to ensure that the storage device is abnormally powered off.
  • the management data information stored in the management data storage module 11 can be reconstructed according to the incremental information of the management data information stored in the non-volatile storage medium and the management data information backed up in the data storage module 10;
  • the technical solution ensures the access speed of the storage device and also improves the reliability of the storage device.
  • the incremental information storage module 12 in this embodiment may specifically adopt a magnetic random access memory (MRAM), a ferroelectric random access memory (FRAM), or A high-speed nonvolatile storage medium such as a nonvolatile static random access memory (NVS) or the like, which can be directly read and written without requiring a flash memory.
  • MRAM magnetic random access memory
  • FRAM ferroelectric random access memory
  • NVS nonvolatile static random access memory
  • Data can be written after erasing, before modification or by writing data. In most cases, only a small number of bytes are required to be written to the high-speed nonvolatile storage medium, and if the mapping table is stored in the flash memory.
  • the medium can be used to store mapping relationships in write-through mode; and such non-volatile storage media has read and write Speed block, low power consumption, high number of repeated reads and writes, etc. The most important thing is that the data stored in the power-off will not be lost.
  • the volatile storage medium used in the management data storage module of this embodiment is preferably SDRAM, DDR II or DDRIII.
  • the controller 13 is further configured to transfer the incremental information of the management data information to the data storage module 10 according to a preset policy, and according to the incremental information of the management data information. Update the management data information backed up in 10 of the data storage module.
  • the preset policy here may be any preset condition. When the condition is met, the management data information is backed up to the data storage module 10 or the incrementality of the management data information stored in the incremental information storage module 12 The information is transferred to the data storage module 10 for updating the management data information that has been backed up in the data storage module.
  • the preset policy may be when the storage space occupied by the incremental information in the incremental information storage module 12 reaches a predetermined value (ie, the storage medium used by the incremental information storage module 12 is about to be full); It is stored one by one according to the order in which it is generated, that is, the number of incremental information of the management data stored in the incremental information storage module 12 may reach a certain value such as 1, 2, or 3, etc. as a preset policy.
  • a predetermined value ie, the storage medium used by the incremental information storage module 12 is about to be full
  • the preset strategy may also be an abnormal power failure or the like.
  • the corresponding controller transfers the incremental information of the management data information in the incremental information storage module 12 to the data storage module 10 according to the preset policies, for updating the data storage according to the incremental information of the management data information. Management data information already stored in module 10.
  • the controller 13 is further configured to back up the management data information to the data storage module 10 according to a preset policy. After the backup succeeds, the current incremental information storage module 12 may be discarded. The existing increments restart the recording of the incremental information. Because the data storage module 10 has already stored the complete latest management data information at this time.
  • the controller 13 may also transfer the incremental information of the management data information to the data storage module 10 according to a preset policy, when the management data on the storage module 10
  • the amount of incremental information of the information is greater than the preset threshold, that is, the storage unit in the incremental information storage module is about to be full, and the management information is backed up as a whole.
  • the above solution can timely back up the management data information, prevent the loss of management data information, and effectively improve the reliability of the storage device.
  • the incremental information of the management data information is stored one by one according to the sequence of data processing according to the data processing result, that is, one piece is stored.
  • the data processing of each corresponding incremental information has a sequential relationship, so the incremental information of the corresponding management data information is preferably stored in the order of data processing.
  • the management data information in module 11 is not timely due to abnormal power failure, etc. Backing up to the data storage module 10, it is necessary to perform the refresh operation on the management data information of the previous successful backup by using the increment of the management data information in the incremental information module 12. If the delta in the delta information module 12 is previously dumped by the data storage module 10, the delta information in the data storage module 10 is also used to refresh the management data information. Specifically, it is also necessary to sequentially update the management data information in the data storage module 10 by using the incremental information of each management data information in the order of data processing corresponding to the incremental information of each piece of management data information. For example, the incremental information between the PBA and the LBA stored in the incremental information storage module 12 can be stored in the form of Table 1 below.
  • the incremental information of the management data in Table 1 is stored from the bottom up in the order of the corresponding data processing. It can also be considered that the order of storage time is from bottom to top.
  • the incremental information of the management data information of Table 1 is transferred to the data storage module 10
  • the management data information in the data storage module 10 is updated by using the management data information
  • the data processing sequence corresponding to each incremental information is used.
  • the management data information in the data storage module 10 is sequentially updated, respectively.
  • the management information information in the data storage module 10 is sequentially updated by using the incremental information 1, the incremental information 2, the incremental information 3, and the incremental information 4, respectively, in the order from bottom to top.
  • the incremental information storage module 12 of the embodiment may adopt a small-capacity non-volatile storage medium, because the high-capacity high-speed non-volatile storage medium is expensive.
  • the use of a small-capacity non-volatile storage medium may cause the incremental information storage module 12 to be quickly filled.
  • the controller 13 is further configured to back up the current latest management data information to the data storage module 10 when the number of the incremental information of the management data information stored by the incremental information storage module 12 is greater than a preset threshold.
  • the incremental information is restarted in the storage module 12; or the increments in the incremental information storage module 12 are dumped onto the data storage module 10, and the incremental information is restarted in the incremental storage module 12.
  • the incremental information storage module 12 stores The incremental information of the management data information is stored according to each piece of incremental information. Before storage, the incremental information of the data management information may be preset according to the capacity of the incremental information storage module 12. The threshold of the quantity, when the quantity of the incremental information of the management data information reaches the threshold, the space of the incremental information storage module 12 is about to be used up, and the controller 13 will be in the module 11 at this time. The latest management data is backed up to the data storage module 10 or the incremental information of the management data information is transferred to the data storage module 10. Since all data operation processing has a certain timing, the incremental information storage module 12 stores The storage of the incremental information of the management data information must also be strictly in accordance with the time of the corresponding data processing. Order store.
  • the priority may be prioritized according to the sequence of time, for example, according to the sequential timing relationship, the timing is preceded.
  • the incremental information of the management data information is first dumped, and the time series is transferred later; or the entire management data information increment may be dumped as a whole, but when updating, it is necessary to follow the corresponding data processing sequence.
  • the management data information in the data storage module 10 is sequentially updated in order.
  • the incremental information storage module 12 can be divided into multiple units, and each unit stores an increment information, and all the incremental information are respectively stored in each unit according to the sequence of execution of the corresponding data processing operation.
  • the management data information in the data storage module 10 is sequentially updated by using the corresponding incremental information according to the sequence order among the units.
  • the storage of the corresponding management data storage module and the management of the management data information in the data storage module 10 by using the incremental information of the management data information refer to Table 1 above. The related description will not be repeated here.
  • the log information included in the management data information and/or the flash memory in the data storage module 10 The FLASH chip has bad block information, and the situation is similar.
  • the management data information used for updating in the data storage module 10 is exported to the management data storage module after the storage device is powered on.
  • the backup management data information of the management data information in 11; each time the incremental information of the management data information is updated each time, the management data information used for updating in the data storage module 10 is the increment of the management data information last time. After the information is transferred to the data storage module 10, the management data information obtained after the management data information in the data storage module 10 is updated.
  • the working process of the storage device in this embodiment is as follows: When the storage device is powered on, the controller 13 exports the management data information stored in the data storage module 10 and stored in the management data storage module 11 to ensure that the management data information stored in the data storage module 10 is stopped.
  • the normal operation of the storage device is followed by data processing according to the technical solution of the above embodiment.
  • the controller 13 controls to update the management data information stored in the management data storage module 11 to the data storage module 10, and simultaneously marks the position in the incremental information storage module 12 in which the incremental information is recorded. After the next power-on, the incremental information is recorded from the position marked in the incremental information storage module 12 after the last power-off, and the management data information in the management data storage module 11 has been updated to the data due to the normal power-off. In the storage module 10, the incremental information before the marked position in the incremental information storage module 12 can also be directly deleted.
  • the management data information in the management data storage module 11 is lost, and the incremental information storage module 12 uses a high-speed non-volatile storage medium, and only needs a small amount of power to complete the corresponding power failure. Storage of incremental information of management information for data processing operations. In this way, according to the incremental information of the management data information and the management data information backed up in the data storage module 10, the management data information lost in the management data storage module 11 can be reconstructed and guaranteed.
  • the storage device works normally.
  • FIG. 2 is a flowchart of a data storage method according to an embodiment of the present invention. As shown in FIG. 2, the data storage method in this embodiment includes:
  • Step 100 Store management data information used to manage data storage module for data processing into a management data storage module.
  • Step 101 The incremental information of the management data information generated in the data processing process is stored in the incremental information storage module, and is used to recover the management data information backed up in the data storage module when the power is abnormally powered off.
  • Step 102 Perform data processing according to the management data information, and update the management data information and the incremental information of the management data information according to the data processing result.
  • the management data storage module of this embodiment employs a volatile storage medium.
  • Volatile storage media has a fast access speed, and high-capacity, high-speed volatile storage media are less expensive.
  • This embodiment stores management data information for managing the data storage module into the management data storage module. However, the data of the volatile storage medium is lost when the abnormal power is interrupted.
  • the incremental information of the management data generated during the data processing is stored in the incremental information storage module, and the incremental information is stored.
  • the module uses the storage mechanism of the non-volatile storage medium to store the incremental information of the management data information described above.
  • the controller performs data processing operations on the data in the data storage module according to the data stored in the data storage module according to the management data information stored in the management data storage module, and updates the incremental information storage module according to the corresponding data processing result.
  • the incremental information of the management data information stored therein, and the management data information stored in the management data storage module is updated according to the corresponding data processing result. This ensures efficient access and increases the reliability of the storage device.
  • the controller first updates the incremental information of the stored management data information in the incremental information storage module according to the data processing operation; and then updates the management in the management information storage module according to the data processing operation. Incremental information of data information.
  • the controller first updates the incremental information of the stored management data information in the incremental information storage module according to the data processing operation; and then updates the management in the management information storage module according to the data processing operation. Incremental information of data information.
  • the incremental information of the management data information is transferred to the data storage module according to a preset policy, and Updating the backed up management data information in the data storage module according to the incremental information of the management data information.
  • the controller transfers the incremental information of the management data information stored in the incremental information storage module to the data storage module, and updates the data storage module according to the incremental information of the management data information.
  • Backup management data information The preset policy here may be any preset condition. When the condition is met, the incremental information of the management data information stored in the incremental information storage module is transferred to the data storage module for updating the data. Management data information that has been backed up in the storage module.
  • the preset policy may be an abnormal power failure or the like.
  • Corresponding controllers according to the preset policies, dump the incremental information of the management data information in the incremental information storage module into the data storage module, for updating the data storage module according to the incremental information of the management data information. Managed data information that has been stored.
  • the current latest management data information may be backed up to the data storage module or the incremental information of the stored management data information in the incremental information storage module may be transferred to the data storage module, and the latest When the management data information is lost, the management data information backed up in the data storage module is updated according to the incremental information of the management data information.
  • the preset policy here may be any preset condition. When the condition is met, the current latest management data information is backed up to the data storage module or the incremental management information information stored in the incremental information storage module is incremented. The information is transferred to the data storage module, and the incremental information of the management data information stored in the incremental information storage module is transferred to the data storage module for updating the backed up management data information in the data storage module.
  • the preset strategy may be an abnormal power failure or the like.
  • Corresponding controllers according to the preset policies, dump the incremental information of the management data information in the incremental information storage module into the data storage module, for updating the data storage module according to the incremental information of the management data information. Managed data information that has been stored.
  • a preferred solution may specifically include:
  • the incremental information of the management data information stored by the incremental information storage module is greater than a preset threshold, the incremental information of the management data information is transferred to the data storage module, And updating the management data information backed up on the data storage module according to the incremental information of the management data information.
  • a threshold value of the incremental information of the management data information may be preset in the incremental information storage module, and a threshold threshold of the incremental information that can be accommodated is set according to the specific capacity of the incremental information storage module. value.
  • the threshold is set when the incremental information storage module is about to be full, and the controller transfers the incremental information of all the management data information in the incremental information storage module to the data storage module. And updating and modifying the backed up management data information in the data storage module according to all the incremental information of the transferred management data information.
  • the incremental information of the management data information is stored in the order of corresponding data processing. When the management data information backed up in the data storage module is updated by using the incremental information of the management data information after the dumping, the incremental information of the management data information backed up in the data storage module is sequentially updated according to the corresponding sequence.
  • the amount of the incremental information of the management data stored in the incremental information storage module may reach a certain value as a preset policy. Then, when the quantity of the incremental information of the management data stored in the incremental information storage module reaches a certain value, the incremental information of the management data information is transferred to the data storage module, and the data is updated according to the incremental information of the management data information.
  • the process of the management data information that has been backed up in the storage module is the same as that of the foregoing embodiment. For details, refer to the description of the foregoing embodiment, and details are not described herein again.
  • the incremental information storage module of this embodiment may employ a high-speed nonvolatile storage medium such as a magnetoresistive random access memory, a ferroelectric memory, or a nonvolatile static random access memory.
  • a high-speed nonvolatile storage medium such as a magnetoresistive random access memory, a ferroelectric memory, or a nonvolatile static random access memory.
  • management data storage module of this embodiment may adopt a volatile memory such as SDRAM, DDR II or DDRIII.
  • the data storage method in this embodiment is the same as the implementation of the data storage of the storage device in the embodiment shown in FIG. 1 , and the details described in the related embodiments are not mentioned herein.
  • the management data storage module is used to store the management data information by using the non-volatile medium storage management incremental information of the data information; the access speed of the storage device can be ensured, and the management data information can be prevented.
  • the loss of the storage device effectively improves the reliability of the storage device.
  • the prior art protects the mapping table by periodically backing up the mapping table stored in the volatile storage medium to the flash memory composed of a plurality of FLASH chips.
  • the timing backup method can protect the mapping table to a certain extent, after all, the mapping relationship stored on the FLASH chip is the mapping relationship of the backup time. Since the mapping relationship is constantly changing during the use of the FLASH chip, when the abnormal power is cut off, the backup and the current The latest mappings are likely to be completely inconsistent, so it is highly probable that the backup mapping table will be restored without the latest mapping.
  • the mapping table between the LBA and the PBA is stored in the management data storage module, and the entry of the mapping table between the LBA and the PBA is corresponding to one data processing operation.
  • the modified increment is stored in the incremental information storage module, and the controller reads, writes, or moves the data in the FLASH chip in the data storage module according to the mapping table between the LBA and the PBA stored in the management data storage module.
  • the LBA of the current operation and the new PBA corresponding to the modification of the operation are stored as an entry increment information in the incremental information storage module, that is, according to the operation processing of the data.
  • the result of this data manipulation process updates the incremental information storage module.
  • the old PBA corresponding to the LBA of the current data operation processing is found in the mapping table between the LBA and the PBA stored in the management data storage module, and then the old PBA is modified to be compared with the LBA after the current data operation processing.
  • Corresponding new PBA that is, updating the mapping table stored in the management data storage module.
  • the entry increment information in the incremental information storage module is updated, and the mapping table in the management data storage module is updated.
  • the mapping table in the management data storage module is updated.
  • the management information data lost in the abnormality power-off in the management data storage module can be reconstructed, LBA
  • the mapping relationship with the PBA updates the old mapping relationship in the management information data to the incremental order.
  • the new mapping relationship recorded in the increment ensures the normal operation of the storage device and improves the reliability of the storage device.
  • Each write operation of the storage device corresponds to the increment information of one entry, and the incremental information of all the entries is stored in the incremental information storage module according to the chronological order.
  • the incremental information storage module can be divided into multiple Storage unit, each table item increment information occupies one storage unit; the storage unit may adopt several or ten bytes, that is, the target storage storage space is divided into continuous fixed-size spaces in advance, and then each The increment information of the entry generated by one write operation corresponds to one storage unit, so that the increment information of all the entries generated by the write operation can be filled one by one in the order of time, and is also convenient for parsing after the management information needs to be refreshed.
  • the incremental information of all the entries is sequentially stored in each storage unit in chronological order.
  • the storage unit in the incremental information storage module is about to be full, and all the entries in the information storage module are incremented.
  • the incremental information is transferred to the FLASH chip, and the mapping table between the LBA and the PBA backed up by the FLASH chip backup update is updated by using all the entry increment information.
  • the increments of the entries are sequentially used according to the sequence of data processing operations corresponding to the increment information of each entry.
  • the information is updated to the mapping table in the data storage module.
  • the old PBA corresponding to the LBA is changed to the new PBA corresponding to the LB ⁇ after the operation is processed, corresponding to the increment information of the entry corresponding to each write operation.
  • the management data information is consistent, that is, the mapping table transferred from the management data storage module to the data storage module when the storage device is normally powered off last time.
  • the new information obtained by sequentially updating the mapping table in the management data storage module is used according to the incremental information of each table that was previously transferred to the management data storage module.
  • the mapping table is the cornerstone.
  • the incremental information of the entry of the mapping table is stored in a sequence according to the sequence.
  • the storage medium when the number of increments of the entry reaches the preset threshold, all the incremental information of the entry is transferred to the data storage module to be added to the data storage module, and then increased according to each table entry.
  • the sequence of the quantity information storage (that is, the sequence of data processing operations corresponding to the increment information of each table item) updates the backed up mapping table in the data storage module. Even when the storage device is abnormally powered off, the mapping table in the volatile storage medium at the time of power failure can be reconstructed according to the mapping table of the entry in the non-volatile storage medium and the backup in the data storage module. Information can ensure the normal operation of the storage device and improve the reliability of the storage device.

Description

存储设备和数据存储方法
本申请要求于 2010年 01月 29日提交中国专利局,申请号 201010104788.2: 发明名称为 "存储设备和数据存储方法" 的中国专利申请的优先权, 其全部 内容通过引用结合在本申请中。 技术领域 本发明实施例涉及数据存储技术领域, 尤其涉及一种存储设备和数据存 储方法。 背景技术 现有存储技术中, SSD ( solid state disk, 固态硬盘) 中的闪速存储器采 用数个 FLASH芯片, 用于存储数据。 SSD 中闪速存储器的管理数据信息为 SSD处理数据所需的关键数据, 该管理数据信息例如: 主机端的逻辑块地址 ( Logical Block Address; 以下简称 LBA )与闪速存储器的存储介质的物理块 地址( Physical Block Address; 以下简称 PBA )的映射关系、 日志信息、 闪速 存储器中 FLASH芯片的坏块信息等等。 当 SSD执行数据的读、 写或搬移等 等操作过程时, 需要相应的修改闪速存储器的管理数据信息。 如果 SSD频繁 执行的数据的读、 写或转移等等操作, 则对管理数据信息将进行频繁的修改。 为了保证管理数据信息的访问速度, 现有技术在 SSD工作过程中将闪速存储 器的管理数据信息緩存在存储器中。
在实现本发明过程中, 发明人发现现有技术中至少存在如下问题: 现有 技术的 SSD中, 闪速存储器的管理数据信息存储在易失性存储介质中。 一旦 SSD在正常工作过程中发生异常断电故障, 易失性存储介质中存储的管理数 据信息都会丟失, 降低了 SSD的数据存储可靠性。 发明内容 本发明实施例提供一种存储设备和数据存储方法, 有效提高 SSD的数据 存储可靠性。
本发明实施例提供一种存储设备, 包括数据存储模块; 还包括: 管理数据存储模块,用于在存储设备接收到主机发送的数据处理请求后, 用以管理所述数据存储模块进行数据处理的管理数据信息;
增量信息存储模块, 用于存储数据处理过程中产生的管理数据信息的增 量信息, 以用于在异常断电时, 结合所述数据存储模块中已备份的管理数据 信息恢复出所述管理数据存储模块中存储的所述管理数据信息; 所述增量信 息存储模块采用非易失性存储介质;
控制器, 用于根据所述管理数据信息进行数据处理, 并根据数据处理结 果更新所述管理数据信息及添加所述管理数据信息的增量信息。
本发明实施例提供一种数据存储方法, 包括:
将用以管理数据存储模块进行数据处理的管理数据信息存储至管理数据 存储模块中;
将数据处理过程中产生的管理数据信息的增量信息存储至增量信息存储 模块中, 以用于在发生异常断电后, 需要恢复最新的管理数据信息时, 结合 所述数据存储模块中已备份的管理数据信息恢复出所述管理数据存储模块中 存储的所述管理数据信息; 所述增量信息存储模块采用非易失性存储介质; 根据所述管理数据信息进行数据处理, 并根据数据处理结果相应更新所 述管理数据信息及添加所述管理数据信息的增量信息。
本发明实施例的存储设备和数据存储方法, 采用非易失性存储介质存储 数据存储模块的管理数据信息的增量信息, 以用于在异常断电时, 结合数据 存储模块中已备份的管理数据信息, 恢复出用以管理数据存储模块进行数据 处理的管理数据信息; 可以有效地防止了 SSD出现异常断电时, 所述数据存 储模块的管理数据信息的丟失, 能够保证 SSD的正常工作, 可以有效减小或 消除 SSD对超级电容等等备用电源的依赖, 提高了 SSD的可靠性。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动性的前提下, 还可以根据这些附图获得其它的附图。
图 1为本发明实施例提供的一种存储设备的结构示意图;
图 2为本发明实施例提供的一种数据存储方法的流程图。 具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其它实施例, 都属于本发明保护的范围。
现有技术中 SSD的运转过程中, 数据的读、 写或搬移等等操作会涉及到 对 SSD中闪速存储器的管理数据信息 (也称之为表项 )的频繁修改操作, 为 了保证管理数据信息的访问速度, 在 SSD运转过程中, 将闪速存储器的管理 数据信息存放在同步动态随机存 4诸器 ( Synchronous Dynamic random access memory; 以下简称 SDRAM ), 第二代双倍速率同步动态随机存储器 ( Double Data Rate Synchronous Dynamic random access memory II; 以下简称 DDR II ) 或第三代双倍速率同步动态随机存储器 (Double Data Rate Synchronous Dynamic random access memory III; 以下简称 DDR III )等等易失性存储器中。 例如, 由于 SSD与传统机械硬盘通常采用固定映射关系的处理方式不同, 在 SSD中存储时, 主机端的逻辑块地址 LBA与存储介质的物理块地址 PBA对 应的映射关系虽然有一定的原则, 但是并不固定, 为了保证存取速度, 通常 将用来维护 LBA与 PBA的映射关系的映射表存放在 SDRAM、 DDR II或 DDR III等等存储器中。
闪速存储器的管理数据信息也可以包括有日志信息, 该日志信息里通常 包括有 SSD运转过程中一些状态信息,尤其是在 SSD出现故障的时候,根据 曰志信息里记录的异常信息对于解决 SSD故障具有重要的意义。
闪速存储器的管理数据信息也可以包括有闪速存储器中 FLASH 芯片的 坏块信息等等对 SSD管理有重要作用的信息。 当 SSD要停止工作时, SSD 控制器会将管理数据信息备份至闪速存储器中, 系统下次上电工作, 再根据 备份的管理数据信息, 向 SSD的存储器中导出管理数据信息, 以保证 SSD继 续进行正常工作。
下面结合附图和具体实施例进一步说明本发明实施例的技术方案。
图 1为本发明实施例提供的一种存储设备的结构示意图; 如图 1所示, 本实施例的存储设备包括: 数据存储模块 10、 管理数据存储模块 11、 增量信 息存储模块 12和控制器 13。
数据存储模块 10为存储设备的主要存储结构, 用于存储业务数据。 数据 存储模块具体可以为闪速存储器, 采用数个 FLASH芯片组成。
管理数据存储模块 11用于存储用以管理数据存储模块 10进行数据处理 的管理数据信息。 也就是说, 管理数据存储模块 11存储一些管理上述数据存 储模块 10的一些关键数据信息即管理数据信息, 以便于对数据存储模块 10 进行正确的数据处理。 由于在处理过程中, 要频繁的访问管理数据信息, 优 选地, 管理数据存储模块 11采用易失性存储介质, 按照易失性存储介质的存 储机制存储管理数据信息, 以提供较高的读写性能。 本实施例的管理数据信 息包括有: 主机端 LBA与数据存储模块 10中 FLASH芯片中的 PBA之间的 映射关系、 日志信息、 以及数据存储模块 10中的 FLASH芯片的坏块信息等 等用于管理数据存储模块 10的一些关键数据信息。
增量信息存储模块 12 用于存储数据处理过程中产生的管理数据信息的 增量信息, 以在异常断电时, 用于结合数据存储模块 10中已备份的管理数据 信息恢复出管理数据存储模块 11中存储的所述管理数据信息;增量信息存储 模块 12优选地采用磁阻随机存取存储器( Magnetic Random Access Memory; 以下简称 MRAM )、 铁电存者器( Ferroelectric Random Access Memory; 以下 简称 FRAM ) 或者非易失静态随机存取存储器 (Nonvolatile Static Random Access Memory; 以下简称 NVSRAM )等等之类的高速非易失性存储介质。
控制器 13用于根据所述管理数据信息进行数据处理,并根据数据处理结 果更新所述管理数据信息及所述管理数据信息的增量信息。
具体地, 当控制器 13根据管理数据存储模块 11中存储的管理数据信息, 在数据存储模块 10中进行读写数据以及删除数据等等操作处理的时候,对应 的用于管理数据存储模块 10 的一些关键数据即管理数据信息等等都会发生 相应的变化。比如对应的主机端 LBA与数据存储模块 10中 FLASH芯片中的 PBA之间的映射关系就发生了变化。 进行该次数据处理将 LBA对应的旧的 PBA修改为对应一个新的 PBA, 即将 "LBA→PBA ( old )" 修改为 "LBA→ PBA ( new )"。 对于此次数据处理 , 对应的 LBA与 PBA之间的映射信息的增 量信息为 LBA对应的新的 PBA , 可以记为 "LBA→ PBA ( new )"。 此次数据 处理过程中,还可以存在日志信息的变化,以及数据存储模块 10中的 FLASH 芯片的坏块信息等等。 因此此次数据处理, 也可能发生日志信息的增量信息 和坏块信息的增量信息。
然后根据数据处理结果可以在增量信息存储模块 12 中更新即增加的增 量信息可以为 "LBA→PBA ( new )"、 日志信息的增量信息和坏块信息的增量 信息等等管理数据信息的增量信息。 同时也根据数据处理结果更新管理数据 存储模块 11 中的管理数据信息。 为了减少在更新数据过程中发生的异常断 电, 导致数据丟失的概率, 优选地, 根据数据处理结果首先更新增量信息存 储模块 12 中的管理数据信息的增量信息, 然后再更新管理数据存储模块 11 中的管理数据信息。 采用此优选方案, 可以保证即使在更新管理数据存储模 块 11 中的管理数据信息是出现异常断电, 仍然能够根据增量信息存储模块 12 中的管理数据信息的增量信息和数据存储模块 10 中已备份的管理数据信 息恢复出管理数据存储模块 11中的管理数据信息。
需要说明的是, 在存储设备正常掉电停止工作时, 因为存储管理数据信 息的管理数据存储模块 11优选为易失性存储介质, 因此, 掉电前将其中的存 储管理数据信息都备份在数据存储模块 10中, 当存储设备正常上电工作时, 再将数据存储模块 10 中的备份的管理数据信息复制一份导出至管理数据存 储模块 11 , 以供存储设备进行有效地数据处理。 所以, 数据存储模块 10 中 一直备份有一份管理数据信息。
当异常断电时, 由于增量信息存储模块 12优选地采用非易失性存储介 质, 即使异常断电时, 增量信息存储模块 12存储的管理数据信息的增量信息 也不会丟失。此时结合增量信息存储模块 12存储的管理数据信息的增量信息 和数据存储模块 10 中已备份的管理数据信息便可以恢复出掉电时管理数据 存储模块 11中存储的管理数据信息。 从而保证存储设备的正常运行。
本实施例的存储设备可以为固态硬盘 SSD。
本实施例的存储设备, 通过采用非易失性存储介质存储管理数据信息的 增量信息, 采用易失性存储介质的管理数据存储模块 11存储管理数据信息, 保证了在存储设备出现异常断电故障, 仍然能够根据非易失性存储介质中存 储的管理数据信息的增量信息和数据存储模块 10 中备份的管理数据信息重 构出管理数据存储模块 11中存储的管理数据信息;本实施例的技术方案保证 存储设备访问速度同时, 还提高了存储设备的可靠性。
需要说明的是,本实施例中的增量信息存储模块 12具体可以采用磁阻随 机存取存储器( Magnetic Random Access Memory; 以下简称 MRAM )、 铁电 存储器( Ferroelectric Random Access Memory; 以下简称 FRAM )或者非易失 静态随机存取存储器(Nonvolatile Static Random Access Memory; 以下简称 NVSRAM )等等之类的高速非易失性存储介质,该类存储介质可以直接读写, 不需要像闪速存储器一样要先擦除后才能进行数据写入 ,修改前或写入数据 由于在大部分情况下, 对高速非易失性存储介质的操作仅需要少量字节被写 入, 而如果映射表存储在闪速存储器中, 在每次写入闪速存储器时整页可能 被重写, 如果没有空页可用, 包括块擦除等等操作会使得处理速度緩慢, 所 以本实施例中的高速的非易失性存储介质可以用于在透写模式下存储映射关 系; 且此类非易失性存储介质具有读写速度块、 功耗低、 重复读写次数高等 等特性, 最主要的是在断电时存储在其中的数据不会丟失。
本实施例的管理数据存储模块采用的易失性存储介质优选为 SDRAM、 DDR II或 DDRIII。
在上述实施例的基石出上, 控制器 13还用于按照预置策略, 将所述管理数 据信息的增量信息转存到数据存储模块 10上,并根据所述管理数据信息的增 量信息更新数据存储模块中 10中已备份的管理数据信息。 这里预置的策略, 具体可以是任何预设的条件, 当满足此条件时, 将管 理数据信息备份到数据存储模块 10或将增量信息存储模块 12中存储的所述 管理数据信息的增量信息转存到数据存储模块 10, 以用于更新数据存储模块 中已备份的管理数据信息。比如预置策略可以当增量信息存储模块 12中的增 量信息所占的存储空间达到预定值时 (即增量信息存储模块 12采用的存储介 质即将存满); 由于管理数据的增量信息是按照其产生的先后顺序逐条存储, 即,也可以在增量信息存储模块 12中存储的管理数据的增量信息的数量达到 一定值如 1、 2、 或 3等等作为预置策略。
所述预置策略还可以是发生异常断电等等情况。 对应的控制器根据这些 预置策略,将增量信息存储模块 12中的管理数据信息的增量信息转存到数据 存储模块 10中,以用于根据这些管理数据信息的增量信息更新数据存储模块 10中已存储的管理数据信息。
在上述实施例的基石出上, 控制器 13还用于按照预置策略, 将所述的管理 数据信息整体备份到数据存储模块 10上,备份成功后可以放弃当前的增量信 息存储模块 12中已有的增量, 重新开始增量信息的记录。 因为此时数据存储 模块 10已经存储了完整的最新管理数据信息。
为了减少控制器 13对管理数据信息的备份频率, 控制器 13也可以按照 预置策略, 将所述管理数据信息的增量信息转存到数据存储模块 10上, 当存 储模块 10上的管理数据信息的增量信息数量大于预设门限值,即增量信息存 储模块中的存储单元即将存满 , 对管理信息整体备份。
采用上述方案能够及时地将管理数据信息及时备份, 防范了管理数据信 息的丟失, 有效地提高了存储设备的可靠性。
需要说明的是, 管理数据信息的增量信息是根据数据处理结果按照其产 生的先后顺序逐条存储的, 即一条一条存储的。 对应的每一个增量信息的数 据处理都存在先后顺序关系, 所以优选地按照数据处理的先后顺序, 存储对 应的管理数据信息的增量信息。 当将增量信息存储模块 12中的管理数据信息 的增量信息转存到数据存储模块 10中, 更新数据存储模块 10中的管理数据 信息时;
如果因为异常断电等等原因导致模块 11 中的管理数据信息没有及时成 功备份到数据存储模块 10上, 就需要利用增量信息模块 12中的管理数据信 息的增量对前一次成功备份的管理数据信息进行刷新操作。 如果之前有利用 数据存储模块 10转存增量信息模块 12中的增量,则数据存储模块 10中的增 量信息也要用来刷新管理数据信息。 具体地, 也必须按照各条管理数据信 息的增量信息对应的数据处理的先后顺序, 利用各管理数据信息的增量信息 分别依次更新数据存储模块 10 中的管理数据信息。 比如增量信息存储模块 12中存储的 PBA与 LBA之间的增量信息可以采用如下表 1的形式存储。
表 1
Figure imgf000010_0001
表 1 中管理数据的增量信息按照对应的数据处理的先后顺序由下向上存 储, 也可以认为存储时间的先后顺序是由下向上。 对应将表 1 的管理数据信 息的增量信息转存至数据存储模块 10中时,利用这些管理数据信息更新数据 存储模块 10中的管理数据信息时,按照各增量信息对应的数据处理的先后顺 序, 分别依次更新数据存储模块 10中的管理数据信息。 比如上表 1中按照由 下向上的顺序, 分别利用增量信息 1、 增量信息 2、 增量信息 3和增量信息 4 依次分别更新数据存储模块 10中的管理数据信息。
对于管理数据信息中包括的日志信息和 /或数据存储模块 10 中闪速存储 器的 FLASH芯片坏块信息, 同上述存储与更新情况相同, 在此不再贅述。
进一步地, 在上述实施例的技术方案的基础上, 由于大容量的高速非易 失性存储介质价格昂贵,本实施例的增量信息存储模块 12可以采用小容量的 非易失性存储介质, 但是采用小容量的非易失性存储介质, 这样可能会致使 增量信息存储模块 12很快就会被存满。 为了进一步保证存储设备的可靠性, 优选地。控制器 13还用于增量信息 存储模块 12存储的所述管理数据信息的增量信息的数量大于预设门限值时, 将当前最新的管理数据信息备份到数据存储模块 10上, 增量存储模块 12中 重新开始记录增量信息;或将增量信息存储模块 12中的增量转存到数据存储 模块 10上, 增量存储模块 12中重新开始记录增量信息。
将所述管理数据信息的增量信息转存到数据存储模块 10上, 并利用这 些管理数据信息的增量信息更新数据存储模块 10 上已备份的管理数据信息 时,增量信息存储模块 12存储的所述管理数据信息的增量信息是按照每一条 增量信息来存储的, 存储之前, 可以具体根据增量信息存储模块 12的容量大 小, 预先设定一个所述数据管理信息的增量信息的数量的门限值, 当所述管 理数据信息的增量信息的数量到达这个门限值时, 说明增量信息存储模块 12 的空间即将用完, 此时控制器 13将此时模块 11 中的最新的管理数据备份到 数据存储模块 10或将所述管理数据信息的增量信息转存到数据存储模块 10 上, 因为所有数据操作处理存在一定的时序性, 所以增量信息存储模块 12存 储的管理数据信息的增量信息的存储也必须严格按照对应的数据处理的时间 的先后顺序来存储。
将增量信息存储模块 12 中的所述管理数据信息的增量信息向数据存储 模块 10转存时, 也可以优先地按照时间的先后顺序, 具体的, 例如可以根据 先后时序关系, 时序在前的所述管理数据信息的增量信息先转存, 时序在后 的后转存; 或者也可以整体的转存所有的管理数据信息的增量, 但是更新时, 必需按照对应的数据处理的先后顺序依次更新数据存储模块 10 中的管理数 据信息。 具体可以采用将增量信息存储模块 12分为多个单元, 每个单元存储 一条增量信息, 所有增量信息分别按照相应数据处理操作执行的先后时序依 次存放在各个单元中。 根据各单元之间的时序先后顺序, 利用各对应的增量 信息依次更新数据存储模块 10中的管理数据信息。
对于管理数据信息包括 LBA与 PBA之间的映射表时, 对应的管理数据 存储模块的存储以及利用管理数据信息的增量信息更新数据存储模块 10 中 的管理数据信息的过程, 可参考上述表 1 的相关描述, 在此不再贅述。 对于 管理数据信息中包括的日志信息和 /或数据存储模块 10 中闪速存储器的 FLASH芯片坏块信息, 情况类似。
需要说明的是, 当首次向数据存储模块 10转存管理数据信息的增量信息 时,数据存储模块 10中用于更新的管理数据信息是此次存储设备上电工作后 导出至管理数据存储模块 11中的管理数据信息的备份管理数据信息; 以后每 次更新管理数据信息的增量信息时,数据存储模块 10中用于更新的管理数据 信息都是上一次将所述管理数据信息的增量信息转存至数据存储模块 10后, 更新数据存储模块 10中的管理数据信息后得到的管理数据信息。
本实施例的存储设备的工作流程如下: 存储设备上电工作时, 控制器 13 将数据存储模块 10 中存储的上次停止工作时存储的管理数据信息导出至管 理数据存储模块 11中, 以保证存储设备的正常工作, 然后按照上述本实施例 的技术方案进行数据处理。
当存储设备即将停止工作时, 控制器 13控制将管理数据存储模块 11 中 存储的管理数据信息更新至数据存储模块 10中,并同时标记增量信息存储模 块 12中记录增量信息的位置。 下次上电后, 从上次断电在增量信息存储模块 12中标记的位置之后开始记录增量信息, 由于正常断电时, 已经将管理数据 存储模块 11 中的管理数据信息更新至数据存储模块 10中, 也可以直接将增 量信息存储模块 12中此标记位置之前的增量信息删除。
当存储设备异常断电时, 管理数据存储模块 11中的管理数据信息丟失, 增量信息存储模块 12采用高速非易失性存储介质,只需要艮小的电量即可完 成对断电时对应的数据处理操作的管理信息的增量信息的存储。 这样可以根 据增量信息存储模块 12 中所述管理数据信息的增量信息和数据存储模块 10 中已备份的管理数据信息, 实现对管理数据存储模块 11中丟失的管理数据信 息的重构, 保证存储设备的正常工作。
以上所描述的装置实施例仅仅是示意性的, 其中所述作为分离部件说明 的单元可以是或者也可以不是物理上分开的, 作为单元显示的部件可以是或 者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络 单元上。 可以根据实际的需要选择其中的部分或者全部模块来实现本实施例 方案的目的。 本领域普通技术人员在不付出创造性的劳动的情况下, 即可以 理解并实施。 图 2为本发明实施例提供的一种数据存储方法的流程图, 如图 2所示, 本实施例的数据存储方法, 包括:
步骤 100、 将用以管理数据存储模块进行数据处理的管理数据信息存储 至管理数据存储模块中;
步骤 101、 将数据处理过程中产生的管理数据信息的增量信息存储至增 量信息存储模块中, 以用于在异常断电时, 结合所述数据存储模块中已备份 的管理数据信息恢复出所述管理数据存储模块中存储的所述管理数据信息; 所述增量信息存储模块采用非易失性存储介质;
步骤 102、 根据所述管理数据信息进行数据处理, 并根据数据处理结果 相应更新所述管理数据信息及所述管理数据信息的增量信息。
具体地, 本实施例的管理数据存储模块采用易失性存储介质。 易失性存 储介质具有访问速度快, 且大容量的高速易失型存储介质成本较低。 本实施 将用于管理数据存储模块的管理数据信息存储至管理数据存储模块中。 但是 由于易失性存储介质在出现异常断电时, 其数据会丟失, 本实施例采用将数 据处理过程中产生的管理数据信息的增量信息存储至增量信息存储模块中, 增量信息存储模块采用非易失性存储介质的存储机制存储上述所述的管理数 据信息的增量信息。 控制器具体根据管理数据存储模块中存储的所述管理数 据信息对数据存储模块中存储的数据对数据存储模块中的数据进行数据处理 操作, 并根据对应数据处理结果, 相应更新增量信息存储模块中存储的所述 管理数据信息的增量信息, 以及根据对应数据处理结果更新管理数据存储模 块中存储的所述管理数据信息。 这样既能保证有效地访问速度, 又能提高存 储设备的可靠性 。
需要说明的是, 优选地, 控制器根据数据处理操作, 先更新增量信息存 储模块中的存储的管理数据信息的增量信息; 然后再根据数据处理操作, 再 更新管理信息存储模块中的管理数据信息的增量信息。 采用此优选方案, 可 以保证即使在控制器更新管理数据存储模块中的管理数据信息是出现异常断 电 , 仍然能够根据增量信息存储模块中的管理数据信息的增量信息和数据存 储模块中已备份的管理数据信息恢复出管理数据存储模块中的管理数据信 息。 需要说明的是, 在上述实施例的基础上, 还可以进一步包括一种优选地 技术方案: 按照预置策略, 将所述管理数据信息的增量信息转存到所述数据 存储模块上 , 并根据所述管理数据信息的增量信息更新所述数据存储模块中 所述已备份的管理数据信息。
具体地, 按照预置策略, 控制器将增量信息存储模块中存储的管理数据 信息的增量信息转存到数据存储模块上 , 并根据这些管理数据信息的增量信 息更新数据存储模块中已备份的管理数据信息。 这里预置的策略, 具体可以 是任何预设的条件, 当满足此条件时, 将增量信息存储模块中存储的这些管 理数据信息的增量信息转存到数据存储模块, 以用于更新数据存储模块中已 备份的管理数据信息。 比如所述预置策略可以是发生异常断电等情况。 对应 的控制器根据这些预置策略, 将增量信息存储模块中的管理数据信息的增量 信息转存到数据存储模块中, 以用于根据这些管理数据信息的增量信息更新 数据存储模块中已存储的管理数据信息。
在本发明实施例中, 可以将当前最新的管理数据信息备份到数据存储模 块或将增量信息存储模块中的存储的管理数据信息的增量信息转存到数据存 储模块上 ,并在最新的管理数据信息丟失时根据这些管理数据信息的增量信 息更新数据存储模块中已备份的管理数据信息。 这里预置的策略, 具体可以 是任何预设的条件, 当满足此条件时, 将当前最新的管理数据信息备份到数 据存储模块或将增量信息存储模块中的存储的管理数据信息的增量信息转存 到数据存储模块上 , 将增量信息存储模块中存储的这些管理数据信息的增量 信息转存到数据存储模块, 以用于更新数据存储模块中已备份的管理数据信 息。 比如所述预置策略可以是发生异常断电等等情况。 对应的控制器根据这 些预置策略, 将增量信息存储模块中的管理数据信息的增量信息转存到数据 存储模块中, 以用于根据这些管理数据信息的增量信息更新数据存储模块中 已存储的管理数据信息。
例如, 因为现有的采用非易失性存储介质的增量信息存储模块容量都比 较小, 为了保证数据存储的可靠性, 一种优选地方案具体还可以包括:
在所述增量信息存储模块存储的所述管理数据信息的增量信息数量大于 预设门限值时,将所述管理数据信息的增量信息转存到所述数据存储模块上, 并根据所述管理数据信息的增量信息更新所述数据存储模块上已备份的管理 数据信息。
具体地, 可以在增量信息存储模块中预设一个所述管理数据信息的增量 信息数量门限值, 根据增量信息存储模块的具体容量大小设置一个可容纳的 增量信息的数量门限值。 优选地, 该门限值设在增量信息存储模块即将存满 时, 此时控制器将这些此时增量信息存储模块中的所有管理数据信息的增量 信息转存到数据存储模块中, 并根据转存的所述管理数据信息的所有增量信 息对数据存储模块中已备份的管理数据信息进行更新修改。 所述管理数据信 息的增量信息按照相对应的数据处理的先后顺序存储的。 利用转存后的管理 数据信息的增量信息更新数据存储模块中已备份的管理数据信息时, 也按照 对应的先后时序, 分别依次更新数据存储模块中已备份的管理数据信息的增 量信息。
由于管理数据的增量信息是按照条数存储 , 也可以在增量信息存储模块 中存储的管理数据的增量信息的数量达到一定值作为预置策略。 然后在增量 信息存储模块中存储的管理数据的增量信息的数量达到一定值时 , 将管理数 据信息的增量信息转存到数据存储模块上 , 并根据管理数据信息的增量信息 更新数据存储模块中所述已备份的管理数据信息的过程同上述实施例的描述 相同, 详细可参照上述实施例的描述, 在此不再贅述。
需要说明的是本实施例的增量信息存储模块可以采用磁阻随机存取存储 器、 铁电存储器或者非易失静态随机存储器等等高速非易失性存储介质。
需要说明的是本实施例的管理数据存储模块可以采用 SDRAM、 DDR II 或 DDRIII等等易失性存储器。
本实施例中的数据存储方法与上述图 1所示实施例的存储设备的完成数 据存储的实现机制相同, 详细参考上述相关实施例记载的内容, 在此不再贅 述。
本实施例的数据存储方法, 通过采用非易失性介质存储管理数据信息的 增量信息, 采用管理数据存储模块存储管理数据信息; 既能够保证存储设备 的访问速度, 又能防范了管理数据信息的丟失, 有效地提高了存储设备的可 靠性。 鉴于 LBA与 PBA之间映射关系的映射表的重要性, 现有技术采用定时 将存储在易失性存储介质中的映射表备份至由多个 FLASH 芯片构成的闪速 存储器中来保护映射表。 定时备份的方式虽然能在一定程度上保护映射表, 但是毕竟 FLASH芯片上存储的映射关系是备份时刻的映射关系,由于 FLASH 芯片使用过程中映射关系不断发生变化, 异常断电时, 备份与当前最新的映 射关系很可能不完全一致, 因此利用备份的映射表极有可能恢复出来不是最 新的映射关系。
下面以管理数据信息为主机端的 LB A与 FLASH芯片的 PB A映射关系的 映射表为例, 详细说明本发明实施例的技术方案。
具体地, 本发明实施例的技术方案中 LBA与 PBA之间的映射表是存储 在管理数据存储模块中, 而 LBA与 PBA之间的映射表的表项增量 (即一次 数据处理操作对应的修改增量)存储在增量信息存储模块中, 控制器根据存 储在管理数据存储模块中的 LBA 与 PBA之间的映射表对数据存储模块中 FLASH芯片中的数据进行读、 写、 或搬移等等操作, 每执行完一次数据的操 作处理后,需要将当前操作的 LBA与对应此次操作修改后所对应的新的 PBA 作为一个表项增量信息存储在增量信息存储模块中, 即根据此次数据操作处 理的结果更新增量信息存储模块。
同时, 在管理数据存储模块中存储的 LBA与 PBA之间的映射表中找到 当前数据操作处理的 LBA对应的旧的 PBA, 然后将该旧的 PBA修改为与该 当前数据操作处理后的 LBA相对应的新的 PBA;即对存储在管理数据存储模 块中的映射表进行更新。
需要说明的是, 为了避免更新过程中异常断电, 优选地, 每次数据操作 处理后, 先更新增量信息存储模块中的表项增量信息, 再更新管理数据存储 模块中的映射表。 这样即使在更新过程中异常断电, 由于增量信息存储模块 采用存储容量较小的非易失性存储介质, 在异常断电时只需要其电容提供的 很小的电量即可将表项增量信息存储。 然后根据增量信息存储模块中存储的 表项增量信息结合数据存储模块中已备份的管理数据信息即可实现对管理数 据存储模块中在异常断电时丟失的管理信息数据进行重构, LBA和 PBA的 映射关系, 就按照增量的先后顺序把管理信息数据中的旧的映射关系更新为 增量中记录的新的映射关系以保证存储设备的正常工作, 提高了存储设备的 可靠性。
由于主机对存储设备进行的每一次写操作都对应一个表项增量信息, 将 所有表项增量信息按照时序先后顺序存放在增量信息存储模块中 , 具体可以 将增量信息存储模块分成多个存储单元, 每一表项增量信息占用一个存储单 元; 所述的存储单元可以采用几个或者十几个字节, 即预先将目标存储存储 空间划分成连续的固定大小的空间, 之后每一次写操作产生的表项增量信息 对应一个存储单元, 以便写操作所产生的所有表项增量信息可以按照时间的 先后顺序逐条填充, 也便于需要刷新管理信息时逐条读出后进行解析。 将所 有表项增量信息按照时序先后顺序依次存放在各存储单元中。
当增量信息存储模块中的对应表项增量信息的数量大于预设门限值时, 即增量信息存储模块中的存储单元即将存满, 此时将增量信息存储模块中所 有表项增量信息转移至 FLASH 芯片中, 利用所有表项增量信息更新所述 FLASH芯片备份更新已备份的 LBA与 PBA之间的映射表。 这里需要说明的 是, 当增量信息存储模块中的表项增量信息转移至数据存储模块后, 根据各 个表项增量信息对应的数据处理操作的先后顺序, 分别依次利用各表项增量 信息对数据存储模块中的映射表进行更新。 更新过程中, 对应每一次写操作 对应的表项增量信息, 将 LBA对应的旧的 PBA ^ίι爹改为此次操作处理后该 LB Α对应的新的 PBA。
需要说明的是, 存储设备上电后的首次转存的表项增量信息, 数据存储 模块中的映射表是与存储设备此次上电工作后由管理数据存储模块导出至管 理数据存储模块中的管理数据信息一致, 也即是上次正常停止工作时, 即存 储设备正常断电时, 由管理数据存储模块中转存到数据存储模块中的映射表。 以后每次更新管理数据存储模块中的映射表, 都是根据前一次利用转存至管 理数据存储模块地各表项增量信息, 分别依次更新管理数据存储模块中的映 射表后所得到的新的映射表为基石出。
对于如日志信息、数据存储模块中 FLASH芯片的坏块信息等等管理数据 信息, 存储的实现机制相同, 不再贅述。
本实施例通过采用将映射表的表项增量信息按照先后时序存储到一非易 失性存储介质中, 并在表项增量信息的数量达到预设门限值时, 将所有表项 增量信息转存到数据存储模块中以对数据存储模块中 , 然后按照各表项增量 信息存储的先后时序 (也就是各表项增量信息对应的数据处理操作的先后时 序)对数据存储模块中已备份的映射表进行更新。 即使在存储设备异常断电 时, 仍能够根据非易失性存储介质中的表项增量单元和数据存储模块中的备 份的映射表重构出断电时易失性存储介质中的映射表信息, 能够保证存储设 备的正常工作, 提高了存储设备的可靠性。
通过以上的实施方式的描述, 本领域的技术人员可以清楚中地了解到各 实施方式可借助软件加必需的通用硬件平台的方式来实现, 当然也可以通过 硬件。 基于这样的理解, 上述技术方案本质上或者说对现有技术做出贡献的 部分可以以软件产品的形式体现出来, 该计算机软件产品可以存储在计算机 可读存储介质中, 如 ROM/RAM、 磁碟、 光盘等等, 包括若干指令用以使得 一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等等)执行各 个实施例或者实施例的某些部分所述的方法。
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其 限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或 者对其中部分技术特征进行等等同替换; 而这些修改或者替换, 并不使相应 技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims

权 利 要 求
1、 一种存储设备, 包括数据存储模块, 其特征在于, 还包括: 管理数据存储模块, 用于存储设备接收到主机发送的数据处理请求后, 管理所述数据存储模块进行数据处理的管理数据信息;
增量信息存储模块, 用于存储数据处理过程中产生的管理数据信息的增 量信息, 以用于在异常断电时, 结合所述数据存储模块中已备份的管理数据 信息恢复出所述管理数据存储模块中存储的所述管理数据信息; 所述增量信 息存储模块采用非易失性存储介质;
控制器, 用于根据所述管理数据信息进行数据处理, 并根据数据处理结 果更新所述管理数据信息及所述管理数据信息的增量信息。
2、 根据权利要求 1所述的存储设备, 其特征在于:
所述控制器, 还用于按照预置策略, 将所述管理数据信息的增量信息转 存到所述数据存储模块上, 并根据所述管理数据信息的增量信息更新所述数 据存储模块中所述已备份的管理数据信息;
其中, 所述步骤具体包括:
将当前最新的管理数据信息备份到数据存储模块 , 或将增量信息存储模 块中的存储的管理数据信息的增量信息转存到数据存储模块上, 并在需要刷 新管理数据信息时根据所述管理数据信息的增量信息更新所述数据存储模块 中所述已备份的管理数据信息。
3、 根据权利要求 1所述的存储设备, 其特征在于,
所述控制器, 还用于在所述增量信息存储模块存储的所述管理数据信息 的增量信息的数量大于预设门限值时, 将所述管理数据信息的增量信息转存 到所述数据存储模块上, 并根据所述管理数据信息的增量信息更新所述数据 存储模块中所述已备份的管理数据信息; 其中, 所述步骤具体包括:
将当前最新的管理数据信息备份到数据存储模块或将增量信息存储模块 中的存储的管理数据信息的增量信息转存到数据存储模块上, 并在需要刷新 管理数据信息时根据所述管理数据信息的增量信息更新所述数据存储模块中 所述已备份的管理数据信息。
4、 根据权利要求 3所述的存储设备, 其特征在于,
所述控制器, 还用于当所述增量信息存储模块存储的所述管理数据信息 的增量信息的数量大于 1时, 将所述管理数据信息的增量信息转存到所述数 据存储模块上, 并按照各个所述管理数据信息的增量信息对应的数据处理的 时间先后顺序, 利用各所述管理数据信息的增量信息更新所述数据存储模块 中所述已备份的管理数据信息。
5、 根据权利要求 1-4任一所述的存储设备, 其特征在于, 所述增量信息 存储模块采用的非易失性存储介质为磁阻随机存取存储器、 铁电存储器或者 非易失静态随机存储器。
6、 根据权利要求 1-4任一所述的存储设备, 其特征在于, 所述管理数据 存储模块采用的存储介质为同步动态随机存储器、 第 2代双倍速率同步动态 随机存储器或第 3代双倍速率同步动态随机存储器。
7、 一种数据存储方法, 其特征在于, 包括:
将用以管理数据存储模块进行数据处理的管理数据信息存储至管理数据 存储模块中;
将数据处理过程中产生的管理数据信息的增量信息存储至增量信息存储 模块中, 以用于在存储设备发生异常断电后, 需要恢复最新的管理数据信息 时, 结合所述数据存储模块中已备份的管理数据信息恢复出所述管理数据存 储模块中存储的所述管理数据信息; 所述增量信息存储模块采用非易失性存 储介质;
根据所述管理数据信息进行数据处理, 并根据数据处理结果相应更新所 述管理数据信息及所述管理数据信息的增量信息。
8、 根据权利要求 7所述的数据存储方法, 其特征在于,
按照预置策略, 将所述管理数据信息的增量信息转存到所述数据存储模 块上, 并根据所述管理数据信息的增量信息更新所述数据存储模块中所述已 备份的管理数据信息。
9、 根据权利要求 7所述的数据存储方法, 其特征在于,
在所述增量信息存储模块存储的所述管理数据信息的增量信息的数量大 于预设门限值时, 将管理数据信息整体备份到所述的数据存储模块上, 并根 据所述管理数据信息的增量信息更新所述数据存储模块中所述已备份的管理 数据信息。
10、 根据权利要求 9所述的数据存储方法, 其特征在于, 当所述增量信 息存储模块存储的所述管理数据信息的增量信息数量大于 1时, 将所述管理 数据信息的增量信息转存到所述数据存储模块上, 并根据所述管理数据信息 的增量信息更新所述数据存储模块中所述已备份的管理数据信息, 包括: 按照各个所述管理数据信息的增量信息对应的数据处理的先后顺序, 利 用各所述管理数据信息的增量信息更新所述数据存储模块中所述已备份的管 理数据信息。
PCT/CN2011/070728 2010-01-29 2011-01-27 存储设备和数据存储方法 WO2011091761A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010104788.2 2010-01-29
CN201010104788.2A CN101782875B (zh) 2010-01-29 2010-01-29 存储设备和数据存储方法

Publications (1)

Publication Number Publication Date
WO2011091761A1 true WO2011091761A1 (zh) 2011-08-04

Family

ID=42522879

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/070728 WO2011091761A1 (zh) 2010-01-29 2011-01-27 存储设备和数据存储方法

Country Status (2)

Country Link
CN (1) CN101782875B (zh)
WO (1) WO2011091761A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018059361A1 (zh) * 2016-09-29 2018-04-05 华为技术有限公司 一种存储系统掉电保护方法、存储控制器及电子设备

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101782875B (zh) * 2010-01-29 2012-01-04 成都市华为赛门铁克科技有限公司 存储设备和数据存储方法
CN103685350B (zh) * 2012-09-04 2016-12-21 阿里巴巴集团控股有限公司 存储系统的同步方法及相关的设备
CN103049221A (zh) * 2012-12-19 2013-04-17 创新科存储技术有限公司 磁盘阵列缓存刷写处理方法和装置
CN103902406A (zh) * 2012-12-31 2014-07-02 杨威锋 高可靠性固态存储设备的映射表信息的保存和恢复技术
US10162561B2 (en) * 2016-03-21 2018-12-25 Apple Inc. Managing backup of logical-to-physical translation information to control boot-time and write amplification
CN106875977A (zh) * 2017-02-27 2017-06-20 郑州云海信息技术有限公司 一种固态硬盘调试方法及装置
KR102418856B1 (ko) * 2017-11-02 2022-07-07 삼성전자주식회사 데이터 저장 장치
CN108762989B (zh) * 2018-06-05 2021-08-31 郑州云海信息技术有限公司 固态硬盘的数据存储方法、装置、设备及可读存储介质
CN109086222B (zh) * 2018-07-24 2023-08-25 浪潮电子信息产业股份有限公司 固态硬盘的数据恢复方法以及固态硬盘
CN109597773B (zh) * 2018-12-10 2024-01-23 浪潮(北京)电子信息产业有限公司 一种ssd及其数据掉电保护方法、系统、装置
CN110658999B (zh) * 2019-09-26 2022-07-22 苏州浪潮智能科技有限公司 一种信息更新方法、装置、设备及计算机可读存储介质
CN111913835A (zh) * 2020-07-30 2020-11-10 深圳忆联信息系统有限公司 基于交叉映射的数据多备份存储方法、装置、计算机设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1389793A (zh) * 2001-06-04 2003-01-08 日本先锋公司 数据记录设备和数据擦除设备
US20060230108A1 (en) * 2005-04-07 2006-10-12 Olympus Corporation Information display system
US20090248755A1 (en) * 2008-03-28 2009-10-01 Satoru Watanabe System and method for data backup using log records
CN101782875A (zh) * 2010-01-29 2010-07-21 成都市华为赛门铁克科技有限公司 存储设备和数据存储方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050036387A1 (en) * 2002-04-24 2005-02-17 Seal Brian K. Method of using flash memory for storing metering data
CN100590606C (zh) * 2005-12-14 2010-02-17 兆日科技(深圳)有限公司 闪速存储器数据完整性保护方法
CN101251826B (zh) * 2007-02-27 2010-09-01 深圳市同洲电子股份有限公司 闪速存储器、用于闪速存储器的数据管理方法及设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1389793A (zh) * 2001-06-04 2003-01-08 日本先锋公司 数据记录设备和数据擦除设备
US20060230108A1 (en) * 2005-04-07 2006-10-12 Olympus Corporation Information display system
US20090248755A1 (en) * 2008-03-28 2009-10-01 Satoru Watanabe System and method for data backup using log records
CN101782875A (zh) * 2010-01-29 2010-07-21 成都市华为赛门铁克科技有限公司 存储设备和数据存储方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018059361A1 (zh) * 2016-09-29 2018-04-05 华为技术有限公司 一种存储系统掉电保护方法、存储控制器及电子设备

Also Published As

Publication number Publication date
CN101782875B (zh) 2012-01-04
CN101782875A (zh) 2010-07-21

Similar Documents

Publication Publication Date Title
WO2011091761A1 (zh) 存储设备和数据存储方法
US20220139455A1 (en) Solid state drive architectures
US8862808B2 (en) Control apparatus and control method
CN109643275B (zh) 存储级存储器的磨损均衡设备和方法
US10776153B2 (en) Information processing device and system capable of preventing loss of user data
CN104350477B (zh) 用于固态驱动装置(ssd)的优化的上下文移除
US10289408B2 (en) Managing wear of system areas of storage devices
US10275310B2 (en) Updating exclusive-or parity data
US10838629B2 (en) Solid state device with fast boot after ungraceful shutdown
US9037787B2 (en) Computer system with physically-addressable solid state disk (SSD) and a method of addressing the same
US8255637B2 (en) Mass storage system and method of operating using consistency checkpoints and destaging
JP2001296974A (ja) データ記憶システム及びデータ記憶方法
JP2010211734A (ja) 不揮発性メモリを用いた記憶装置
US20110010582A1 (en) Storage system, evacuation processing device and method of controlling evacuation processing device
US9514052B2 (en) Write-through-and-back-cache
JP2006099802A (ja) 記憶制御装置およびキャッシュメモリの制御方法
CN113711189A (zh) 用于管理固态驱动器上的降低电力故障能量需求的系统及方法
CN112083883B (zh) 存储系统以及用于存储系统中的方法
US11816349B2 (en) Reduce command latency using block pre-erase
KR20230127934A (ko) 캐시 일관성 상호 연결 인터페이스를 포함하는 영구 메모리 장치
JP2012113474A (ja) 記録再生装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11736643

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 191212)

122 Ep: pct application non-entry in european phase

Ref document number: 11736643

Country of ref document: EP

Kind code of ref document: A1