CN101777013A - Solid state disk and data read-write method - Google Patents

Solid state disk and data read-write method Download PDF

Info

Publication number
CN101777013A
CN101777013A CN 200910000221 CN200910000221A CN101777013A CN 101777013 A CN101777013 A CN 101777013A CN 200910000221 CN200910000221 CN 200910000221 CN 200910000221 A CN200910000221 A CN 200910000221A CN 101777013 A CN101777013 A CN 101777013A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
data
read
address
area
backup
Prior art date
Application number
CN 200910000221
Other languages
Chinese (zh)
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

Links

Abstract

The invention discloses a solid state disk and a data read-write method. The solid state disk comprises a memory unit, a write-in control unit and a read control unit, wherein the memory unit comprises an original data region and a backup data region, which have identical memory space structure, and the memory space address of the original data region corresponds to that of the backup data region one by one; the write-in control unit is used for simultaneously writing the data into the original data region and the backup data region of the memory unit according to the data write-in command; and the read control unit is used for reading the data from the original data region of the memory unit according to the data reading command, and when the read error happens, the data is read from the backup data region of the memory unit according to the correspondence of the memory space address. With the above technical scheme, the properties of the solid state disk flash memory chip is used for performing the identical write-in operation for different memory regions of the same hard disk, so the reliability of the data is improved under the condition that the performance of the hard disk is not influenced.

Description

一种固态硬盘及数据读写方法 A solid state hard drive, and data read and write methods

技术领域 FIELD

[0001] 本发明涉及数据存储技术领域,特别涉及一种固态硬盘及数据读写方法。 [0001] The present invention relates to data storage technology, and particularly relates to a solid state hard drive, and data read and write methods.

背景技术 Background technique

[0002] 固态硬盘(Solid State Disk, SSD),是由控制单元和固态存储单元组成的硬盘, [0002] SSD (Solid State Disk, SSD), solid state by the control unit and a hard disk storage units,

其接口规范、功能及使用方法上与普通硬盘相同。 Its interface specification, the function and use the same general hard disk. 由于固态硬盘没有普通硬盘的机械旋转 Because SSDs no ordinary mechanical hard disk rotation

装置,因此具有读写速度快、工作噪音低、抗震性好、工作温度范围大等特点。 It means, thus having a read and write speed, low noise, good vibration resistance, wide operating temperature range and so on.

[0003] 目前,固态硬盘的存储介质大多采用非易失性的闪存(flash)芯片,其优点是数 [0003] Currently, most of the SSD uses a non-volatile storage medium of a flash memory (flash) chip, which is the number of the advantages

据保护不受电源控制、移动方便,可以适应于多种环境,缺点在于闪存块有时会存在读写错 It is protected from power control, easy to move, it can be adapted to a variety of environments, and sometimes the disadvantage that the flash block write error is present

误,影响数据的可靠性。 Error, affect the reliability of the data.

[0004] 针对上述问题,我们可以通过建立冗余数据的方法来提高数据的可靠性,一种比较常用的方案是使用备份软件或数据同步软件,这种方法的缺点在于:要求用户进行额外的设置或操作,并且在进行数据备份或同步时,需要占用系统资源,对硬盘的读写性能造成影响。 [0004] In response to these problems, we can improve reliability of data by a method for establishing redundant data, a relatively common solution is to use synchronization software or data backup software, the disadvantage of this method is: the user requires additional when setting or operation, and performing data backup or synchronization, required system resources, affecting the performance of the hard disk read and write.

发明内容 SUMMARY

[0005] 有鉴于此,本发明实施例提供了一种固态硬盘及数据读写方法,以实现在不影响读写性能的情况下,提高固态硬盘的数据可靠性,技术方案如下: [0006] —种固态硬盘,包括: [0005] In view of this, embodiments of the present invention provides a solid state drive and a method of reading and writing data, in order to achieve without affecting the read and write performance, improve reliability of the data SSD, technical solutions are as follows: [0006] - solid-state hard drive, including:

[0007] 存储单元,包括具有相同存储空间结构的原始数据区域和备份数据区域,所述原始数据区域的存储空间地址,与所述备份数据区域的存储空间地址一一对应; [0008] 写入控制单元,用于根据数据写入指令,将数据同时写入所述存储单元的原始数据区域和备份数据区域; [0007] The storage unit, including the original data area and the backup data storage region having the same configuration, the memory address of the original data area, and the address of the backup data storage region of one correspondence; [0008] Write a control unit for writing data according to the instruction, the data is written to the memory cell area and the backup data of the original data area;

[0009] 读取控制单元,用于根据数据读取指令,由所述存储单元的原始数据区域读取数据,如果出现读取错误,则根据所述存储空间地址的对应关系,由所述存储单元的备份数据区域读取数据。 [0009] The reading control unit, in accordance with an instruction for reading data from the storage unit to read data of the original data area, if the read error occurs, the storage space according to the correspondence address, by the memory backup data area of ​​the read data unit.

[0010] —种固态硬盘的数据读写方法,包括: [0010] - Data read and write methods of solid-state hard drive, comprising:

[0011] 当接收到数据写入指令时,将数据同时写入固态硬盘的原始数据区域和备份数据区域; [0011] Upon receiving the data write instruction, the data is written to the original data area and the backup data area of ​​the SSD;

