Double writing map table entries in a data storage system to guard against silent corruption

Information

  • Patent Grant
  • 9384088
  • Patent Number
    9,384,088
  • Date Filed
    Thursday, April 10, 2014
    10 years ago
  • Date Issued
    Tuesday, July 5, 2016
    8 years ago
Abstract
A method for writing data in a data storage device includes: writing data to a physical memory location in a non-volatile memory; writing, for a first time, to a location in a volatile memory corresponding to a logical address of the data, a physical address of the physical memory location of the non-volatile memory containing the data; and writing, for a second time, to the location in the volatile memory corresponding to the logical address of the data, the address of the physical memory location of the non-volatile memory containing the data. The physical address of the physical memory location is written with appended error detection code information, and the error detection code information is determined based on the logical address of the data.
Description
BACKGROUND

1. Technical Field


Apparatuses and methods consistent with the present inventive concept relate to data storage systems, and more particularly to double writing of map table entries in a data storage system to avoid silent corruption.


2. Related Art


Any data storage device that uses address indirection relies on a map table to point to a physical location of a latest copy of data at various logical page (L-page) addresses. Thus, the map table serves an important function of maintaining a logical-to-physical correspondence of stored data. Map table entries may be stored in volatile memory such as dynamic random access memory (DRAM). However, map table entries are susceptible to silent corruption.





BRIEF DESCRIPTION OF THE DRAWINGS

Aspects and features of the present inventive concept will be more apparent by describing example embodiments with reference to the accompanying drawings, in which:



FIG. 1 is a block diagram illustrating a data storage system according to an example embodiment of the present inventive concept;



FIG. 2 is a diagram illustrating a relationship between a map table and a physical memory;



FIG. 3 is a diagram illustrating an occurrence of silent corruption in a map table;



FIG. 4 is a flowchart illustrating a method for writing data in a storage device according to an example embodiment of the present inventive concept;



FIG. 5 is a diagram illustrating detection of a map table error according to an example embodiment of the present inventive concept;



FIG. 6 is a flow chart illustrating a method for writing data in a storage device after a memory read according to an example embodiment of the present inventive concept and



FIGS. 7A and 7B are diagrams illustrating a relationship between a map table and a physical memory a method for writing data in a storage device after a memory read according to an example embodiment of the present inventive concept.





DETAILED DESCRIPTION

While certain embodiments are described, these embodiments are presented by way of example only, and are not intended to limit the scope of protection. The 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 example methods and systems described herein may be made without departing from the scope of protection.


Overview


Example embodiments of the present inventive concept provide a method of guarding against silent corruption in a data storage system.



FIG. 1 is a block diagram illustrating a data storage system according to an example embodiment of the present inventive concept. The data storage system 100 may include a host 120 and a data storage device (DSD) such as a solid-state drive (SSD) 110. The SSD 110 may include a control unit 130, a volatile memory 140, for example, but not limited to, a plurality of dynamic random access memory (DRAM) devices or other volatile memory, and a non-volatile memory 150, for example, but not limited to, a non-volatile semiconductor memory (NVSM). The NVSM may be, for example, but not limited to, NAND flash memory devices, NOR flash memory devices, or other NVSM memory devices. The host 120 may issue data read and write commands to the SSD 110. The volatile memory 140 may store a map table. A DSD is generally a device that electronically stores data, so in other embodiments, the DSD may additionally include other types of memory such as rotational magnetic media (e.g., a solid-state hybrid drive (SSHD)).



FIG. 2 is a diagram illustrating a relationship between a map table and a non-volatile physical memory. As illustrated in FIGS. 1 and 2, the map table 210 may be arranged in the volatile memory 140 with memory locations 215 assigned according to a consecutive order (e.g., according to L-page address) and each memory location 215 may contain an entry of a physical address 230 of a physical memory location 225 in non-volatile memory 150 that holds data corresponding to a logical address of the data (L-page) 235. The entries in the memory locations 215 in the map table 210 may be indexed at least in part according to the L-page 235. Referring to FIG. 2, data corresponding to L-page0 may be stored at a physical memory location 225 in the non-volatile memory 150 having a physical address 230 aaa, data corresponding to L-page1 may be stored at a physical memory location 225 in the non-volatile memory 150 having a physical address 230 address bbb, etc. Thus, the map table 210 acts as a set of pointers to the physical memory locations 225 of L-page data in the non-volatile memory 150. Each time L-page data is updated, the new data will be written to a new physical memory location 225 in the non-volatile memory 150. Accordingly, the entries in the memory locations 215 in the map table 210 for the updated L-page data must also be updated to refer to the physical addresses 230 of the new physical memory locations 225 of the data in the non-volatile memory 150.



