Solid-state storage device and data processing method thereof during power failure
阅读说明:本技术 固态储存装置及其电源失效时的数据处理方法 (Solid-state storage device and data processing method thereof during power failure ) 是由 李宜忠 谢尚均 曾士豪 毛超远 于 2018-07-06 设计创作,主要内容包括:一种固态储存装置及其电源失效时的数据处理方法,固态储存装置包括:一缓冲器,暂时储存一写入数据;一非挥发性记忆体,包括多个芯片,每一该芯片中包括一第一部分空间作为一数据储存区;以及一控制器,连接至一主机、该缓冲器、该非挥发性记忆体。当一电源失效发生时,若该写入数据未到达一预定数据量时,该控制器对该写入数据进行一同位检查,并产生一同位数据;以及,该控制器将该缓冲器中的该写入数据分配为至少一笔子写入数据,并将该至少一笔子写入数据同时储存至部分该些芯片的该数据储存区,且该控制器将该同位数据以及一位置信息储存至该非挥发性记忆体的一系统储存区。(A solid-state storage device and a data processing method thereof when a power supply fails, the solid-state storage device comprises: a buffer for temporarily storing a write data; a non-volatile memory, which comprises a plurality of chips, wherein each chip comprises a first partial space as a data storage area; and a controller connected to a host, the buffer and the non-volatile memory. When a power failure occurs, if the written data does not reach a preset data volume, the controller carries out a parity check on the written data and generates parity data; and the controller distributes the write data in the buffer into at least one sub-write data and simultaneously stores the at least one sub-write data to the data storage areas of part of the chips, and the controller stores the same-bit data and position information to a system storage area of the non-volatile memory.)
1. A solid state storage device, comprising:
a buffer for temporarily storing a write data;
a non-volatile memory, which comprises a plurality of chips, wherein each chip comprises a first partial space as a data storage area; and
a controller connected to a host, the buffer and the non-volatile memory;
when a power failure occurs, if the written data does not reach a preset data volume, the controller carries out a parity check on the written data and generates parity data; and the controller distributes the write data in the buffer into at least one sub-write data and simultaneously stores the at least one sub-write data to the data storage areas of part of the chips, and the controller stores the same-bit data and position information to a system storage area of the non-volatile memory.
2. The solid state storage device of claim 1, further comprising a voltage detector for receiving a power voltage of the solid state storage device, wherein the voltage detector determines that the power failure occurs when the power voltage drops to a specific voltage value.
3. The solid state storage device of claim 1, wherein the write data is not equal to the predetermined amount of data if the amount of data of the write data plus the amount of data of the parity check does not reach a striped size.
4. The solid-state storage device according to claim 1, wherein the at least one sub-write data is stored in a stripe of the data storage area of the chips, and when the solid-state storage device is restarted and a new write data is to be stored, the new write data is stored in the stripe first.
5. The solid state storage device of claim 1, wherein the controller further generates a system data to be stored in the system storage area when the power failure occurs.
6. The solid state storage device of claim 1, wherein each of the chips comprises a second portion of space, and the second portions of space of the chips are combined into the system storage area.
7. A data processing method of a solid-state storage device, a non-volatile memory in the solid-state storage device comprises a plurality of chips, and each chip comprises a first partial space as a data storage area, the data processing method comprises the following steps:
when the solid-state storage device normally operates, storing write-in data in a buffer, and continuously judging whether a power failure occurs or not;
when the power failure occurs, if the written data does not reach a preset data volume, carrying out a parity check on the written data and generating parity data;
distributing the write data into at least one sub-write data, and simultaneously storing the at least one sub-write data into the data storage areas of part of the chips; and
storing the parity data and a location information into a system storage area of the non-volatile memory.
8. The data processing method of claim 7, wherein the power failure is determined when a power voltage of the solid-state storage device drops to a specific voltage value.
9. The data processing method of claim 7, wherein the write data is not equal to the predetermined data amount if the data amount of the write data plus the data amount of the parity check does not reach a striped size.
10. The data processing method of claim 7, wherein the at least one sub-write data is stored in a stripe of the data storage area of the chips, and when the solid-state storage device is restarted and a new write data is to be stored, the new write data is stored in the stripe first.
11. The data processing method of claim 7, further generating a system data to be stored in the system storage area when the power failure occurs.
12. The data processing method of claim 7, wherein each of the chips comprises a second portion of space, and the second portions of space of the chips are combined into the system storage area.
13. The data processing method of claim 7, further comprising the steps of:
after the power failure occurs, judging whether a false power failure occurs; and
when the false power failure occurs, the solid state storage device is enabled to return to normal operation.
14. The data processing method of claim 13, wherein the power failure is detected to be a power voltage recovery of the solid-state storage device after the power failure occurs, and the power failure is determined to be a false power failure.
Technical Field
The present invention relates to a solid state storage device and a data processing method thereof, and more particularly, to a solid state storage device and a data processing method thereof when a power failure (power failure) occurs.
Background
It is known that data in early computer systems was mostly stored in Hard disks (Hard Disk Drive). A fault-tolerant array of independent disks (RAID) combines multiple hard disks, so that the performance of the RAID exceeds that of one expensive hard disk with a large capacity.
For example, the RAID hard disk includes a plurality of independent hard disks, and during the writing operation, the controller may allocate the write data to a plurality of sub-write data, and write the plurality of sub-write data to all the independent hard disks in the RAID hard disk at the same time.
During reading, the controller obtains multiple sub-read data from all independent hard disks in the RAID hard disk and combines the sub-read data into read data. Therefore, the RAID hard disk has advantages of improving the performance (performance) of data, enhancing the reliability (reliability) of data, increasing the capacity (capacity), and the like.
Since the current solid state storage device has gradually replaced the conventional hard disk, the RAID concept is also applied to a single solid state storage device.
Referring to fig. 1, a schematic diagram of a conventional solid-state storage device is shown. The solid-state storage device 160 includes a controller 162, a buffer 164, and a non-volatile memory 166. The non-volatile memory 166 is composed of a plurality of chips (die) 111-126, and the chips 111-126 can be NAND flash memory chips (NAND flash die). In addition, the buffer 164 may be a Dynamic Random Access Memory (DRAM).
The solid-state storage device 160 is connected to the host (host)150 via an
Further, the controller 162 is connected to the non-volatile memory 166 and the buffer 164. Basically, the controller 162 temporarily stores the write data of the
In order to achieve the performance of the RAID hard disk, the controller 162 may treat each of the chips 111-126 in the non-volatile memory 166 as a separate hard disk.
First, the controller 162 temporarily stores write data of the
When the controller 162 executes a read command of the
Referring to fig. 2A and 2B, schematic diagrams of storing write data in a non-volatile memory are shown. Basically, the controller 162 stores the write data in the buffer 164 into the non-volatile memory 166 only after the write data temporarily stored in the buffer 164 reaches a specific data amount.
Furthermore, most of the space in each of the chips 111-126 is allocated as data storage areas (data storage areas) 111 d-126 d. The controller 162 can store the write data of the
Furthermore, the data storage areas (data storage areas) 111d to 126d of the
That is, each specific storage space (e.g., 10Kbytes) in the data storage areas (data storage areas) 111 d-126 d of each of the chips 111-126 is a storage space logically combined into one stripe (stripe). The storage space of each stripe is the striping size (stripe size).
Furthermore, after 150Kbytes of write data is temporarily stored in the buffer 164, the controller 164 performs a parity check on the 150Kbytes of write data and generates 10Kbytes of parity data. Therefore, the write data plus the same-bit data corresponds to 160Kbytes of the striping size (stripe size).
After the controller 162 divides the 150Kbytes write data area into 15 sub-write data Da1 Da15, the controller 162 stores the sub-write data Da1 Da15 and the identical data Dap into the first stripe (stripe) SP1 of the
As shown in FIG. 2A, the
Furthermore, when the controller 162 executes the read command, the controller 162 obtains 15 sub-write data Da1 Da15 and the same-bit data Dap from the chips 111-126 at the same time, and performs the parity check to combine the sub-write data and the same-bit data into 150Kbytes of read data, and then transmits the 150Kbytes of read data to the
As shown in FIG. 2B, when the 150Kbytes of write data are temporarily stored in the buffer 164 again, the controller 164 performs the same operation and stores the 15 sub-write data Db 1-Db 15 and the same bit data Dbp into the second stripe SP2 of the
Furthermore, the striping size (stripe size) of the solid-state storage device 160 is not limited to 160Kbytes, and the number of chips in the non-volatile memory 166 is not limited to 16 chips. For example, there are n chips in the nonvolatile memory 166, and the striping size of the solid-state storage device 160 is set to mKbytes. Thus, the size of each sub-write data is (m/n) Kbytes.
Disclosure of Invention
The invention aims to provide a solid-state storage device and a data processing method thereof when a power supply fails.
The invention provides a solid-state storage device, comprising: a buffer for temporarily storing a write data; a non-volatile memory, which comprises a plurality of chips, wherein each chip comprises a first partial space as a data storage area; and a controller connected to a host, the buffer and the non-volatile memory. When a power failure occurs, if the written data does not reach a preset data volume, the controller carries out a parity check on the written data and generates parity data; and the controller distributes the write data in the buffer into at least one sub-write data and simultaneously stores the at least one sub-write data to the data storage areas of part of the chips, and the controller stores the same-bit data and position information to a system storage area of the non-volatile memory.
The invention relates to a data processing method of a solid-state storage device, wherein a non-volatile memory in the solid-state storage device comprises a plurality of chips, and each chip comprises a first partial space as a data storage area. The data processing method comprises the following steps: when the solid-state storage device normally operates, storing write-in data in a buffer, and continuously judging whether a power failure occurs or not; when the power failure occurs, if the written data does not reach a preset data volume, carrying out a parity check on the written data and generating parity data; distributing the write data into at least one sub-write data, and simultaneously storing the at least one sub-write data into the data storage areas of part of the chips; and storing the parity data and a location information into a system storage area of the non-volatile memory.
The invention is described in detail below with reference to the drawings and specific examples, but the invention is not limited thereto.
Drawings
FIG. 1 is a diagram of a conventional solid state memory device;
FIGS. 2A and 2B are schematic diagrams illustrating the storage of write data in a non-volatile memory;
FIG. 3 is a diagram of a solid state memory device according to the present invention;
FIG. 4A is a diagram illustrating a data processing method for a solid-state storage device in a power failure mode according to a first embodiment of the present invention;
FIGS. 4B to 4C are schematic diagrams illustrating a data processing method according to a first embodiment of the invention;
FIG. 5A is a diagram illustrating a data processing method for a solid-state storage device in a power failure mode according to a second embodiment of the present invention;
FIGS. 5B to 5C are schematic diagrams illustrating a data processing method according to a second embodiment of the present invention;
FIG. 6A is a diagram illustrating a data processing method for a solid-state storage device in a power failure mode according to a third embodiment of the present invention;
FIGS. 6B to 6C are schematic diagrams illustrating a data processing method according to a third embodiment of the invention;
FIG. 7A is a diagram illustrating a fourth embodiment of a data processing method when a power failure occurs in a solid-state storage device according to the present invention;
fig. 7B to 7C are schematic diagrams illustrating a data processing method according to a fourth embodiment of the invention.
Detailed Description
The invention will be described in detail with reference to the following drawings, which are provided for illustration purposes and the like:
basically, solid-state storage devices used at the data center (data center) level must be able to ensure data reliability, and therefore, more data protection measures are available for solid-state storage devices. For example, power failure (powerfailure) data protection measures.
Referring to fig. 3, a schematic diagram of a solid-state storage device according to the present invention is shown. Compared to the solid-state storage device of fig. 1. The
As shown in fig. 3, the solid-state storage device 360 includes a capacitor C, a first terminal of the capacitor C receives the power voltage Vcc, and a second terminal of the capacitor C is connected to the ground voltage. Furthermore, the power detection pin pdp of the
According to the embodiment of the invention, the
During the data protection operation, the
Referring to fig. 4A, a first embodiment of a data processing method of a solid-state storage device in the case of power failure is shown.
First, the solid state storage device 360 operates normally (step S402). That is, when the power failure does not occur, the solid state storage device 360 operates normally. At this time, the
When a power failure occurs (step S404), the
Next, the
Next, the
Fig. 4B to 4C are schematic diagrams illustrating a data processing method according to a first embodiment of the invention. For example, the nonvolatile memory 166 has 16 chips 111-126, and the striping size (stripe size) set in the solid state storage device 360 is 160 Kbytes.
According to the embodiment of the present invention, most of the space in each of the chips 111-126 is allocated as a data storage area (data storage area)111 d-126 d, and another part of the
Basically, the system storage area stores system data (system data) which records relevant information in the solid state storage device 360. For example, the system data includes the available space range in the
When the solid-state storage device 360 is turned off, the
As shown in FIG. 4B, 15 sub-write data Da1 Da15 and the same-bit data Dap are already stored in the first stripe SP1 of the
Assuming that a power failure occurs, only 20Kbytes of write data is stored in the buffer 164. At this time, the
As shown in FIG. 4C, the
Then, the
After the above operations are completed, the solid state storage device 360 is powered off (power off) until the remaining power in the capacitor C is exhausted.
As can be seen from the above description, when a power failure occurs, the
However, according to the first embodiment of the present invention, during the data protection operation, the
Referring to fig. 5A, a second embodiment of a data processing method of a solid-state storage device in the case of power failure is shown.
First, the solid state storage device 360 operates normally (step S502). That is, when the power failure does not occur, the solid state storage device 360 operates normally. At this time, the
When a power failure occurs (step S504), the
Next, the
Next, the
Referring to fig. 5B to 5C, schematic diagrams of a data processing method according to a second embodiment of the invention are shown. The non-volatile memory 166 has 16 chips 111-126, and the striping size (stripe size) set in the solid-state storage device 360 is 160 Kbytes.
As shown in FIG. 5B, 15 sub-write data Da1 Da15 and the same-bit data Dap are already stored in the first stripe SP1 of the
Assuming that a power failure occurs, only 20Kbytes of write data is stored in the buffer 164. At this time, the
As shown in FIG. 5C, the
Then, the
After the above operations are completed, the solid state storage device 360 is powered off (power off) until the remaining power in the capacitor C is exhausted.
Compared to the first embodiment, the
Referring to fig. 6A, a third embodiment of a data processing method of a solid-state storage device in the case of power failure is shown.
First, the solid state storage device 360 operates normally (step S602). That is, when the power failure does not occur, the solid state storage device 360 operates normally. At this time, the
When a power failure occurs (step S604), the
Next, the
Next, the
Fig. 6B to 6C are schematic diagrams illustrating a data processing method according to a third embodiment of the invention. The non-volatile memory 166 has 16 chips 111-126, and the striping size (stripe size) set in the solid-state storage device 360 is 160 Kbytes.
As shown in FIG. 6B, 15 sub-write data Da1 Da15 and the same-bit data Dap are already stored in the first stripe SP1 of the
Assuming that a power failure occurs, only 20Kbytes of write data is stored in the buffer 164. At this time, the
As shown in FIG. 6C, the
Then, the
After the above operations are completed, the solid state storage device 360 is powered off (power off) until the remaining power in the capacitor C is exhausted.
According to the third embodiment of the present invention, the
Referring to fig. 7A, a fourth embodiment of a data processing method of a solid-state storage device in the case of power failure is shown. Compared with the third embodiment of the present invention, the fourth embodiment adds a step of determining whether the power supply voltage Vcc is a false power failure (step S614).
Basically, when the power fails, the
Referring to fig. 7B to 7C, schematic diagrams of a data processing method according to a fourth embodiment of the invention are shown. Fig. 7B is a sequence of operations shown in fig. 6C.
As shown in fig. 6C, after the
Since 20Kbytes of write data have been temporarily stored in the buffer 164. Therefore, when the
As shown in FIG. 7B, in normal operation, the
As shown in fig. 7C, assuming that 10Kbytes of write data is received again in the buffer 164, a power failure occurs. At this time, the
Next, the
Then, the
After the above operations are completed, the
As can be seen from the above description, the present invention provides a solid-state storage device and a data processing method thereof when a power supply fails. A
Furthermore, the
In addition, in the present invention, a small portion of the
The present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof, and it should be understood that various changes and modifications can be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.
- 上一篇:一种医用注射器针头装配设备
- 下一篇:存储器系统及该存储器系统的操作方法