[0012] 当接收到数据读取指令时,由固态硬盘的原始数据区域读取数据,如果出现读取错误,则根据原始数据区域与备份数据存储空间地址的对应关系,由备份数据区域读取数据; [0012] When receiving a data read command to read data from the original data area of ​​the SSD, if a read error occurs, the corresponding relationship between the original data in accordance with the backup data storage region address space, the backup data area is read by data;

[0013] 其中,所述原始数据区域和所述备份数据区域具有相同的存储空间结构,所述原 [0013] wherein, the original data area and the backup data storage region having the same structure, the original

始数据区域的存储空间地址,与所述备份数据区域的存储空间地址一一对应。 Start address data storage area, the storage space of one correspondence with the address of the backup data area.

[0014] 以上技术方案,应用固态硬盘闪存芯片的特性,同时对一块硬盘的多个存储区域 [0014] The above technical solution, the application characteristics SSD flash chip while a plurality of storage areas of the hard disk

进行相同的写入操作,当数据读取错误时,则自动从备份存储区域中读取数据,在不影响硬盘性能的情况下,提高了数据的可靠性。 The same writing operation, when a data read error, data is automatically read from the backup storage area, without affecting the performance of the hard disk, to improve the reliability of data. 附图说明 BRIEF DESCRIPTION

[0015] 图1为本发明实施例固态硬盘的结构示意图; [0016] 图2为本发明实施例固态硬盘的存储空间结构示意图; [0017] 图3为本发明实施例固态硬盘的数据写操作示意图; [0018] 图4为本发明实施例固态硬盘的块擦除操作示意图; [0019] 图5为本发明实施例固态硬盘的另一种结构示意图; [0020] 图6为本发明实施例数据恢复单元的结构示意图; [0021] 图7为本发明实施例的数据读取方法流程图; [0022] 图8为本发明实施例的数据恢复方法流程图。 Write Operation [0017] FIG. 3 embodiment SSD data embodiment of the invention; [0015] FIG. 1 is a schematic structural embodiment of the SSD embodiment of the invention; [0016] FIG. 2 is a schematic view of the storage space of the SSD configuration example embodiment of the invention a schematic view; [0018] FIG. 4 is a block schematic embodiment SSD embodiment of the invention erase operation; [0019] FIG. 5 schematic structural diagram of another embodiment of the present invention, solid state disk; [0020] FIG. 6 embodiment of the invention schematic structural diagram of data recovery unit; [0021] FIG. 7 embodiment of data reading method of the present invention, a flow chart; data of an embodiment [0022] Figure 8 is a flowchart of a method to restore the invention.

具体实施方式 detailed description

[0023] 首先对本发明实施例所提供的一种固态硬盘进行介绍,参见图1所示,包括: [0024] 存储单元110,包括具有相同存储空间结构的原始数据区域和备份数据区域,所述原始数据区域的存储空间地址,与所述备份数据区域的存储空间地址一一对应; [0025] 写入控制单元120,用于根据数据写入指令,将数据同时写入所述存储单元的原始数据区域和备份数据区域; [0023] A solid state drive is provided first embodiment of the embodiment of the present invention will be described, referring to FIG. 1, comprising: [0024] The storage unit 110 includes a raw data area and a backup data storage regions of the same structure, the memory address of the original data area, and the address of the backup data storage region of one correspondence; [0025] the write control unit 120, according to an instruction for writing data, the data is written to the memory cells of the original data area and a backup data area;

[0026] 读取控制单元130,用于根据数据读取指令,由所述存储单元的原始数据区域读取数据,如果出现读取错误,则根据所述存储空间地址的对应关系,由所述存储单元的备份数据区域读取数据。 [0026] The reading control unit 130, according to an instruction for reading data from the original data storage unit to read data area, if the read error occurs, the storage space according to the correspondence address, by the backup data storage unit to read data area.

[0027] 其中,所述存储单元110的存储空间示意图,可参见图2所示。 [0027] wherein the storage unit stores schematic space 110, see Figure 2. 在固态硬盘中,基本的存储单位为闪存块(block),图2所示的存储空间中,所有的闪存块被划分为两部分,其 In the SSD, the basic unit of storage is a flash memory block (Block), the storage space shown in Figure 2, all of the flash memory block is divided into two parts, which

中block0、block2、block4......构成plane0,blockl、block3、block5......构成planel, In block0, block2, block4 ...... constituting plane0, blockl, block3, block5 ...... configured planel,

我们将plane0作为原始数据区,将planel作为备份数据区。 We will plane0 as raw data area, the planel as a backup data area.

[0028] 原始数据区和备份数据区的具有完全一致的大小及存储空间结构,并且存储空间 [0028] original data area and the backup data area has exactly the same size and structure of storage space, storage space and

的地址一一对应,如图2所示,原始数据区中的地址0000h、0001h......分别对应备份数据 The address corresponding to one shown in Figure 2, the address 0000h in the original data area, backup data corresponding 0001H ......

区中的地址1000h、1001h......,也就是说,对于原始数据区中的任意一个存储空间地址, Area address 1000h, 1001h ......, that is, for any raw data area of ​​a memory address space,

都能在备份数据区域中找到一个与之相对应的地址。 It can be found with a corresponding address in the backup data area.