FIG. 3 is a diagram illustrating an occurrence of silent corruption in a map table. Silent corruption occurs when an update to the map table 210 is written to the wrong map table entry. Referring to FIGS. 1, 2, and 3, an example scenario is described which involves a new write to L-page address 4001. In this example, the entry in the memory location 215a (i.e., the E-page location) in the map table 210 in the volatile memory 140 corresponding to data for L-page 4001 should have been updated. However, the update was erroneously written to the map table entry in the memory location 215b corresponding to L-page C001 in the L-page indexed map table 210. This could be caused by a bit flip in the L-page address 4001 to C0001. Hence, the map table entry in the memory location 215a corresponding to L-page 4001 points to stale data stored at the old physical address in the non-volatile memory 150. This is an undetectable problem because on the next request for L-page 4001 by the host 120, no mechanism exists to determine that the map table entry in the memory location 215b corresponding to L-page 4001 is stale.


In the map table 210, the entry in the memory location 215 of the physical address 230 for the physical memory location 225 in the non-volatile memory 150 is written with error detection code information 216, for example, but not limited to, cyclic redundancy code (CRC), a hash value, etc., appended to the entry. The error detection code information 216 is determined based at least in part on the L-page address 235 of the data stored at the physical memory location 225 in the non-volatile memory 150. However, a check of the error detection code information 216a in the map table entry in the memory location 215a corresponding to the stale data at L-page 4001 will evaluate correctly since the error detection code information 216a is seeded with the value of L-page 4001. Accordingly, the stale data will be passed to the host 120 undetected. The undetectable the stale data problem is termed “silent corruption” of data. Note that, however, the error detection code information 216b is effective in triggering an error condition, since error detection code information 216b is generated based on L-page 4001, but it is written in the entry for L-page C001 which will generate a mismatch.


Double Writing Map Table Entries


Some embodiments of the present inventive concept provide a double writing procedure to write each map table update twice to guard against the undetectable problem of silent corruption where an update to an entry is erroneously written to an incorrect location leaving the intended location pointing to stale data.


As discussed above, when data corresponding to an L-page 235 is updated, the updated data is written to a different physical memory location 225 in non-volatile memory 150 than the original data. The updated data may be data received from a host 120 or may be data read from a physical address 230 of a physical memory location 225 in the non-volatile memory 150, for example during garbage collection. In either case, the new physical address 230 corresponding to the updated data at the L-page 235 should be written to the map table 210. In one embodiment, this is performed at least twice. First, the new physical address 230 is written to the map table entry in the memory location 215 corresponding to the L-page 235 for the data that was updated. Then, the same new physical address 230 is written a second time to the same map table entry in the memory location 215.


By writing twice, the chance of silent corruption is reduced. Given that the probability of writing an update to the wrong location in the map table is 1/P, the probability of writing an update to the wrong location twice becomes 1/P×1/P=1/P2.


If both update attempts write to the same correct L-page indexed location of the map table 210 no problem is caused and a subsequent read at that L-page 235 would return the correct data.



FIG. 4 is a flowchart illustrating a method for writing data in a storage device according to an example embodiment of the present inventive concept. Referring to FIGS. 1, 2, and 4, the control unit 130 may be configured to receive data for an L-page 235c from a host 120 (410), and write the data to a physical memory location 225c at a physical address yyy 230c in the non-volatile memory 150 (420).


The control unit 130 may be configured to write for a first time the physical address yyy 230c of the physical memory location 225c containing the data corresponding to the L-page 235c to the entry in the memory location 215c in the map table 210 corresponding to the L-page 235c (430). The control unit 130 may be further configured to write for a second time the physical address yyy 230c to the entry in the memory location 215c, thereby reducing the chance of silent corruption.



FIG. 5 is a diagram illustrating detection of a map table error according to an example embodiment of the present inventive concept. As illustrated in FIG. 5, if one update attempt writes to the incorrect entry in the memory location 215b in the map table 210 but the second update attempt writes to the correct entry in the memory location 215a in the map table 210, the intended entry in the memory location 215a in the map table 210 will have been correctly updated. The update to the incorrect entry in the memory location 215b in the map table 210 is detectable by the error detection code 216b, for example, a CRC mismatch due to the fact that the CRC is L-page value seeded, and an error will be reported when the incorrectly updated entry in the memory location 215b in the map table 210 is subsequently read.


Thus, example embodiments of the present inventive concept reduce the probability of map table errors resulting from update errors, and mitigate the undetectable silent corruption problem.



FIG. 6 is a flow chart illustrating a method for writing data in a storage device after a memory read according to an example embodiment of the present inventive concept. FIGS. 7A and 7B are diagrams illustrating a relationship between a map table and a physical memory a method for writing data in a storage device after a memory read according to an example embodiment of the present inventive concept.


Referring to FIGS. 1, 6, 7A, and 7B, the control unit 130 may be configured to read data corresponding to an L-page 235c from a first physical location 225c at a first physical address yyy 230c in the non-volatile memory 150 (610), and to subsequently write the data corresponding to the L-page 235c to a second physical memory location 225d at a second physical address www 230d in the non-volatile memory 150 (620). The control unit 130 may be further configured to modify the data that was read before subsequently writing the data to the second physical memory location 225d.