[0029] 当所述写入控制单元120,接收到数据写入操作指令后,会将数据写入原始数据区域和备份数据区域,由于固态硬盘闪存芯片具有two plane block的特性,因此可以将数据同时写入两部分区域,并且,相对于只写入一部分区域的写操作来说,写入速度也不会变慢。 After [0029] When the write control unit 120 receives the instruction data write operation, writes the data to the original data area and the backup data area, since the solid state disk flash memory chips has a characteristic two plane block, so data can be simultaneously write two partial regions, and, with respect to the operation of writing only a portion of the write area, the writing speed is not slow.

[0030] 存储空间地址可以由物理地址和逻辑地址来表示,其中物理地址是对应硬盘的实际物理结构(例如固态硬盘中的闪存块block、页面page等)所编排的地址,图2所示的地址即为物理地址;而逻辑地址则用于方便计算机对硬盘进行访问。 [0030] The memory address space may be represented by a physical address and a logical address, wherein the physical address is the actual physical structure (e.g., the solid state disk flash block Block, page page, etc.) corresponding to the arrangement of the hard disk address, shown in FIG. 2 address is a physical address; and the logical address is used to facilitate access to a computer hard disk. 一般来说,硬盘的读写操作所直接访问的都是逻辑地址,该逻辑地址与硬盘的物理地址具有一定的映射关系,在本发明实施例中,我们可以将原始数据区域的物理地址和备份数据区域的物理地址,与相同的逻辑地址建立映射关系。 In general, a hard disk read and write operations are directly accessible logical address, physical address and the logical address of the hard disk has a certain mapping relationship, in the embodiment of the present invention, we can be a physical address of the original data area and the backup physical address of the data area, the same mapping relationship between a logical address. 例如,参见图2所示,可以将0000h和1000h与同一个逻辑地址AO建立映射关系,将OOOlh和lOOlh与同一个逻辑地址Al建立映射关系......以此类 For example, referring to figure, 0000h and 1000h may be establishing a mapping relationship with a logical address AO, and the OOOlh lOOlh establishing mapping relationship with a logical address to such Al 2 ......

推,也可以将OOOOh与lOOlh与同一个逻辑地址AO建立映射关系,将OOOlh与lOOOh与同 Push, it can also OOOOh with lOOlh and establish mapping relationship with a logical address AO, and the same will OOOlh with lOOOh

一个逻辑地址A1建立映射关系,并不局限于具体的顺序......以此类推。 Establishing a mapping relationship between the logical address A1, it is not limited to the specific order ...... and so on. 这样,在对某一 In this way, for a

逻辑地址进行写操作的时候,就可以将数据同时分别写入原始数据区域和备份数据区域的相应物理地址上。 When the logical address of the write operation, the data can be simultaneously written to the corresponding physical address of the original data area and the backup data area.

[0031] 参见图3所示,在固态硬盘中,page是用来进行数据写操作的最小单位,一个block由若干个page组成(图中所示为64个),当进行数据写操作时,数据会被同时写入原始数据区和备份数据区的page中,并且,这两部分区域的page地址都是相互对应的。 [0031] Referring to FIG. 3, in the SSD, page is the minimum unit for performing a data write operation, a block composed of a plurality of page (shown in FIG. 64), when a data write operation, page data is simultaneously written to the original data area and the backup data area, and, the two parts page address area is corresponding to each other. 同理,参见图4所示,当进行块擦除操作时,在两个区域中,具有对应关系的数据块会被同时擦除。 Similarly, referring to FIG. 4, when the block erasing operation, in the two regions, the data blocks having a correspondence relationship are simultaneously erased.

[0032] 在进行正常读取操作时,所述读取控制单元130,仅从原始数据区域读取数据,由于固态硬盘的闪存块有时会出现读写错误,因此在读取数据以后,还会对所读取的数据进行ECC(Error Checking and Correcting,错误检查和纠正)校验,如果校验通过则将所读取的数据输出,如果校验失败,说明在原始数据区域中存储的数据有错误,此时,需要由备份数据区域读取数据。 [0032] When performing a normal read operation, the read control unit 130, only read data from the original data area, since SSD flash block read and write errors sometimes appear, so after reading data, but also the read data is ECC (error checking and correcting, error checking and correction) check, check if the read data output by the will, if the check fails, the data stored in the original data area has error, this time, it is necessary to read data from the backup data area.

[0033] 以图2所示的存储空间为例,假如在读取地址0040h时,出现数据读取错误,则需要到该地址所对应的备份数据区域中的地址(即1040h)读取数据,由于在这两个地址中所写入的数据是一致的,因此可以将1040h中所读取的数据作为正常输出。 [0033] In the storage space shown in FIG. 2 as an example, if when the read address 0040h, a data read error occurs, it is necessary to backup data area address corresponding to the address (i.e., 1040h) to read data, Since data is written in these two locations is the same, so the data can be read in 1040h as a normal output. 在这之后,读取控制单元可以继续在原始数据区域进行数据读取,如果出现读取错误,则再次到备份数据区域中读取相应的备份数据。 After that, the reading control unit may continue to read the data in the original data area, if the read error occurs, again read the backup data area corresponding to the backup data.

[0034] 为了保证原始数据区域数据的有效性,当原始数据区域出现数据读取错误时,需 [0034] In order to ensure the validity of the original data area data, data area when the original data read error occurs when, for an

要对错误数据进行恢复。 To recover the erroneous data. 参见图5所示,本发明实施例所提供的固定硬盘,还包括: Referring to FIG. 5, a fixed hard embodiments provided in the present embodiment of the invention, further comprising:

[0035] 数据恢复单元140,用于在所述读取控制单元出现读取错误时,对错误数据进行恢复。 [0035] The data recovery unit 140, configured to, when the reading unit reads the control error, data error recovery.

[0036] 参见图6所示,所述数据恢复单元140,可以包括: [0036] Referring to FIG. 6, the data recovery unit 140, may include:

[0037] 数据块检测子单元141,用于在出现读取错误时,检测出现读取错误的数据块是否损坏; [0037] The sub-block detecting unit 141, a read error occurs when detecting whether a read error occurred corruption of data blocks;

[0038] 对于固态硬盘来说,出现错误可能只是偶然情况,但是,如果错误是由数据块损坏所引起的,那么在该数据块中出现错误的概率就很高了。 [0038] For solid state hard drive, an error may occur only occasionally, but if errors are caused by damage caused by a data block, then the probability of occurrence of an error in the data block on the very high. 检测数据块是否损耗的方法,可以是通过多次对该数据块进行数据写入并读取,并统计出现读取错误的概率,如果该概率超过一定的阈值,则判定该数据块已经损坏。 The method of detecting whether a loss of data blocks may be written and read by a plurality of data blocks of the data, and the statistical probability of read errors occur, if the probability exceeds a certain threshold, it is determined that the data block has been corrupted.

[0039] 第一恢复子单元142,用于当所述数据块检测子单元的检测结果为否时,用于根据所述存储空间地址的对应关系,将备份数据区域中的数据,恢复至所述出现读取错误的数据块; [0039] The first sub-recovery unit 142, when the data block for detecting sub-unit detection result is No, for the storage space according to the correspondence address, the data in the backup data area, and returned to the said data block read error occurs;

[0040] 如果经过检测,判定出现读取错误的数据块没有损坏,说明读取错误的出现是偶然的,此时可以将备份数据区域中的数据重新写入原始数据区域。 [0040] If, after the detection, determining a read error data block is not corrupted, indicating a read error occurs by chance, this time may be the data in the backup data area to re-write the original data area. 以图2所示的存储空间为例,假如在读取地址0040h时出现读取错误,经检测判断该地址所在的数据块block2没有损坏,则将地址1040h中的数据恢复至0040h中。 In the storage space shown in FIG. 2 as an example, if the read error occurs when reading the address 0040h, is determined by detecting the address of the data block is located block2 not corrupted, then the data in the address 1040h to 0040h of recovery.

[0041] 在本发明实施例所提供的固态硬盘中,还可以包括若干保留数据块,这些保留数据块不属于存储单元110,也即不会用作正常的数据读写,仅当存储单元110当中的数据块损坏时,再使用保留数据块替换损坏的数据块,以保证硬盘数据的可靠性。 [0041] In the embodiment provided SSD embodiment of the present invention may further include a plurality of retention data blocks, these blocks do not belong to retain data storage unit 110, i.e., the normal will not be used to read and write data, the storage unit 110 only when when the data block which is damaged, then use the reserved block to replace the damaged data blocks, the data to ensure the reliability of the hard disk. 参见图6所示, 所述数据恢复单元140,还可以包括: Referring to FIG. 6, the data recovery unit 140, may further comprise:

[0042] 第二恢复子单元143,当所述数据块检测子单元的检测结果为是时,用于使用固态硬盘的保留数据块对损坏的数据块进行替换;根据所述存储空间地址的对应关系,将备份数据区域中的数据,恢复至所述替换后的数据块。 [0042] The second sub-recovery unit 143, when the detection result of the detection block is a sub-unit is reserved for data blocks of SSDs damaged data block is to be replaced; address corresponding to the storage space according to relationship, the data in the backup data area, to recover the replacement data block.

[0043] 如果经过检测,判定出现读取错误的数据块损坏,则该数据块已经无法进行数据读写,为了保证硬盘继续正常使用,可以用保留数据块替换该损坏的数据块。 [0043] If, after the detection, determination data block read error corrupted, then the data block has been unable to read and write data, in order to ensure continued normal use of the hard disk, can replace the defective data block with the retained data block. 仍以图2所示的存储空间为例,假如block2损坏,使用保留区块block A替换block2,为了保证原始数据区与备份数据区存储空间的对应关系,还需要将原先block2与block3的对应关系,修改为block A与block3的对应关系;或者,也可以将原block2的地址映射到blockA的地址,这样,在替换之后,所有针对于block2的操作,实际上都会被转移到block A。 Still storage space shown in FIG. 2 as an example, if block2 damaged, using reserved blocks of block A block2 Alternatively, in order to ensure a correspondence relationship of the original data area and the backup data area of ​​the storage space, also requires a corresponding relationship between the original block2 and block3 , modify the correspondence relationship between block a and block3; alternatively, the original address can be mapped to the address blockA block2, so that, after the replacement, for operation in all block2 actually will be transferred to the block A. [0044] 替换完毕后,还要将block3中的数据,恢复至blockA中,以确保原始数据区域中数据的有效性。 After the [0044] replacement is completed, but also in the data block3, returned to blockA in order to ensure the validity of the data in the original data area.