The control unit 130 may be configured to write for a first time the second physical address www 230d of the second physical memory location 225d containing the subsequently written data corresponding to the L-page 235c to the entry in the memory location 215c (630). The control unit 130 may be further configured to write for a second time the second physical address www 230d to the entry in the memory location 215c (640), thereby reducing the chance of silent corruption.


While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the protection. The methods and systems described herein may be embodied in a variety of other forms. Various omissions, substitutions, and/or changes in the form of the example methods and systems described herein may be made without departing from the spirit of the protection.


The example embodiments disclosed herein can be applied to solid state drives, hybrid hard drives, and the like. Solid-state memory may comprise a wide variety of technologies, such as flash integrated circuits, Phase Change Memory (PC-RAM or PRAM), Programmable Metallization Cell RAM (PMC-RAM or PMCm), Ovonic Unified Memory (OUM), Resistance RAM (RRAM), NAND memory, NOR memory, EEPROM, Ferroelectric Memory (FeRAM), MRAM, or other discrete NVM (non-volatile solid-state memory) chips. In addition, other forms of storage, for example, but not limited to, DRAM or SRAM, battery backed-up volatile DRAM or SRAM devices, EPROM, EEPROM memory, etc., may additionally or alternatively be used. As another example, various components illustrated in the figures may be implemented as software and/or firmware on a processor, ASIC/FPGA, or dedicated hardware. Also, the features and attributes of the specific example 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 example 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.

Claims
  • 1. A method for writing data in a data storage device using a control unit, the method comprising: writing, by the control unit, data to a physical memory location in a non-volatile memory;sending, by the control unit, a first update request corresponding to the data to write a physical address of the physical memory location to a location in a volatile memory corresponding to a logical address of the data; andsending, by the control unit, a second update request corresponding to the data to write the physical address of the physical memory location to the location in the volatile memory corresponding to the logical address of the data, thereby reducing a probability of writing the physical address of the physical memory location to a wrong location in the volatile memory;wherein the physical address of the physical memory location is written with appended error detection code information, andthe error detection code information is determined based on the logical address of the data.
  • 2. The method of claim 1, wherein the location in the volatile memory comprises at least a portion of a map table.
  • 3. The method of claim 2, wherein the map table is arranged with memory locations assigned according to a consecutive order.
  • 4. The method of claim 1, wherein the data is received from a host.
  • 5. The method of claim 1, wherein the data is read from another physical address of the non-volatile memory prior to writing the data to the physical memory location.
  • 6. The method of claim 5, further comprising modifying the data read from the other physical address of the non-volatile memory before writing the data.
  • 7. A data storage device, comprising: a non-volatile memory;a volatile memory;a control unit configured to: write data to a physical memory location in the non-volatile memory;send a first update request corresponding to the data to write a physical address of the physical memory location to a location in a volatile memory corresponding to a logical address of the data; andsend a second update request corresponding to the data to write the physical address of the physical memory location to the location in the volatile memory corresponding to the logical address of the data, thereby reducing a probability of writing the physical address of the physical memory location to a wrong location in the volatile memory,wherein the address of the physical memory location is written with appended error detection code information, andthe error detection code information is determined based on the logical address of the data.
  • 8. The data storage device of claim 7, wherein the volatile memory comprises a map table.
  • 9. The data storage device of claim 8, wherein the map table is arranged with memory locations assigned according to a consecutive order.
  • 10. The data storage device of claim 7, wherein the volatile memory is dynamic random access memory (DRAM).
  • 11. The data storage device of claim 7, wherein the non-volatile memory is a non-volatile semiconductor memory (NVSM).
  • 12. The data storage device of claim 11, wherein the NVSM comprises NAND flash memory devices.
  • 13. The data storage device of claim 7, wherein the data is received from a host.
  • 14. The data storage device of claim 7, wherein the data is read from another physical address of the non-volatile memory prior to writing the data to the physical memory location.
  • 15. The data storage device of claim 14, wherein the control unit is further configured to modify the data read from the other physical address of the non-volatile memory before writing the data.
CROSS-REFERENCE TO RELATED APPLICATION(S)

This application claims the benefit of U.S. provisional application No. 61/943,780 filed Feb. 24, 2014, the disclosure of which is hereby incorporated in its entirety by reference.

US Referenced Citations (100)
Number Name Date Kind
6000006 Bruce Dec 1999 A
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
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
8341339 Boyle et al. Dec 2012 B1
8375151 Kan Feb 2013 B1
8392635 Booth et al. Mar 2013 B2
8397107 Syu 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
8578242 Burton Nov 2013 B1
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
20100131723 Yorimitsu May 2010 A1
20100174849 Walston et al. Jul 2010 A1
20100250793 Syu Sep 2010 A1
20110099323 Syu Apr 2011 A1
20110283049 Kang et al. Nov 2011 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
Provisional Applications (1)
Number Date Country
61943780 Feb 2014 US