[0045] 需要说明的是,上述实施例中,存储空间的分配方法以及存储地址的设定仅用作示意性说明,并不构成对本发明技术方案的限定。 [0045] Incidentally, the above-described embodiment, the method for allocating storage space, and storing the set address is used only as a schematic illustration, not to limit the technical solution of the present invention.

[0046] 在上述实施例所提供的固态硬盘中,采用的是一个原始数据区域对应一个备份数据区域的方案,本领域技术人员易于想到的是,也可以采用一个原始数据区域对应多个备份数据区域的方案,从而进一步提高硬盘整体的数据可靠性,这些改进也都应该包括在本发明的保护范围内。 [0046] In the above embodiments SSD provided, the raw data is used in a region corresponding to a program area of ​​the backup data, it will readily occur to those skilled in the art, may be employed a plurality of original data corresponding to the backup data area program area, thereby further improving the overall reliability of the hard disk data, these improvements are also to be included within the scope of the present invention.

[0047] 以上技术方案,应用固态硬盘闪存芯片的特性,同时对一块硬盘的两个或两个以 [0047] The above technical solution, the application properties SSD flash memory chips, while the hard disk in two or

上存储区域进行相同的写入操作,当数据读取错误时,则自动从备份存储区域中读取数据, The same storage area of ​​the write operation, when a data read error, the data is automatically read from the backup storage area,

在不影响硬盘性能的情况下,提高了数据的可靠性。 In the case does not affect hard disk performance and improve data reliability. 此外,还可以进一步判断数据读取错误 In addition, the data may further read error Analyzing

是否由闪存块损坏所引起,如果是,则只需从固态硬盘的保留区块中选取新的闪存块来替 Damage caused by the flash block, if so, only select a new flash block from the reserved block SSD to back

换损坏的闪存块,即可自动恢复硬盘的正常使用,无需对硬件进行更换。 In other damage flash block to automatically resume normal use of the hard disk, without the need for hardware replacement.

[0048] 相应于上面的方法实施例,本发明实施例还提供了固态硬盘的数据读写方法。 [0048] Example corresponding to the above methods, embodiments of the present invention further provides a method of reading and writing data in the SSD.

[0049] 本发明实施例所提供的固态硬盘的数据写入方法,包括: [0049] The data writing method of embodiment provided SSD embodiment of the present invention, comprising:

[0050] 当接收到数据写入指令时,将数据同时写入固态硬盘的原始数据区域和备份数据区域; [0050] Upon receiving the data write instruction, the data is written to the original data area and the backup data area of ​​the SSD;

[0051] 其中,原始数据区域和备份数据区域具有相同的存储空间结构,并且原始数据区域的存储空间地址,与所述备份数据区域的存储空间地址一一对应。 [0051] wherein, the original data area and the backup data storage region having the same structure, and the address of the original data storage area, and the address of the backup data storage region correspond.

[0052] 当固态硬盘的写入控制单元接收到数据写入操作指令后,会将数据写入原始数据区域和备份数据区域,由于固态硬盘闪存芯片具有two plane block的特性,因此可以将数据同时写入两部分区域,并且,相对于只写入一部分区域的写操作来说,写入速度也不会变慢。 [0052] After the SSD write control unit receives the instruction data write operation, writes the data to the original data area and the backup data area, since the solid state disk flash memory chips having characteristics of two plane block, data can be simultaneously writing two partial regions, and, with respect to the operation of writing only a portion of the write area, the writing speed is not slow.

[0053] 本发明实施例所提供的固态硬盘的数据读取方法流程图可以参见图7所示,包括以下步骤: [0053] The data read method embodiment provided by the SSD embodiment of the present invention may refer to a flowchart shown in FIG. 7, comprising the steps of:

[0054] S701,根据数据读取指令,由固态硬盘的原始数据区域读取数据。 [0054] S701, the data read instruction, reads data from the original data area of ​​the solid-state disk.

[0055] S702,对所读取的数据进行校验,如果校验正确,则执行S703,否则执行S704。 [0055] S702, the read data is performed to check if the check is successful, S703 is performed, otherwise, execute S704. [0056] S703,输出所读取的数据。 [0056] S703, the read data output.

[0057] S704,根据原始数据区域与备份数据存储空间地址的对应关系,由备份数据区域读取数据并输出; [0057] S704, according to the correspondence data area and the backup data of the original memory space address, the backup data area by the read data and outputs;

[0058] 进一步的,为了保证原始数据区域数据的有效性,当原始数据区域出现数据读取错误时,需要对错误数据进行恢复。 [0058] Further, in order to ensure the validity of the original data area data, when the original data area when data read errors, the need for data recovery error occurs. 参见图8所示,对错误进行恢复的步骤,包括: [0059] S705,检测出现读取错误的数据块是否损坏;如果否,则执行S706,如果是,则执行S707。 Referring to FIG. 8, the step of error recovery, comprising: [0059] S705, the read error detected data block is damaged; if not, S706 is executed, if yes, performing S707.

[0060] S706,根据所述存储空间地址的对应关系,将备份数据区域中的数据,恢复至所述读取错误的数据块。 [0060] S706, the storage space according to the correspondence address, the data in the backup data area, to recover the read error data block.

[0061] S707,使用固态硬盘的保留数据块对损坏的数据块进行替换;根据所述存储空间 [0061] S707, SSDs reserved data block replacing corrupted data block; the storage space according to

地址的对应关系,将备份数据区域中的数据,恢复至所述替换后的数据块。 Address correspondence relationship, the data in the backup data area, to recover the replacement data block.

[0062] 以上所提供的固态硬盘数据读写方法,应用固态硬盘闪存芯片的特性,同时对一 [0062] The method of solid state drive to read and write data provided above, the application properties of SSD flash memory chips, while a

块硬盘的两个或两个以上存储区域进行相同的写入操作,当数据读取错误时,则自动从备 Two or more hard disks of the same storage area of ​​the write operation, when the data read error is automatically prepared from

份存储区域中读取数据,在不影响硬盘性能的情况下,提高了数据的可靠性。 Parts of the read data storage area, without affecting the performance of the hard disk, to improve the reliability of data. 此外,还可以 You can also

进一步判断数据读取错误是否由闪存块损坏所引起,如果是,则只需从固态硬盘的保留区 Is further determined whether the data read error is caused by damage to the flash block, if so, only a reserved area of ​​the SSD

块中选取新的闪存块来替换损坏的闪存块,即可自动恢复硬盘的正常使用,无需对硬件进 Select a new flash block to replace the damaged block in a flash memory block to automatically resume normal use of the hard disk, without hardware into

行更换。 Line replacement.

[0063] 对于上述方法实施例而言,由于其基本相应于装置实施例,所以描述得比较简单, 相关之处参见装置实施例的部分说明即可。 [0063] For the above-described method embodiments, the apparatus because it substantially corresponds to the embodiments, the description is relatively simple, the relevant portion of the description to refer to the embodiment of the apparatus. 本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM(Read-Only Memory,只读存储记忆体)、RAM (Random Access Memory,随机存储记忆体)、磁碟或者光盘等各种可以存储程序代码的介质。 Those of ordinary skill in the art will be understood: the hardware implementing the above method to complete all or part of the steps associated with embodiments may be implemented by program instructions, the program may be stored in a computer readable storage medium, the program, when executed, performs comprising the steps of the method embodiments described above; and the storage medium includes: various ROM (Read-Only memory, read-only memory), RAM (random Access memory, random access memory), a magnetic disk or an optical storage medium program codes.

[0064] 以上所述仅是本发明的具体实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。 [0064] The above are only specific embodiments of the present invention, it should be noted that those of ordinary skill in the art, in the present invention without departing from the principles of the premise, can make various improvements and modifications, such modifications and modifications should also be regarded as the protection scope of the present invention.

Claims (9)

  1. 一种固态硬盘,其特征在于,包括:存储单元,包括具有相同存储空间结构的原始数据区域和备份数据区域,所述原始数据区域的存储空间地址,与所述备份数据区域的存储空间地址一一对应;写入控制单元,用于根据数据写入指令,将数据同时写入所述存储单元的原始数据区域和备份数据区域;读取控制单元,用于根据数据读取指令,由所述存储单元的原始数据区域读取数据,如果出现读取错误,则根据所述存储空间地址的对应关系,由所述存储单元的备份数据区域读取数据。 A solid state hard drive, characterized by comprising: a storage unit, including the original data area and the backup data storage region having the same configuration, the address of the original data storage area, the storage space with the address of a backup data area a correspondence; write control unit, for the original data area and a backup data area according to the data write instruction, the data is written to the memory cell; reading control means for reading data according to an instruction from the the raw data area of ​​the memory cell read data, if the read error occurs, the storage space according to the correspondence address, the backup data is read from the data area of ​​the memory cell.
  2. 2. 根据权利要求1所述的固态硬盘,其特征在于,所述原始数据区域的存储空间地址与备份数据区域的存储空间地址一一对应,具体为:原始数据区域的物理地址和备份数据区域的物理地址,与相同的逻辑地址具有映射关系;则所述写入控制单元,用于根据数据写入指令,将数据同时写入相同的逻辑地址所对应的原始数据区域的物理地址和备份数据区域的物理地址;所述读取控制单元,用于根据数据读取指令,由所述存储单元的原始数据区域读取数据,如果出现读取错误,则根据所述映射关系,读取与出现错误的物理地>址所对应的备份数据区域物理地址上的数据。 2. The SSD according to claim 1, characterized in that the storage space of the memory address space of the original data area and the backup data area of ​​the address correspond, in particular: the physical address of the original data area and the backup data area physical address, with the same logical address mapping relation; then the write control unit, a physical address of the original data area and the backup data according to the data write command, the data is written while the same logical address corresponding physical address area; said reading control means for reading data according to instructions from the original data area of ​​the memory cell data is read, if the read error occurs, according to the mapping relationship, reads occur data error physically> address corresponding to the backup data area of ​​the physical address.
  3. 3. 根据权利要求1所述的固态硬盘,其特征在于,该固态硬盘还包括: 数据恢复单元,用于在所述读取控制单元出现读取错误时,对错误数据进行恢复。 SSD according to claim 1, wherein the SSD further comprises: a data restoration unit configured to control when the reading unit reads an error, data error recovery.
  4. 4. 根据权利要求3所述的固态硬盘,其特征在于,所述数据恢复单元,包括: 数据块检测子单元,用于在出现读取错误时,检测出现读取错误的数据块是否损坏; 第一恢复子单元,当所述数据块检测子单元的检测结果为否时,用于根据所述存储空间地址的对应关系,将备份数据区域中的数据,恢复至所述出现读取错误的数据块。 4. The SSD of claim 3, wherein said data recovery unit, comprising: a data block detection sub-unit, configured to, when a read error occurs, detects whether the read error occurred corrupted data block; the first sub-unit recovery, when a detection result of said detection sub-unit block is NO, for the storage space according to the correspondence address, the data in the backup data area, to recover the read error occurred data block.
  5. 5. 根据权利要求4所述的固态硬盘,其特征在于,所述数据恢复单元,还包括: 第二恢复子单元,当所述数据块检测子单元的检测结果为是时,用于使用固态硬盘的保留数据块对损坏的数据块进行替换;根据所述存储空间地址的对应关系,将备份数据区域中的数据,恢复至所述替换后的数据块。 SSD according to claim 4, wherein said data recovery unit further comprises: a second sub-unit recovery, when a detection result of said detecting block is a sub-unit is configured to use solid hard disk data blocks reserved for the damaged data block replacement; the storage space according to the correspondence address, the data in the backup data area, the recovery data block to the replacement.
  6. 6. —种固态硬盘的数据读写方法,其特征在于,包括:当接收到数据写入指令时,将数据同时写入固态硬盘的原始数据区域和备份数据区域;当接收到数据读取指令时,由固态硬盘的原始数据区域读取数据,如果出现读取错误, 则根据原始数据区域与备份数据存储空间地址的对应关系,由备份数据区域读取数据;其中,所述原始数据区域和所述备份数据区域具有相同的存储空间结构,所述原始数据区域的存储空间地址,与所述备份数据区域的存储空间地址一一对应。 6. - The method of solid-state hard drive read and write data, characterized by comprising: when receiving a data write command, the data is written to the original data area and the backup data area of ​​the SSD; when receiving a data read command when, by the SSD data read original data area, if the read error occurs, according to the correspondence of the original data area and the backup data storage address, data is read from the backup data area; wherein the original data area, and the backup data storage region having the same structure, the storage address of the original data area, and the address of the backup data storage region correspond.
  7. 7. 根据权利要求6所述的方法,其特征在于,还包括:当出现读取错误时,对错误数据进行恢复。 7. The method according to claim 6, characterized in that, further comprising: when a read error occurs, the data error recovery.
  8. 8. 根据权利要求7所述的方法,其特征在于,所述对错误数据进行恢复,包括: 检测出现读取错误的数据块是否损坏;如果否,则根据所述存储空间地址的对应关系,将备份数据区域中的数据,恢复至所述出现读取错误的数据块。 8. The method according to claim 7, wherein said data error recovery, comprising: detecting a read error data block is damaged; if not, the corresponding relationship between the memory space according to the address, the data in the backup data area, to recover the data block read error occurs.
  9. 9.根据权利要求8所述的方法,其特征在于,还包括:如果检测到出现读取错误的数据块损坏,则使用固态硬盘的保留数据块对损坏的数据块进行替换;根据所述存储空间地址的对应关系,将备份数据区域中的数据,恢复至所述替换后的数据块。 9. The method according to claim 8, characterized in that, further comprising: if a read error data block detected damaged, using reserved SSD data blocks to replace bad blocks; according to the storage corresponding relationship between the address space, the data in the backup data area, to recover the replacement data block.
CN 200910000221 2009-01-12 2009-01-12 Solid state disk and data read-write method CN101777013A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910000221 CN101777013A (en) 2009-01-12 2009-01-12 Solid state disk and data read-write method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910000221 CN101777013A (en) 2009-01-12 2009-01-12 Solid state disk and data read-write method

Publications (1)

Publication Number Publication Date
CN101777013A true true CN101777013A (en) 2010-07-14

Family

ID=42513482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910000221 CN101777013A (en) 2009-01-12 2009-01-12 Solid state disk and data read-write method

Country Status (1)

Country Link
CN (1) CN101777013A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901264A (en) * 2010-07-27 2010-12-01 浙江大学 Scheduling method for parallelly scanning mass data on solid state disk
CN102033794A (en) * 2011-01-10 2011-04-27 中国电子科技集团公司第五十二研究所 FLASH solid state disc data redundancy protection method
CN102073561A (en) * 2011-01-26 2011-05-25 浪潮电子信息产业股份有限公司 Method for correcting error of write operation of solid state hard disk
CN102200937A (en) * 2011-05-31 2011-09-28 深圳创维-Rgb电子有限公司 Method, device and television system for reading data in not-and (NAND) flash memory
CN102467422A (en) * 2010-11-12 2012-05-23 英业达股份有限公司 Data protecting method of damaged memory cell
WO2012106874A1 (en) * 2011-07-07 2012-08-16 华为技术有限公司 Method and device for processing system command during memory backup process
CN103176858A (en) * 2013-03-11 2013-06-26 北京忆恒创源科技有限公司 Storage device with multiple solid-state discs
CN103678086A (en) * 2013-12-24 2014-03-26 中经云数据存储科技(北京)有限公司 Data monitoring method and system based on optical storage array
CN104468641A (en) * 2013-09-12 2015-03-25 腾讯科技(深圳)有限公司 Service data migration method and device and cloud storage system
CN105808387A (en) * 2016-03-30 2016-07-27 苏州美天网络科技有限公司 Method for preventing hard disk data loss
CN105808385A (en) * 2016-03-30 2016-07-27 苏州美天网络科技有限公司 Anti-loss method of hard disk data
CN105808388A (en) * 2016-03-30 2016-07-27 苏州美天网络科技有限公司 Hard disk data backup method
CN105893179A (en) * 2016-03-30 2016-08-24 苏州美天网络科技有限公司 Backup method for data of mobile hard disk drive
CN105893178A (en) * 2016-03-30 2016-08-24 苏州美天网络科技有限公司 Data backup method for mobile hard disk
CN106844109A (en) * 2017-01-23 2017-06-13 北京腾凌科技有限公司 Replacing method and device of solid-state disk

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901264A (en) * 2010-07-27 2010-12-01 浙江大学 Scheduling method for parallelly scanning mass data on solid state disk
CN102467422A (en) * 2010-11-12 2012-05-23 英业达股份有限公司 Data protecting method of damaged memory cell
CN102033794A (en) * 2011-01-10 2011-04-27 中国电子科技集团公司第五十二研究所 FLASH solid state disc data redundancy protection method
CN102073561A (en) * 2011-01-26 2011-05-25 浪潮电子信息产业股份有限公司 Method for correcting error of write operation of solid state hard disk
CN102200937A (en) * 2011-05-31 2011-09-28 深圳创维-Rgb电子有限公司 Method, device and television system for reading data in not-and (NAND) flash memory
US9513838B2 (en) 2011-07-07 2016-12-06 Huawei Technologies Co., Ltd. Method and apparatus for processing system command during memory backup
WO2012106874A1 (en) * 2011-07-07 2012-08-16 华为技术有限公司 Method and device for processing system command during memory backup process
CN103176858A (en) * 2013-03-11 2013-06-26 北京忆恒创源科技有限公司 Storage device with multiple solid-state discs
CN103176858B (en) * 2013-03-11 2017-05-03 北京忆恒创源科技有限公司 A storage device having a plurality of solid state disks
CN104468641A (en) * 2013-09-12 2015-03-25 腾讯科技(深圳)有限公司 Service data migration method and device and cloud storage system
CN103678086A (en) * 2013-12-24 2014-03-26 中经云数据存储科技(北京)有限公司 Data monitoring method and system based on optical storage array
CN105808385A (en) * 2016-03-30 2016-07-27 苏州美天网络科技有限公司 Anti-loss method of hard disk data
CN105808388A (en) * 2016-03-30 2016-07-27 苏州美天网络科技有限公司 Hard disk data backup method
CN105893179A (en) * 2016-03-30 2016-08-24 苏州美天网络科技有限公司 Backup method for data of mobile hard disk drive
CN105893178A (en) * 2016-03-30 2016-08-24 苏州美天网络科技有限公司 Data backup method for mobile hard disk
CN105808387A (en) * 2016-03-30 2016-07-27 苏州美天网络科技有限公司 Method for preventing hard disk data loss
CN106844109A (en) * 2017-01-23 2017-06-13 北京腾凌科技有限公司 Replacing method and device of solid-state disk

Similar Documents

Publication Publication Date Title
Birrell et al. A design for high-performance flash disks
US7409623B2 (en) System and method of reading non-volatile computer memory
US8176360B2 (en) Method and apparatus for addressing actual or predicted failures in a FLASH-based storage system
US20130024735A1 (en) Solid-state memory-based storage method and device with low error rate
US20100235715A1 (en) Apparatus, system, and method for using multi-level cell solid-state storage as single-level cell solid-state storage
US8312349B2 (en) Error detection/correction based memory management
US20100042773A1 (en) Flash memory storage system and data writing method thereof
US20120059978A1 (en) Storage array controller for flash-based storage devices
US8046645B2 (en) Bad block identifying method for flash memory, storage system, and controller thereof
US7941696B2 (en) Flash-based memory system with static or variable length page stripes including data protection information and auxiliary protection stripes
US20090172254A1 (en) Method for preventing read-disturb happened in non-volatile memory and controller thereof
US20080201392A1 (en) Storage system having plural flash memory drives and method for controlling data storage
US20140082261A1 (en) Self-journaling and hierarchical consistency for non-volatile storage
US20090282301A1 (en) Apparatus, system, and method for bad block remapping
US20090327802A1 (en) Storage control device, data recovery device, and storage system
US20120272123A1 (en) Data writing method, memory controller and memory storage apparatus
US20110191649A1 (en) Solid state drive and method of controlling an error thereof
US20100185830A1 (en) Logical address offset
US20090172256A1 (en) Data writing method for flash memory, and flash memory controller and storage device thereof
US20090307413A1 (en) Data writing method for flash memory and storage system and controller using the same
US20110082963A1 (en) Power interrupt management
US20110078496A1 (en) Stripe based memory operation
WO2012075200A2 (en) Dynamic higher-level redundancy mode management with independent silicon elements
CN102081577A (en) Data storage structure of Flash memory and data manipulation mode thereof
US20140164881A1 (en) Policy for read operations addressing on-the-fly decoding failure in non-volatile memory

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C12 Rejection of an application for a patent