WO2016082559A1 - Data writing method and storage device - Google Patents

Data writing method and storage device Download PDF

Info

Publication number
WO2016082559A1
WO2016082559A1 PCT/CN2015/083885 CN2015083885W WO2016082559A1 WO 2016082559 A1 WO2016082559 A1 WO 2016082559A1 CN 2015083885 W CN2015083885 W CN 2015083885W WO 2016082559 A1 WO2016082559 A1 WO 2016082559A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
data blocks
index
memory
block
Prior art date
Application number
PCT/CN2015/083885
Other languages
French (fr)
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
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2016082559A1 publication Critical patent/WO2016082559A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation

Definitions

  • the present invention relates to the field of electronic technologies, and in particular, to a data writing method and a storage device.
  • SSD Solid State Drive
  • Chinese Solid State Drive
  • shockproof small size, zero noise, etc.
  • the number of writes to a typical SSD is limited.
  • the data block on the SSD is modified by using ROW (English: Redirection On Write; Chinese: write-time redirection) technology.
  • ROW Redirection On Write
  • Existing file system based on ROW technology on SSD generally organizes the entire file system into a tree structure. The leaf nodes in the tree structure are used to store data blocks, the parent nodes and roots are index data, and the index data is used to index data blocks.
  • the embodiment of the present invention provides a data writing method and a storage device, which are used to solve the problem that each modified data block existing in the prior art will modify its index data correspondingly, causing a large write overhead on the SSD, resulting in SSD performance. And the technical problem of declining lifespan achieves the technical effect of reducing the write overhead caused by modifying the data block to the SSD, improving the performance of the SSD, and prolonging the life of the SSD.
  • a first aspect of the embodiments of the present invention provides a data writing method, where the method is applied to a storage device, where the storage device includes a processor, a memory, and a storage medium, and the data blocks in the storage medium are organized in a tree structure.
  • a leaf node of the tree is used to save a data block
  • a parent node and a root node of the tree are used to store index data
  • the index data is used to index the data block
  • the method is performed by the processor.
  • the method before the modifying is directed to the index data of the at least two data blocks, the method further includes:
  • the at least two data blocks are deleted from the memory.
  • the modifying is directed to the index data of the at least two data blocks, and specifically includes:
  • the modified index data of the at least two data blocks points to a storage address of the at least two data blocks
  • a second aspect of the embodiments of the present invention provides a storage device, where the storage device includes a processor, a memory, and a storage medium, where data blocks in the storage medium are organized in a tree structure, and leaf nodes of the tree are used to save data.
  • a block, a parent node and a root node of the tree are used to store index data, the index data is used to index the data block, and the processor is configured to:
  • the processor is further configured to:
  • the at least two data blocks are deleted from the memory before the modification points to the index data of the at least two data blocks.
  • the processor is specifically configured to:
  • the present invention first, modifying a plurality of data blocks in the memory, and then modifying the plurality of data blocks At least two data blocks having the same index data are determined in the block, then at least two data blocks are written to the storage medium, and finally the index data directed to the at least two data blocks is modified.
  • the index data of the modified data block is updated, and the modified data block is used in the embodiment of the present invention. Determining at least two data blocks having the same index data, and writing at least two data blocks having the same index data from the memory to the storage medium, and batch updating the index data common to the at least two data blocks, thereby reducing the index
  • the number of times the data is updated is implemented to reduce the write overhead caused by modifying the data block to the storage device.
  • FIG. 1 is a schematic diagram of a file system to which an information processing method according to an embodiment of the present invention is applied;
  • FIG. 2 is a flowchart of an information processing method according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of updating index data in an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of hardware of a storage device according to an embodiment of the present invention.
  • the embodiment of the present invention provides a data writing method and a storage device, which are used to solve the problem that each modified data block existing in the prior art will modify its index data correspondingly, causing a large write overhead on the SSD, resulting in SSD performance. And the technical problem of declining lifespan achieves the technical effect of reducing the write overhead caused by modifying the data block to the SSD, improving the performance of the SSD, and prolonging the life of the SSD.
  • a plurality of data blocks are modified in a memory, and then at least two data blocks having the same index data are determined from the modified plurality of data blocks, and then at least two data blocks are written to the memory.
  • the storage medium is finally modified to index data pointing to at least two data blocks.
  • the index data of the modified data block is updated, and the modified data block is used in the embodiment of the present invention. Determining at least two data blocks having the same index data, and writing at least two data blocks having the same index data from the memory to the storage medium, and batch updating the index data common to the at least two data blocks, thereby reducing the index
  • the number of times the data is updated is implemented to reduce the write overhead caused by modifying the data block to the storage device.
  • Embodiments of the present invention provide a data writing method, which is applied to a storage device.
  • FIG. 4 is a schematic diagram showing the hardware structure of the storage device 40.
  • the storage device 40 may be an SSD (English: Solid State Drive; Chinese: SSD) including a processor 41, a memory 42 and a storage medium 43, and the storage medium 43 may be a Flash granule or other type of hard disk.
  • Data can be stored in the storage medium 43. Specifically, the data blocks in the storage medium 43 are organized in a tree structure.
  • FIG. 1 is a schematic diagram of a tree structure in a storage medium 43.
  • the leaf node of the tree is used to save the data block
  • the parent node and the root node of the tree are used to store the index data
  • the index data is used to index the data block.
  • the root of the tree is used to store the index data A
  • the parent node is used to store the index data B and the index data C
  • the leaf node is used to store the data block D, the data block E, the data block F, and the data block H.
  • the storage device 40 can be connected to the server 400 as a separate electronic device.
  • the storage device 40 can also serve as an element of the server 400.
  • the server 400 sends the write data to the storage device 40.
  • the processor 41 of the storage device 40 executes the writing method provided by the embodiment of the present invention in response to the request for writing the data.
  • FIG. 2 is a flowchart of a data writing method according to an embodiment of the present invention.
  • the data writing method provided by the embodiment of the present invention which may be applied to the storage device 40 described in FIG. 4, is executed by the processor 41, and includes the following steps:
  • Step 21 Receive a plurality of data blocks and write the memory
  • Step 22 Modify the plurality of data blocks in the memory
  • Step 23 Determine at least two data blocks from the modified plurality of data blocks, where index data of the at least two data blocks are the same;
  • Step 24 Allocating a storage address in the storage medium for the at least two data blocks, and writing the at least two data blocks to the storage medium according to the allocated storage address;
  • Step 25 Modify index data pointing to the at least two data blocks.
  • a request to write data is sent to the storage device 40, and after the storage device 40 receives the request to write the data, the processor 41 of the storage device responds to the written data.
  • Request receive multiple data blocks sent by the server, and then write to memory.
  • the processor 41 receives the data block D, the data block E, the data block F, and the data block H, and writes them into the memory 42, and stores them in the leaf nodes of the tree.
  • the request for modifying the data is sent to the storage device 40.
  • the processor 41 of the storage device responds to the request to modify the data, first.
  • the data block is modified in the memory to generate a dirty data block, wherein the dirty data block is a data block that is modified in the memory and is not written into the storage medium.
  • the modification of the data block D in FIG. 1 is taken as an example.
  • the index data A held by the root of the tree in the memory is indexed to the data block D by the index data B held by the parent node, and then the data block D is modified into the data block S,
  • the data block S is stored in the memory. Since the data block S is only modified in the memory, the data block S has not been written into the storage medium, so the data block S is a dirty data block, and the index data of the dirty data block S is: an index Data B.
  • the data block E can be modified to generate a dirty data block H, and the index data of the dirty data block H is: index data B.
  • step 23 may be performed to determine at least two data blocks from the modified plurality of data blocks, and the index data of the at least two data blocks is the same.
  • the index data of the dirty data block S is: index data B
  • the index data of the dirty data block H is: index data B
  • step 24 can be performed to write at least two dirty data blocks with the same index data from the memory into the storage medium.
  • the dirty data block is first allocated a storage address in the storage medium.
  • the storage address in the storage medium corresponds to the physical block number, and the physical block number is usually used to represent the storage address. As long as a dirty data block is generated, the physical block number can be assigned to the generated dirty data block.
  • the physical block number assigned to the dirty data block S is 01
  • the physical block number assigned to the dirty data block H is 02
  • the physical block number 01 and Physical block number 02 characterizes the storage addresses of the storage medium as a and b, respectively.
  • the dirty data block S is written from the memory to the memory address a characterized by the physical block number 01
  • the dirty data block H is written from the memory to the memory address b represented by the physical block number 02.
  • step 25 can be performed: modifying the index data of the at least two dirty data blocks that are the same as the index data.
  • FIG. 3 is a flowchart of updating index data in an embodiment of the present invention. Updating the index data specifically includes the following steps:
  • Step 31 Create a record table for the at least two data blocks, and record the at least two data blocks at a storage address in the storage medium;
  • Step 32 Modify, according to the record table, index data that points to the at least two data blocks in the memory, and the modified index data points to a storage address of the at least two data blocks;
  • Step 33 Write the modified index data of the at least two data blocks to the storage medium.
  • Step 31 is explained first.
  • the dirty data block in the embodiment of the present invention, in order to directly write the dirty data block from the memory into the storage medium, the dirty data block can be indexed and needs to be in the memory.
  • the correspondence between the index data of the dirty data block and the physical block number is stored. That is, dirty data block records are created for dirty data blocks.
  • dirty data block records can be created for dirty data blocks in non-volatile memory.
  • the dirty data block record Since the function of the dirty data block record is to index the dirty data block, in order to avoid the loss of the dirty data block record after the power failure, the dirty data block cannot be indexed, and the dirty data block record can be stored in the non-volatile memory to ensure the dirty data. Storage security for block records.
  • a dirty data block record is created for the dirty data block S, and the index data of the dirty data block S is recorded as: index data B, and the corresponding physical block number is 01. .
  • a dirty data block record is created for the dirty data block H, and the index data of the dirty data block H is recorded as: index data B, and the corresponding physical block number is 02.
  • a mapping table may be established in the memory, and the mapping table is used to record the logical block number and the physical block number of the dirty data block.
  • the mapping relationship, the logical block number can be obtained from the index data.
  • dirty block records are stored sequentially in non-volatile memory
  • you want to index to a dirty block you must search sequentially in the record table formed by the dirty block record to find the time.
  • the logical block number of the dirty data block can be obtained according to the index data of the dirty data block, and then the mapping of the logical block number to the physical block number is established.
  • indexing a dirty data block it is convenient and quick to quickly determine the physical block number of the dirty data block according to the mapping relationship.
  • the index data of the dirty data block S is: index data B
  • the index data of the dirty data block H is: index data B
  • the original index data B can be indexed to the data block D and the data block E
  • the data block D The logical block number is 111
  • the logical block number of the data block E is 222, so it can be determined that the logical block number of the dirty data block S is 111
  • the logical block number of the dirty data block H is 222, that is, the original data block and the modified data block are obtained.
  • the logical block number of the dirty data block is the same.
  • a mapping table is then created in which the logical block number 111 is mapped to physical block number 01 and the logical block number 222 is mapped to physical block number 02.
  • the corresponding physical block number can be quickly determined to be 01 according to the mapping table. If a record table formed based on a plurality of dirty data blocks is recorded, it is necessary to search sequentially in the record table. If the record of the dirty block with the logical block number 111 is at the end of the record table, it takes a long time to index. A dirty block with a logical block number of 111.
  • mapping table Although it is convenient and efficient to use a mapping table to index dirty data blocks, because the mapping table is only stored in memory, once the power is turned off, the mapping table disappears. Therefore, after the power is turned off, the formed record table is recorded according to the plurality of dirty data blocks, and the mapping table is generated. Mapping tables are often used to index dirty data blocks.
  • step 32 and step 33 are performed.
  • the index data B originally records the physical block number 03 of the data block D and the physical block number 04 of the data block E. Since the data block D and the data block E are respectively modified, the dirty data block S and the dirty data are generated. Block H, therefore, the index data B should be correspondingly changed to record the physical block number 01 of the dirty data block S and the physical block number 02 of the dirty data block H. Therefore, the index data B is modified in the memory, and the dirty data block M is generated.
  • the dirty data block M records the physical block number 01 of the dirty data block S and the physical block number 02 of the dirty data block H.
  • the index data C originally records the physical block number 05 of the data block F and the physical block number 06 of the data block K, assuming that after modifying the data block D and the data block E, the data block F and the data block K are also modified to generate
  • the index data common to both is index data C. Therefore, the index data C is correspondingly changed to record the physical block numbers 07 and 08 of the dirty data block W and the dirty data block R. Therefore, the index data C is modified in the memory, and the dirty data block N is generated.
  • the dirty data block N records the physical block number 07 of the dirty data block W and the dirty data block R. Physical block number 08.
  • the process of specifically updating the index data B and the index data C is: modifying the index data B and the index data C in the memory respectively, and generating the dirty data block M and the dirty data block W. Then, the physical block numbers assigned to the dirty data block M and the dirty data block W in the storage medium are 09 and 10, respectively, and the dirty data block M and the dirty data block W are written from the memory to the physical block numbers 09 and 10, respectively.
  • index data A Since the index data of the dirty data block M is: index data A, the index data of the dirty data block W is: index data A. Therefore, the index data corresponding to the two is index data A.
  • the index data A originally records the physical block number 11 of the index data B and the physical block number 12 of the index data C. Since the index data B and the index data C are respectively modified in the memory, the dirty data block M and the dirty data block W are generated. . Therefore, the index data A should be changed correspondingly to the physical block number 09 of the dirty data block M and the physical block number 10 of the dirty data block W.
  • the index data A is modified in the memory to generate a dirty data block T. Then, the physical block number assigned to the dirty data block T in the storage medium is 13, and the dirty data block T is written from the memory into the storage address represented by the physical block number 13.
  • the method further includes:
  • the modified index data is deleted from the memory.
  • the modified index data can be indexed in the storage medium, and the modified data in the memory is not necessary to be stored, so In order to improve the memory utilization, the modified index data may be deleted from the memory after the modified index data is written from the memory to the storage medium.
  • the dirty data block and the modified index data can be directly indexed from the storage medium, and the dirty data in the non-volatile memory.
  • the data block record table and the mapping table in the memory are also unnecessary to be stored, so in order to improve the memory utilization, the modified index data can be read from the memory into the storage medium, and the modified index data is Deleted in memory.
  • the method when the specified dirty data block needs to be read, the method further includes:
  • the specified physical block number corresponding to the specified logical block number is searched from the mapping table according to the specified logical block number of the specified dirty data block;
  • the designated dirty data block is read from the storage medium according to the specified physical block number.
  • the mapping table can be used to find the logical block number of the specified dirty data block from the mapping table, thereby finding the corresponding The physical block number, the specified dirty data block is read from the storage address represented by the physical block number.
  • FIG. 4 is a schematic diagram showing the hardware structure of the storage device 40.
  • the storage device 40 may be an SSD (English: Solid State Drive; Chinese: SSD) including a processor 41, a memory 42 and a storage medium 43, and the storage medium 43 may be a Flash granule or other type of hard disk.
  • the data blocks in the storage medium 43 are organized in a tree structure, the leaf nodes of the tree are used to store data blocks, the parent nodes and root nodes of the tree are used to store index data, and the index data is used to index data blocks.
  • the storage device 40 can be connected to the server 400 as a separate electronic device.
  • the storage device 40 can also serve as an element of the server 400.
  • the server 400 sends the write data to the storage device 40.
  • the processor 41 of the storage device 40 executes the writing method provided by the embodiment of the present invention in response to the request for writing the data.
  • the processor 41 is configured to:
  • the processor 41 is further configured to:
  • the at least two data blocks are deleted from the memory before the modification points to the index data of the at least two data blocks.
  • the processor 41 is specifically configured to:
  • a plurality of data blocks are first modified in a memory, and then at least two data blocks having the same index data are determined from the modified plurality of data blocks, and then at least two data blocks are written to the storage medium. Finally, the index data pointing to at least two data blocks is modified.
  • each time the modified data block is written from the memory to the storage medium it must be repaired.
  • at least two data blocks with the same index data are determined from the modified data block, and at least two data blocks with the same index data are written from the memory.
  • the index data common to the at least two data blocks is batch-updated, so that the number of times the index data is updated is reduced, and the write overhead caused by the modified data block to the storage device is reduced.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Abstract

A data writing method and a storage device. The method is applied to a storage device (40), and the storage device (40) comprises a processor (41), memory (42), and a storage medium (43). Data blocks in the storage medium (43) are organized in a tree structure, leaf nodes of the tree are used to store the data blocks, and a parent node and a root node of the tree are used to store index data, and the index data is used to index the data blocks. The method is performed by the processor (41), and comprises: receiving a plurality of data blocks and writing the plurality of data blocks to the memory (21); modifying the plurality of data blocks in the memory (22); determining at least two data blocks from the plurality of modified data blocks, index data of the at least two data blocks being the same (23); assigning a storage address to the at least two data blocks in the storage medium, and writing the at least two data blocks to the storage medium according to the assigned storage address(24); and modifying the index data that points to the at least two data blocks (25).

Description

一种数据写入方法及存储设备Data writing method and storage device
本申请要求于2014年11月28日提交中国专利局、申请号为201410712344.5、发明名称为“一种数据写入方法及存储设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese Patent Application No. 201410712344.5, entitled "A Data Writing Method and Storage Device", filed on November 28, 2014, the entire contents of which is incorporated herein by reference. In the application.
技术领域Technical field
本发明涉及电子技术领域,尤其涉及一种数据写入方法及存储设备。The present invention relates to the field of electronic technologies, and in particular, to a data writing method and a storage device.
背景技术Background technique
SSD(英文:Solid State Drive;中文:固态硬盘)相比于传统的机械硬盘,具有读写速度快、防震、体积小,零噪音等优点,被人们广泛使用。一般SSD的写入次数有限。Compared with traditional mechanical hard disks, SSD (English: Solid State Drive; Chinese) has the advantages of fast reading and writing speed, shockproof, small size, zero noise, etc., and is widely used. The number of writes to a typical SSD is limited.
现有技术中,修改SSD上的数据块采用ROW(英文:Redirection On Write;中文:写时重定向)技术。现有基于ROW技术在SSD上构建文件系统一般会把整个文件系统组织成一棵树状结构。树状结构中的叶子节点用于保存数据块,父节点及根为索引数据,索引数据用于索引数据块。In the prior art, the data block on the SSD is modified by using ROW (English: Redirection On Write; Chinese: write-time redirection) technology. Existing file system based on ROW technology on SSD generally organizes the entire file system into a tree structure. The leaf nodes in the tree structure are used to store data blocks, the parent nodes and roots are index data, and the index data is used to index data blocks.
当修改SSD上的数据块时,首先在内存中修改,然后为修改后的数据块在SSD上分配存储地址,为了能够索引到修改后的数据块,需要对修改后的数据块的索引数据进行更新。更新完毕后,文件系统会产生一个新的树根,以替换掉旧的树根。When modifying the data block on the SSD, first modify it in the memory, and then allocate the storage address on the SSD for the modified data block. In order to be able to index to the modified data block, the index data of the modified data block needs to be performed. Update. After the update is complete, the file system will spawn a new tree root to replace the old tree root.
现有技术中,每次修改数据块,都会导致索引数据被改写。当修改的数据量大时,会导致大量索引数据被改写,对于SSD来说会造成很大的写开销,导致SSD性能及寿命下降。并且现有技术中必须等文件系统产生新的树根后才能将修改后的数据块从内存中删除,内存利用率低。In the prior art, each time a data block is modified, the index data is overwritten. When the amount of modified data is large, a large amount of index data is overwritten, which causes a large write overhead for the SSD, resulting in a decrease in SSD performance and lifetime. Moreover, in the prior art, the file system must be generated with a new root to delete the modified data block from the memory, and the memory utilization is low.
因此,现有技术存在的技术问题是:每次修改数据块都会相应地修改它的索引数据,对SSD造成较大的写开销,导致SSD性能及寿命下降。 Therefore, the technical problem existing in the prior art is that each time the data block is modified, its index data is modified accordingly, causing a large write overhead on the SSD, resulting in a decrease in SSD performance and lifetime.
发明内容Summary of the invention
本发明实施例提供一种数据写入方法及存储设备,用于解决现有技术中存在的每次修改数据块都会相应地修改它的索引数据,对SSD造成较大的写开销,导致SSD性能及寿命下降的技术问题,实现了减小修改数据块对SSD造成的写开销,提高SSD性能,延长SSD的寿命的技术效果。The embodiment of the present invention provides a data writing method and a storage device, which are used to solve the problem that each modified data block existing in the prior art will modify its index data correspondingly, causing a large write overhead on the SSD, resulting in SSD performance. And the technical problem of declining lifespan achieves the technical effect of reducing the write overhead caused by modifying the data block to the SSD, improving the performance of the SSD, and prolonging the life of the SSD.
本发明实施例第一方面提供了一种数据写入方法,所述方法应用于存储设备中,所述存储设备包括处理器、内存和存储介质,所述存储介质中的数据块以树结构组织,所述树的叶子节点用于保存数据块,所述树的父节点和根节点用于保存索引数据,所述索引数据用于索引所述数据块,所述方法由所述处理器执行,包括:A first aspect of the embodiments of the present invention provides a data writing method, where the method is applied to a storage device, where the storage device includes a processor, a memory, and a storage medium, and the data blocks in the storage medium are organized in a tree structure. a leaf node of the tree is used to save a data block, a parent node and a root node of the tree are used to store index data, the index data is used to index the data block, and the method is performed by the processor. include:
接收多个数据块,写入所述内存;Receiving a plurality of data blocks and writing to the memory;
在所述内存中修改所述多个数据块;Modifying the plurality of data blocks in the memory;
从所述修改后的多个数据块中确定至少两个数据块,所述至少两个数据块的索引数据相同;Determining at least two data blocks from the modified plurality of data blocks, the index data of the at least two data blocks being the same;
为所述至少两个数据块分配在所述存储介质中的存储地址,根据所述分配的存储地址,将所述至少两个数据块写入所述存储介质;Allocating a storage address in the storage medium for the at least two data blocks, and writing the at least two data blocks to the storage medium according to the allocated storage address;
修改指向所述至少两个数据块的索引数据。Modifying index data directed to the at least two data blocks.
结合第一方面,在第一种可能的实现方式中,在所述修改指向所述至少两个数据块的索引数据之前,所述方法还包括:With reference to the first aspect, in a first possible implementation, before the modifying is directed to the index data of the at least two data blocks, the method further includes:
将所述至少两个数据块从所述内存中删除。The at least two data blocks are deleted from the memory.
结合第一方面,在第二种可能的实现方式中,所述修改指向所述至少两个数据块的索引数据,具体包括:With reference to the first aspect, in a second possible implementation, the modifying is directed to the index data of the at least two data blocks, and specifically includes:
为所述至少两个数据块创建记录表,记录所述至少两个数据块在所述存储介质中的存储地址;Creating a record table for the at least two data blocks, and recording a storage address of the at least two data blocks in the storage medium;
根据所述记录表,在所述内存中修改指向所述至少两个数据块的索引数据, 修改后的所述至少两个数据块的索引数据指向所述至少两个数据块的存储地址;Determining index data pointing to the at least two data blocks in the memory according to the record table, The modified index data of the at least two data blocks points to a storage address of the at least two data blocks;
将所述修改后的所述至少两个数据块的索引数据写入所述存储介质。Indexing the modified index data of the at least two data blocks to the storage medium.
本发明实施例第二方面提供了一种存储设备,所述存储设备包括处理器、内存和存储介质,所述存储介质中的数据块以树结构组织,所述树的叶子节点用于保存数据块,所述树的父节点和根节点用于保存索引数据,所述索引数据用于索引所述数据块,所述处理器用于:A second aspect of the embodiments of the present invention provides a storage device, where the storage device includes a processor, a memory, and a storage medium, where data blocks in the storage medium are organized in a tree structure, and leaf nodes of the tree are used to save data. a block, a parent node and a root node of the tree are used to store index data, the index data is used to index the data block, and the processor is configured to:
接收多个数据块,写入所述内存;Receiving a plurality of data blocks and writing to the memory;
在所述内存中修改所述多个数据块;Modifying the plurality of data blocks in the memory;
从所述修改后的多个数据块中确定至少两个数据块,所述至少两个数据块的索引数据相同;Determining at least two data blocks from the modified plurality of data blocks, the index data of the at least two data blocks being the same;
为所述至少两个数据块分配在所述存储介质中的存储地址,根据所述分配的存储地址,将所述至少两个数据块写入所述存储介质;Allocating a storage address in the storage medium for the at least two data blocks, and writing the at least two data blocks to the storage medium according to the allocated storage address;
修改指向所述至少两个数据块的索引数据。Modifying index data directed to the at least two data blocks.
结合第二方面,在第一种可能的实现方式中,所述处理器还用于:In conjunction with the second aspect, in a first possible implementation, the processor is further configured to:
在所述修改指向所述至少两个数据块的索引数据之前,将所述至少两个数据块从所述内存中删除。The at least two data blocks are deleted from the memory before the modification points to the index data of the at least two data blocks.
结合第二方面,在第二种可能的实现方式中,处理器具体用于:In combination with the second aspect, in a second possible implementation, the processor is specifically configured to:
为所述至少两个数据块创建记录表,记录所述至少两个数据块在所述存储介质中的存储地址;Creating a record table for the at least two data blocks, and recording a storage address of the at least two data blocks in the storage medium;
根据所述记录表,在所述内存中修改指向所述至少两个数据块的索引数据,修改后的索引数据指向所述至少两个数据块的存储地址;Determining index data pointing to the at least two data blocks in the memory according to the record table, where the modified index data points to a storage address of the at least two data blocks;
将所述修改后的所述至少两个数据块的索引数据写入所述存储介质。Indexing the modified index data of the at least two data blocks to the storage medium.
本发明实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点:One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
本发明实施例中,首先在内存中修改多个数据块,然后从修改后的多个数 据块中确定索引数据相同的至少两个数据块,接着将至少两个数据块写入到存储介质,最后修改指向至少两个数据块的索引数据。In the embodiment of the present invention, first, modifying a plurality of data blocks in the memory, and then modifying the plurality of data blocks At least two data blocks having the same index data are determined in the block, then at least two data blocks are written to the storage medium, and finally the index data directed to the at least two data blocks is modified.
相比现有技术中每次将修改后的数据块从内存写入存储介质后,都要对修改后的数据块的索引数据进行更新的技术方案,本发明实施例中从修改后的数据块中确定索引数据相同的至少两个数据块,将索引数据相同的至少两个数据块从内存写入存储介质后,对至少两个数据块共同的索引数据进行批量更新,所以减小了对索引数据进行更新的次数,实现了减小修改数据块对存储设备造成的写开销。Compared with the prior art, each time the modified data block is written from the memory into the storage medium, the index data of the modified data block is updated, and the modified data block is used in the embodiment of the present invention. Determining at least two data blocks having the same index data, and writing at least two data blocks having the same index data from the memory to the storage medium, and batch updating the index data common to the at least two data blocks, thereby reducing the index The number of times the data is updated is implemented to reduce the write overhead caused by modifying the data block to the storage device.
附图说明DRAWINGS
为了更清楚地说明本发明或现有技术中的技术方案,下面将对本发明或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the present invention or the technical solutions in the prior art, the drawings to be used in the present invention or the description of the prior art will be briefly described below. It is obvious that the drawings in the following description are merely the present invention. Some of the embodiments can be obtained by those of ordinary skill in the art in view of the drawings without departing from the scope of the invention.
图1为本发明实施例提供的信息处理方法适用的文件系统的示意图;1 is a schematic diagram of a file system to which an information processing method according to an embodiment of the present invention is applied;
图2为本发明实施例提供的信息处理方法的流程图;2 is a flowchart of an information processing method according to an embodiment of the present invention;
图3为本发明实施例中更新索引数据的流程图;3 is a flowchart of updating index data in an embodiment of the present invention;
图4为本发明实施例提供的存储设备的硬件结构示意图。FIG. 4 is a schematic structural diagram of hardware of a storage device according to an embodiment of the present invention.
具体实施方式detailed description
本发明实施例提供一种数据写入方法及存储设备,用于解决现有技术中存在的每次修改数据块都会相应地修改它的索引数据,对SSD造成较大的写开销,导致SSD性能及寿命下降的技术问题,实现了减小修改数据块对SSD造成的写开销,提高SSD性能,延长SSD的寿命的技术效果。The embodiment of the present invention provides a data writing method and a storage device, which are used to solve the problem that each modified data block existing in the prior art will modify its index data correspondingly, causing a large write overhead on the SSD, resulting in SSD performance. And the technical problem of declining lifespan achieves the technical effect of reducing the write overhead caused by modifying the data block to the SSD, improving the performance of the SSD, and prolonging the life of the SSD.
本发明实施例中,首先在内存中修改多个数据块,然后从修改后的多个数据块中确定索引数据相同的至少两个数据块,接着将至少两个数据块写入到存 储介质,最后修改指向至少两个数据块的索引数据。In the embodiment of the present invention, first, a plurality of data blocks are modified in a memory, and then at least two data blocks having the same index data are determined from the modified plurality of data blocks, and then at least two data blocks are written to the memory. The storage medium is finally modified to index data pointing to at least two data blocks.
相比现有技术中每次将修改后的数据块从内存写入存储介质后,都要对修改后的数据块的索引数据进行更新的技术方案,本发明实施例中从修改后的数据块中确定索引数据相同的至少两个数据块,将索引数据相同的至少两个数据块从内存写入存储介质后,对至少两个数据块共同的索引数据进行批量更新,所以减小了对索引数据进行更新的次数,实现了减小修改数据块对存储设备造成的写开销。Compared with the prior art, each time the modified data block is written from the memory into the storage medium, the index data of the modified data block is updated, and the modified data block is used in the embodiment of the present invention. Determining at least two data blocks having the same index data, and writing at least two data blocks having the same index data from the memory to the storage medium, and batch updating the index data common to the at least two data blocks, thereby reducing the index The number of times the data is updated is implemented to reduce the write overhead caused by modifying the data block to the storage device.
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is a partial embodiment 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 application.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。The term "and/or" in this context is merely an association describing the associated object, indicating that there may be three relationships, for example, A and / or B, which may indicate that A exists separately, and both A and B exist, respectively. B these three situations. In addition, the character "/" in this article generally indicates that the contextual object is an "or" relationship.
下面结合附图对本发明的实施方式进行详细说明。Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
本发明实施例提供一种数据写入方法,应用于存储设备中。请参考图4,图4为存储设备40的硬件结构示意图。存储设备40可以是SSD(英文:Solid State Drive;中文:固态硬盘)包括:处理器41、内存42和存储介质43,存储介质43可以为Flash颗粒或其他类型的硬盘。在存储介质43中可以存储数据。具体地,存储介质43中的数据块以树结构组织。请参考图1,图1为存储介质43中的树结构的示意图。树的叶子节点用于保存数据块,树的父节点和根节点用于保存索引数据,索引数据用于索引数据块。图1中,树根用于保存索引数据A,父节点用于保存索引数据B和索引数据C,叶子节点用于保存数据块D、数据块E、数据块F、数据块H。 Embodiments of the present invention provide a data writing method, which is applied to a storage device. Please refer to FIG. 4. FIG. 4 is a schematic diagram showing the hardware structure of the storage device 40. The storage device 40 may be an SSD (English: Solid State Drive; Chinese: SSD) including a processor 41, a memory 42 and a storage medium 43, and the storage medium 43 may be a Flash granule or other type of hard disk. Data can be stored in the storage medium 43. Specifically, the data blocks in the storage medium 43 are organized in a tree structure. Please refer to FIG. 1. FIG. 1 is a schematic diagram of a tree structure in a storage medium 43. The leaf node of the tree is used to save the data block, the parent node and the root node of the tree are used to store the index data, and the index data is used to index the data block. In FIG. 1, the root of the tree is used to store the index data A, the parent node is used to store the index data B and the index data C, and the leaf node is used to store the data block D, the data block E, the data block F, and the data block H.
如图4所示,在实际应用过程中,存储设备40可以作为一个独立的电子设备,与服务器400相连,存储设备40还可以作为服务器400的一个元件,服务器400向存储设备40发送写入数据的请求,存储设备40接收到写入数据的请求后,响应写入数据的请求,存储设备40的处理器41执行本发明实施例提供的写入方法。As shown in FIG. 4, in an actual application process, the storage device 40 can be connected to the server 400 as a separate electronic device. The storage device 40 can also serve as an element of the server 400. The server 400 sends the write data to the storage device 40. After the storage device 40 receives the request for writing data, the processor 41 of the storage device 40 executes the writing method provided by the embodiment of the present invention in response to the request for writing the data.
请参考图2,图2为本发明实施例提供的数据写入方法的流程图。本发明实施例提供的数据写入方法,所述方法可以应用在图4所述的存储设备40中,由处理器41执行,包括以下步骤:Please refer to FIG. 2. FIG. 2 is a flowchart of a data writing method according to an embodiment of the present invention. The data writing method provided by the embodiment of the present invention, which may be applied to the storage device 40 described in FIG. 4, is executed by the processor 41, and includes the following steps:
步骤21:接收多个数据块,写入所述内存;Step 21: Receive a plurality of data blocks and write the memory;
步骤22:在所述内存中修改所述多个数据块;Step 22: Modify the plurality of data blocks in the memory;
步骤23:从所述修改后的多个数据块中确定至少两个数据块,所述至少两个数据块的索引数据相同;Step 23: Determine at least two data blocks from the modified plurality of data blocks, where index data of the at least two data blocks are the same;
步骤24:为所述至少两个数据块分配在所述存储介质中的存储地址,根据所述分配的存储地址,将所述至少两个数据块写入所述存储介质;Step 24: Allocating a storage address in the storage medium for the at least two data blocks, and writing the at least two data blocks to the storage medium according to the allocated storage address;
步骤25:修改指向所述至少两个数据块的索引数据。Step 25: Modify index data pointing to the at least two data blocks.
当服务器400想要向存储设备40中写入数据时,会向存储设备40发送写入数据的请求,存储设备40接收到写入数据的请求后,存储设备的处理器41响应写入数据的请求,接收服务器发送的多个数据块,然后写入内存。如图1所示,处理器41接收数据块D、数据块E、数据块F、数据块H,写入内存42中,分别保存在树的叶子节点中。When the server 400 wants to write data to the storage device 40, a request to write data is sent to the storage device 40, and after the storage device 40 receives the request to write the data, the processor 41 of the storage device responds to the written data. Request, receive multiple data blocks sent by the server, and then write to memory. As shown in FIG. 1, the processor 41 receives the data block D, the data block E, the data block F, and the data block H, and writes them into the memory 42, and stores them in the leaf nodes of the tree.
当服务器400想要修改存储设备40中的数据块时,会向存储设备40发送修改数据的请求,存储设备40接收到修改数据的请求后,存储设备的处理器41响应修改数据的请求,首先在内存中修改数据块,产生脏数据块,其中脏数据块即为在内存中修改后的,且未写入存储介质中的数据块。When the server 400 wants to modify the data block in the storage device 40, the request for modifying the data is sent to the storage device 40. After the storage device 40 receives the request to modify the data, the processor 41 of the storage device responds to the request to modify the data, first. The data block is modified in the memory to generate a dirty data block, wherein the dirty data block is a data block that is modified in the memory and is not written into the storage medium.
以对图1中的数据块D修改为例。在内存中由树根保存的索引数据A,经父节点保存的索引数据B索引到数据块D,然后将数据块D修改为数据块S, 将数据块S存储在内存中,由于数据块S仅在内存中修改,还未将数据块S写入存储介质中,所以数据块S为脏数据块,脏数据块S的索引数据为:索引数据B。按照相同的修改方法,可以对数据块E进行修改,产生脏数据块H,脏数据块H的索引数据为:索引数据B。The modification of the data block D in FIG. 1 is taken as an example. The index data A held by the root of the tree in the memory is indexed to the data block D by the index data B held by the parent node, and then the data block D is modified into the data block S, The data block S is stored in the memory. Since the data block S is only modified in the memory, the data block S has not been written into the storage medium, so the data block S is a dirty data block, and the index data of the dirty data block S is: an index Data B. According to the same modification method, the data block E can be modified to generate a dirty data block H, and the index data of the dirty data block H is: index data B.
本发明实施例为了避免每次在将脏数据块从内存中写入到存储介质中后,都立即更新脏数据块的索引数据,提出了一种批量更新索引数据的方法,在为脏数据块创建脏数据块记录之后,可以执行步骤23,从修改后的多个数据块中确定至少两个数据块,至少两个数据块的索引数据相同。In order to avoid updating the index data of the dirty data block immediately after writing the dirty data block from the memory into the storage medium, the embodiment of the present invention proposes a method for batch updating the index data, which is a dirty data block. After the dirty data block record is created, step 23 may be performed to determine at least two data blocks from the modified plurality of data blocks, and the index data of the at least two data blocks is the same.
继续沿用上述例子,脏数据块S的索引数据为:索引数据B,脏数据块H的索引数据为:索引数据B,则可以确定脏数据块S和脏数据块H为两个索引数据相同的数据块。Continuing with the above example, the index data of the dirty data block S is: index data B, and the index data of the dirty data block H is: index data B, it can be determined that the dirty data block S and the dirty data block H are the same for the two index data. data block.
接着可以执行步骤24,将索引数据相同的至少两个脏数据块从内存中写入到存储介质中。Then, step 24 can be performed to write at least two dirty data blocks with the same index data from the memory into the storage medium.
为了将脏数据块从内存写入存储介质中,首先要为脏数据块分配在存储介质中的存储地址,存储介质中存储地址与物理块号相对应,通常用物理块号表征存储地址。只要一个脏数据块产生,即可为产生的脏数据块分配物理块号。In order to write dirty data blocks from the memory into the storage medium, the dirty data block is first allocated a storage address in the storage medium. The storage address in the storage medium corresponds to the physical block number, and the physical block number is usually used to represent the storage address. As long as a dirty data block is generated, the physical block number can be assigned to the generated dirty data block.
继续沿用上述例子,内存中有脏数据块S和脏数据块H,则为脏数据块S分配的物理块号为01,为脏数据块H分配的物理块号为02,物理块号01及物理块号02分别表征存储介质的存储地址为a和b。然后,将脏数据块S从内存中写入到物理块号01表征的存储地址a,将脏数据块H从内存中写入到物理块号02表征的存储地址b。Continuing with the above example, if there is a dirty data block S and a dirty data block H in the memory, the physical block number assigned to the dirty data block S is 01, the physical block number assigned to the dirty data block H is 02, the physical block number 01 and Physical block number 02 characterizes the storage addresses of the storage medium as a and b, respectively. Then, the dirty data block S is written from the memory to the memory address a characterized by the physical block number 01, and the dirty data block H is written from the memory to the memory address b represented by the physical block number 02.
在将索引数据相同的至少两个脏数据块从内存中写入到存储介质中之后,就可以执行步骤25:修改指向索引数据相同的至少两个脏数据块的索引数据。After the at least two dirty data blocks having the same index data are written from the memory into the storage medium, step 25 can be performed: modifying the index data of the at least two dirty data blocks that are the same as the index data.
请参考图3,图3为本发明实施例中更新索引数据的流程图。更新索引数据具体包括以下步骤:Please refer to FIG. 3. FIG. 3 is a flowchart of updating index data in an embodiment of the present invention. Updating the index data specifically includes the following steps:
步骤31:为所述至少两个数据块创建记录表,记录所述至少两个数据块在 所述存储介质中的存储地址;Step 31: Create a record table for the at least two data blocks, and record the at least two data blocks at a storage address in the storage medium;
步骤32:根据所述记录表,在所述内存中修改指向所述至少两个数据块的索引数据,修改后的索引数据指向所述至少两个数据块的存储地址;Step 32: Modify, according to the record table, index data that points to the at least two data blocks in the memory, and the modified index data points to a storage address of the at least two data blocks;
步骤33:将所述修改后的所述至少两个数据块的索引数据写入所述存储介质。Step 33: Write the modified index data of the at least two data blocks to the storage medium.
首先对步骤31进行解释说明。继续沿用上述例子,在为脏数据块分配物理块号后,本发明实施例中,为了直接将脏数据块从内存中写入到存储介质中后,能够索引到脏数据块,需要在内存中存储脏数据块的索引数据及物理块号的对应关系。也就是为脏数据块创建脏数据块记录,具体的,可以在非易失性内存中为脏数据块创建脏数据块记录。 Step 31 is explained first. Continuing with the above example, after the physical block number is assigned to the dirty data block, in the embodiment of the present invention, in order to directly write the dirty data block from the memory into the storage medium, the dirty data block can be indexed and needs to be in the memory. The correspondence between the index data of the dirty data block and the physical block number is stored. That is, dirty data block records are created for dirty data blocks. Specifically, dirty data block records can be created for dirty data blocks in non-volatile memory.
由于脏数据块记录的作用是索引脏数据块,所以为了避免断电后脏数据块记录丢失,导致无法索引到脏数据块,可以在非易失性内存中存储脏数据块记录,保证脏数据块记录的存储安全性。Since the function of the dirty data block record is to index the dirty data block, in order to avoid the loss of the dirty data block record after the power failure, the dirty data block cannot be indexed, and the dirty data block record can be stored in the non-volatile memory to ensure the dirty data. Storage security for block records.
继续沿用上述例子,在为脏数据块S分配物理块号01之后,为脏数据块S创建脏数据块记录,记录脏数据块S的索引数据为:索引数据B,对应的物理块号为01。同样的,在为脏数据块H分配物理块号02之后,为脏数据块H创建脏数据块记录,记录脏数据块H的索引数据为:索引数据B,对应的物理块号为02。Continuing with the above example, after the physical block number 01 is allocated to the dirty data block S, a dirty data block record is created for the dirty data block S, and the index data of the dirty data block S is recorded as: index data B, and the corresponding physical block number is 01. . Similarly, after the physical block number 02 is allocated to the dirty data block H, a dirty data block record is created for the dirty data block H, and the index data of the dirty data block H is recorded as: index data B, and the corresponding physical block number is 02.
本发明实施例中,在非易失性内存中为脏数据块创建脏数据块记录的同时,还可以在内存中建立映射表,映射表用于记录脏数据块的逻辑块号与物理块号的映射关系,逻辑块号可以根据索引数据获得的。In the embodiment of the present invention, when a dirty data block record is created for a dirty data block in a non-volatile memory, a mapping table may be established in the memory, and the mapping table is used to record the logical block number and the physical block number of the dirty data block. The mapping relationship, the logical block number can be obtained from the index data.
由于脏数据块记录是在非易失性内存中顺序存储的,所以如果要索引到一个脏数据块,就必须在脏数据块记录形成的记录表中顺序查找,查找耗时。为了方便快速查找到脏数据块,可以根据脏数据块的索引数据获得脏数据块的逻辑块号,然后建立逻辑块号到物理块号的映射。索引一个脏数据块时,根据映射关系能够迅速确定脏数据块的物理块号,方便快捷。 Since dirty block records are stored sequentially in non-volatile memory, if you want to index to a dirty block, you must search sequentially in the record table formed by the dirty block record to find the time. In order to quickly find the dirty data block, the logical block number of the dirty data block can be obtained according to the index data of the dirty data block, and then the mapping of the logical block number to the physical block number is established. When indexing a dirty data block, it is convenient and quick to quickly determine the physical block number of the dirty data block according to the mapping relationship.
继续沿用上述例子,脏数据块S的索引数据为:索引数据B,脏数据块H的索引数据为:索引数据B,原本索引数据B能够索引到数据块D和数据块E,数据块D的逻辑块号为111,数据块E的逻辑块号为222,所以可以确定脏数据块S的逻辑块号为111,脏数据块H的逻辑块号为222,即原数据块与修改后得到的脏数据块的逻辑块号相同。Continuing with the above example, the index data of the dirty data block S is: index data B, the index data of the dirty data block H is: index data B, the original index data B can be indexed to the data block D and the data block E, the data block D The logical block number is 111, and the logical block number of the data block E is 222, so it can be determined that the logical block number of the dirty data block S is 111, and the logical block number of the dirty data block H is 222, that is, the original data block and the modified data block are obtained. The logical block number of the dirty data block is the same.
然后建立映射表,表中逻辑块号111映射到物理块号01,逻辑块号222映射到物理块号02。索引逻辑块号为111的脏数据块时,根据映射表,能够迅速确定对应的物理块号为01。而如果根据多个脏数据块记录形成的记录表,就需要在记录表中顺序查找,如果逻辑块号为111的脏数据块的记录位于记录表的末端,则需要耗费很长时间才能索引到逻辑块号为111的脏数据块。A mapping table is then created in which the logical block number 111 is mapped to physical block number 01 and the logical block number 222 is mapped to physical block number 02. When the dirty block with the logical block number of 111 is indexed, the corresponding physical block number can be quickly determined to be 01 according to the mapping table. If a record table formed based on a plurality of dirty data blocks is recorded, it is necessary to search sequentially in the record table. If the record of the dirty block with the logical block number 111 is at the end of the record table, it takes a long time to index. A dirty block with a logical block number of 111.
虽然使用映射表索引脏数据块方便快捷,但是因为映射表只存储在内存中,一旦断电,映射表就会消失。所以可以在断电之后,根据多个脏数据块记录形成的记录表,再生成映射表。通常使用映射表来索引脏数据块。Although it is convenient and efficient to use a mapping table to index dirty data blocks, because the mapping table is only stored in memory, once the power is turned off, the mapping table disappears. Therefore, after the power is turned off, the formed record table is recorded according to the plurality of dirty data blocks, and the mapping table is generated. Mapping tables are often used to index dirty data blocks.
接着执行步骤32及步骤33。继续沿用上述例子,索引数据B原本记录数据块D的物理块号03和数据块E的物理块号04,由于分别对数据块D和数据块E进行修改,产生了脏数据块S和脏数据块H,所以,索引数据B要相应的改为记录脏数据块S的物理块号01和脏数据块H的物理块号02。因此,在内存中修改索引数据B,产生了脏数据块M,脏数据块M记录了脏数据块S的物理块号01和脏数据块H的物理块号02。Then step 32 and step 33 are performed. Continuing with the above example, the index data B originally records the physical block number 03 of the data block D and the physical block number 04 of the data block E. Since the data block D and the data block E are respectively modified, the dirty data block S and the dirty data are generated. Block H, therefore, the index data B should be correspondingly changed to record the physical block number 01 of the dirty data block S and the physical block number 02 of the dirty data block H. Therefore, the index data B is modified in the memory, and the dirty data block M is generated. The dirty data block M records the physical block number 01 of the dirty data block S and the physical block number 02 of the dirty data block H.
索引数据C原本记录数据块F的物理块号05和数据块K的物理块号06,假设在对数据块D和数据块E进行修改之后,还对数据块F和数据块K进行修改,产生了脏数据块W和脏数据块R,为脏数据块W和脏数据块R分配的物理块号为07和08,而脏数据块W和脏数据块R的索引数据为:索引数据C,两者共同的索引数据为索引数据C。所以索引数据C要相应的改为记录脏数据块W和脏数据块R的物理块号07和08。因此,在内存中修改索引数据C,产生了脏数据块N,脏数据块N记录了脏数据块W的物理块号07和脏数据块R 的物理块号08。The index data C originally records the physical block number 05 of the data block F and the physical block number 06 of the data block K, assuming that after modifying the data block D and the data block E, the data block F and the data block K are also modified to generate The dirty data block W and the dirty data block R, the physical block numbers assigned to the dirty data block W and the dirty data block R are 07 and 08, and the index data of the dirty data block W and the dirty data block R are: index data C, The index data common to both is index data C. Therefore, the index data C is correspondingly changed to record the physical block numbers 07 and 08 of the dirty data block W and the dirty data block R. Therefore, the index data C is modified in the memory, and the dirty data block N is generated. The dirty data block N records the physical block number 07 of the dirty data block W and the dirty data block R. Physical block number 08.
具体更新索引数据B和索引数据C的过程为:在内存中对索引数据B和索引数据C分别进行修改,产生了脏数据块M和脏数据块W。然后为脏数据块M和脏数据块W分别分配在存储介质中的物理块号为09和10,将脏数据块M和脏数据块W分别从内存中写入到物理块号为09和10所代表的存储地址中。The process of specifically updating the index data B and the index data C is: modifying the index data B and the index data C in the memory respectively, and generating the dirty data block M and the dirty data block W. Then, the physical block numbers assigned to the dirty data block M and the dirty data block W in the storage medium are 09 and 10, respectively, and the dirty data block M and the dirty data block W are written from the memory to the physical block numbers 09 and 10, respectively. The storage address represented.
最后更新索引数据A。由于脏数据块M的索引数据为:索引数据A,脏数据块W的索引数据为:索引数据A。所以两者共同对应的索引数据为索引数据A。索引数据A原本记录索引数据B的物理块号11和索引数据C的物理块号12,由于在内存中对索引数据B和索引数据C分别进行修改,产生了脏数据块M和脏数据块W。所以,索引数据A要相应的改为记录脏数据块M的物理块号09和脏数据块W的物理块号10。在内存中对索引数据A进行修改,产生了脏数据块T。然后为脏数据块T分配在存储介质中的物理块号为13,将脏数据块T从内存中写入到物理块号为13所代表的存储地址中。Finally update index data A. Since the index data of the dirty data block M is: index data A, the index data of the dirty data block W is: index data A. Therefore, the index data corresponding to the two is index data A. The index data A originally records the physical block number 11 of the index data B and the physical block number 12 of the index data C. Since the index data B and the index data C are respectively modified in the memory, the dirty data block M and the dirty data block W are generated. . Therefore, the index data A should be changed correspondingly to the physical block number 09 of the dirty data block M and the physical block number 10 of the dirty data block W. The index data A is modified in the memory to generate a dirty data block T. Then, the physical block number assigned to the dirty data block T in the storage medium is 13, and the dirty data block T is written from the memory into the storage address represented by the physical block number 13.
本发明实施例中,在将修改后的索引数据从所述内存中写入所述存储介质中之后,所述方法还包括:In the embodiment of the present invention, after the modified index data is written into the storage medium from the memory, the method further includes:
将非易失性内存中的脏数据块记录表及内存中的映射表删除;Delete the dirty block record table in the non-volatile memory and the map in the memory;
将修改后的索引数据从所述内存中删除。The modified index data is deleted from the memory.
具体来讲,在将修改后的索引数据从内存中写入到存储介质中后,可以在存储介质中索引到修改后的索引数据,内存中的修改后的数据就没必要存储了,所以可以为了提高内存利用率,可以在将修改后的索引数据从内存中写入到存储介质中后,将修改后的索引数据从内存中删除。Specifically, after the modified index data is written from the memory to the storage medium, the modified index data can be indexed in the storage medium, and the modified data in the memory is not necessary to be stored, so In order to improve the memory utilization, the modified index data may be deleted from the memory after the modified index data is written from the memory to the storage medium.
另外,在将脏数据块及修改后的索引数据从内存中写入到存储介质中后,可以直接从存储介质中索引到脏数据块及修改后的索引数据,非易失性内存中的脏数据块记录表及内存中的映射表也没必要存储了,所以可以为了提高内存利用率,可以在将修改后的索引数据从内存中写入到存储介质中后,将修改后的索引数据从内存中删除。 In addition, after the dirty data block and the modified index data are written from the memory into the storage medium, the dirty data block and the modified index data can be directly indexed from the storage medium, and the dirty data in the non-volatile memory. The data block record table and the mapping table in the memory are also unnecessary to be stored, so in order to improve the memory utilization, the modified index data can be read from the memory into the storage medium, and the modified index data is Deleted in memory.
本发明实施例中,当需要读取指定脏数据块时,所述方法还包括:In the embodiment of the present invention, when the specified dirty data block needs to be read, the method further includes:
接收读取指定脏数据块的读请求;Receiving a read request to read a specified dirty data block;
响应所述读请求,在所述内存中查找所述指定脏数据块;Retrieving the specified dirty data block in the memory in response to the read request;
若所述内存中存在所述指定脏数据块,则从所述内存中读出所述指定脏数据块;If the specified dirty data block exists in the memory, reading the specified dirty data block from the memory;
若所述内存中不存在所述指定脏数据块,根据所述指定脏数据块的指定逻辑块号,从所述映射表中查找到所述指定逻辑块号对应的指定物理块号;If the specified dirty data block does not exist in the memory, the specified physical block number corresponding to the specified logical block number is searched from the mapping table according to the specified logical block number of the specified dirty data block;
按照所述指定物理块号从所述存储介质中读出所述指定脏数据块。The designated dirty data block is read from the storage medium according to the specified physical block number.
具体来讲,当读取指定脏数据块时,可以首先从内存中查找指定脏数据块,如果指定脏数据块没有从内存中写入到存储介质中,那么从内存中可以直接查找到指定脏数据块,然后从内存中读出指定脏数据块。如果脏数据块从内存中写入到存储介质中,那么脏数据块就会从内存中删除,此时可以利用映射表,从映射表中查找到指定脏数据块的逻辑块号,进而找到对应的物理块号,从物理块号表征的存储地址中读出指定脏数据块。Specifically, when reading the specified dirty data block, you can first find the specified dirty data block from the memory. If the specified dirty data block is not written from the memory to the storage medium, the specified dirty can be directly found from the memory. The data block is then read out of memory to the specified dirty data block. If the dirty data block is written from the memory to the storage medium, the dirty data block is deleted from the memory. In this case, the mapping table can be used to find the logical block number of the specified dirty data block from the mapping table, thereby finding the corresponding The physical block number, the specified dirty data block is read from the storage address represented by the physical block number.
基于同一发明构思,本发明实施例还提供了一种存储设备。请参考图4,图4为存储设备40的硬件结构示意图。存储设备40可以是SSD(英文:Solid State Drive;中文:固态硬盘)包括:处理器41、内存42和存储介质43,存储介质43可以为Flash颗粒或其他类型的硬盘。存储介质43中的数据块以树结构组织,树的叶子节点用于保存数据块,树的父节点和根节点用于保存索引数据,索引数据用于索引数据块。图4所示的存储设备涉及到的术语的含义以及具体实现,可以参考前述图1至图3以及实施例的相关描述。Based on the same inventive concept, an embodiment of the present invention further provides a storage device. Please refer to FIG. 4. FIG. 4 is a schematic diagram showing the hardware structure of the storage device 40. The storage device 40 may be an SSD (English: Solid State Drive; Chinese: SSD) including a processor 41, a memory 42 and a storage medium 43, and the storage medium 43 may be a Flash granule or other type of hard disk. The data blocks in the storage medium 43 are organized in a tree structure, the leaf nodes of the tree are used to store data blocks, the parent nodes and root nodes of the tree are used to store index data, and the index data is used to index data blocks. For the meaning of the terminology involved in the storage device shown in FIG. 4 and the specific implementation, reference may be made to the foregoing descriptions of FIGS. 1 to 3 and the related embodiments.
如图4所示,在实际应用过程中,存储设备40可以作为一个独立的电子设备,与服务器400相连,存储设备40还可以作为服务器400的一个元件,服务器400向存储设备40发送写入数据的请求,存储设备40接收到写入数据的请求后,响应写入数据的请求,存储设备40的处理器41执行本发明实施例提供的写入方法。所述处理器41用于: As shown in FIG. 4, in an actual application process, the storage device 40 can be connected to the server 400 as a separate electronic device. The storage device 40 can also serve as an element of the server 400. The server 400 sends the write data to the storage device 40. After the storage device 40 receives the request for writing data, the processor 41 of the storage device 40 executes the writing method provided by the embodiment of the present invention in response to the request for writing the data. The processor 41 is configured to:
接收多个数据块,写入所述内存;Receiving a plurality of data blocks and writing to the memory;
在所述内存中修改所述多个数据块;Modifying the plurality of data blocks in the memory;
从所述修改后的多个数据块中确定至少两个数据块,所述至少两个数据块的索引数据相同;Determining at least two data blocks from the modified plurality of data blocks, the index data of the at least two data blocks being the same;
为所述至少两个数据块分配在所述存储介质中的存储地址,根据所述分配的存储地址,将所述至少两个数据块写入所述存储介质;Allocating a storage address in the storage medium for the at least two data blocks, and writing the at least two data blocks to the storage medium according to the allocated storage address;
修改指向所述至少两个数据块的索引数据。Modifying index data directed to the at least two data blocks.
可选的,所述处理器41还用于:Optionally, the processor 41 is further configured to:
在所述修改指向所述至少两个数据块的索引数据之前,将所述至少两个数据块从所述内存中删除。The at least two data blocks are deleted from the memory before the modification points to the index data of the at least two data blocks.
可选的,处理器41具体用于:Optionally, the processor 41 is specifically configured to:
为所述至少两个数据块创建记录表,记录所述至少两个数据块在所述存储介质中的存储地址;Creating a record table for the at least two data blocks, and recording a storage address of the at least two data blocks in the storage medium;
根据所述记录表,在所述内存中修改指向所述至少两个数据块的索引数据,修改后的索引数据指向所述至少两个数据块的存储地址;Determining index data pointing to the at least two data blocks in the memory according to the record table, where the modified index data points to a storage address of the at least two data blocks;
将所述修改后的所述至少两个数据块的索引数据写入所述存储介质。Indexing the modified index data of the at least two data blocks to the storage medium.
前述图1-图3实施例中的数据写入方法中的各种变化方式和具体实例同样适用于本实施例的存储设备,通过前述对数据写入方法的详细描述,本领域技术人员可以清楚的知道本实施例中存储设备的实施方法,所以为了说明书的简洁,在此不再详述。The various changes and specific examples in the data writing method in the foregoing embodiments of FIG. 1 to FIG. 3 are also applicable to the storage device of the embodiment. The foregoing detailed description of the data writing method can be clearly understood by those skilled in the art. The implementation method of the storage device in this embodiment is known, so for the sake of brevity of the description, it will not be described in detail herein.
本发明实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点:One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
本发明实施例中,首先在内存中修改多个数据块,然后从修改后的多个数据块中确定索引数据相同的至少两个数据块,接着将至少两个数据块写入到存储介质,最后修改指向至少两个数据块的索引数据。In the embodiment of the present invention, a plurality of data blocks are first modified in a memory, and then at least two data blocks having the same index data are determined from the modified plurality of data blocks, and then at least two data blocks are written to the storage medium. Finally, the index data pointing to at least two data blocks is modified.
相比现有技术中每次将修改后的数据块从内存写入存储介质后,都要对修 改后的数据块的索引数据进行更新的技术方案,本发明实施例中从修改后的数据块中确定索引数据相同的至少两个数据块,将索引数据相同的至少两个数据块从内存写入存储介质后,对至少两个数据块共同的索引数据进行批量更新,所以减小了对索引数据进行更新的次数,实现了减小修改数据块对存储设备造成的写开销。Compared with the prior art, each time the modified data block is written from the memory to the storage medium, it must be repaired. In the embodiment of the present invention, at least two data blocks with the same index data are determined from the modified data block, and at least two data blocks with the same index data are written from the memory. After the storage medium is added, the index data common to the at least two data blocks is batch-updated, so that the number of times the index data is updated is reduced, and the write overhead caused by the modified data block to the storage device is reduced.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发 明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。 Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the present invention. The spirit and scope of the Ming. Thus, it is intended that the present invention cover the modifications and modifications of the invention

Claims (6)

  1. 一种数据写入方法,所述方法应用于存储设备中,所述存储设备包括处理器、内存和存储介质,所述存储介质中的数据块以树结构组织,所述树的叶子节点用于保存数据块,所述树的父节点和根节点用于保存索引数据,所述索引数据用于索引所述数据块,所述方法由所述处理器执行,包括:A data writing method, the method being applied to a storage device, the storage device comprising a processor, a memory and a storage medium, the data blocks in the storage medium being organized in a tree structure, and a leaf node of the tree is used Saving a data block, the parent node and the root node of the tree are used to store index data, the index data is used to index the data block, and the method is performed by the processor, including:
    接收多个数据块,写入所述内存;Receiving a plurality of data blocks and writing to the memory;
    在所述内存中修改所述多个数据块;Modifying the plurality of data blocks in the memory;
    从所述修改后的多个数据块中确定至少两个数据块,所述至少两个数据块的索引数据相同;Determining at least two data blocks from the modified plurality of data blocks, the index data of the at least two data blocks being the same;
    为所述至少两个数据块分配在所述存储介质中的存储地址,根据所述分配的存储地址,将所述至少两个数据块写入所述存储介质;Allocating a storage address in the storage medium for the at least two data blocks, and writing the at least two data blocks to the storage medium according to the allocated storage address;
    修改指向所述至少两个数据块的索引数据。Modifying index data directed to the at least two data blocks.
  2. 如权利要求1所述的方法,其特征在于,在所述修改指向所述至少两个数据块的索引数据之前,所述方法还包括:The method of claim 1, wherein before the modifying points to the index data of the at least two data blocks, the method further comprises:
    将所述至少两个数据块从所述内存中删除。The at least two data blocks are deleted from the memory.
  3. 如权利要求1所述的方法,其特征在于,所述修改指向所述至少两个数据块的索引数据,包括:The method of claim 1, wherein the modifying the index data directed to the at least two data blocks comprises:
    为所述至少两个数据块创建记录表,记录所述至少两个数据块在所述存储介质中的存储地址;Creating a record table for the at least two data blocks, and recording a storage address of the at least two data blocks in the storage medium;
    根据所述记录表,在所述内存中修改指向所述至少两个数据块的索引数据,修改后的所述至少两个数据块的索引数据指向所述至少两个数据块的存储地址;Determining index data pointing to the at least two data blocks in the memory according to the record table, where the modified index data of the at least two data blocks points to a storage address of the at least two data blocks;
    将所述修改后的所述至少两个数据块的索引数据写入所述存储介质。Indexing the modified index data of the at least two data blocks to the storage medium.
  4. 一种存储设备,所述存储设备包括处理器、内存和存储介质,所述存储介质中的数据块以树结构组织,所述树的叶子节点用于保存数据块,所述树的父节点和根节点用于保存索引数据,所述索引数据用于索引所述数据块,所述 处理器用于:A storage device includes a processor, a memory, and a storage medium, the data blocks in the storage medium are organized in a tree structure, the leaf nodes of the tree are used to save data blocks, the parent node of the tree and The root node is configured to store index data, and the index data is used to index the data block, The processor is used to:
    接收多个数据块,写入所述内存;Receiving a plurality of data blocks and writing to the memory;
    在所述内存中修改所述多个数据块;Modifying the plurality of data blocks in the memory;
    从所述修改后的多个数据块中确定至少两个数据块,所述至少两个数据块的索引数据相同;Determining at least two data blocks from the modified plurality of data blocks, the index data of the at least two data blocks being the same;
    为所述至少两个数据块分配在所述存储介质中的存储地址,根据所述分配的存储地址,将所述至少两个数据块写入所述存储介质;Allocating a storage address in the storage medium for the at least two data blocks, and writing the at least two data blocks to the storage medium according to the allocated storage address;
    修改指向所述至少两个数据块的索引数据。Modifying index data directed to the at least two data blocks.
  5. 如权利要求4所述的存储设备,其特征在于,所述处理器还用于:The storage device of claim 4, wherein the processor is further configured to:
    在所述修改指向所述至少两个数据块的索引数据之前,将所述至少两个数据块从所述内存中删除。The at least two data blocks are deleted from the memory before the modification points to the index data of the at least two data blocks.
  6. 如权利要求4所述的存储设备,其特征在于,处理器具体用于:The storage device of claim 4, wherein the processor is specifically configured to:
    为所述至少两个数据块创建记录表,记录所述至少两个数据块在所述存储介质中的存储地址;Creating a record table for the at least two data blocks, and recording a storage address of the at least two data blocks in the storage medium;
    根据所述记录表,在所述内存中修改指向所述至少两个数据块的索引数据,修改后的索引数据指向所述至少两个数据块的存储地址;Determining index data pointing to the at least two data blocks in the memory according to the record table, where the modified index data points to a storage address of the at least two data blocks;
    将所述修改后的所述至少两个数据块的索引数据写入所述存储介质。 Indexing the modified index data of the at least two data blocks to the storage medium.
PCT/CN2015/083885 2014-11-28 2015-07-13 Data writing method and storage device WO2016082559A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410712344.5A CN104461384B (en) 2014-11-28 2014-11-28 A kind of method for writing data and storage device
CN201410712344.5 2014-11-28

Publications (1)

Publication Number Publication Date
WO2016082559A1 true WO2016082559A1 (en) 2016-06-02

Family

ID=52907513

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/083885 WO2016082559A1 (en) 2014-11-28 2015-07-13 Data writing method and storage device

Country Status (2)

Country Link
CN (1) CN104461384B (en)
WO (1) WO2016082559A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461384B (en) * 2014-11-28 2017-11-24 华为技术有限公司 A kind of method for writing data and storage device
CN105117415B (en) * 2015-07-30 2018-07-03 西安交通大学 A kind of SSD data-updating methods of optimization
CN107885803B (en) * 2017-10-31 2020-05-01 中国地质大学(武汉) Method and device for coupling big data writing-in and reading-out speed and storage device
CN108763239A (en) * 2018-03-22 2018-11-06 厦门欣旅通科技有限公司 A kind of network access times computational methods and device
CN109977078B (en) * 2019-03-26 2020-06-02 广州荔支网络技术有限公司 Data processing method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722449A (en) * 2012-05-24 2012-10-10 中国科学院计算技术研究所 Key-Value local storage method and system based on solid state disk (SSD)
CN103455437A (en) * 2012-05-30 2013-12-18 慧荣科技股份有限公司 Data storage device and data storage device operation method
CN103518364A (en) * 2013-03-19 2014-01-15 华为技术有限公司 Data update method for distributed storage system and server
US20140040199A1 (en) * 2012-07-31 2014-02-06 Wojclech Golab Data Management Using Writeable Snapshots in Multi-Versioned Distributed B-Trees
CN103677670A (en) * 2013-12-11 2014-03-26 华为技术有限公司 Method and device for reading data
CN104461384A (en) * 2014-11-28 2015-03-25 华为技术有限公司 Data write-in method and storage device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9244833B2 (en) * 2012-05-30 2016-01-26 Silicon Motion, Inc. Data-storage device and flash memory control method
CN103544124B (en) * 2012-07-16 2018-01-19 上海塞尚通信技术有限公司 The access method of Nand flash storages

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722449A (en) * 2012-05-24 2012-10-10 中国科学院计算技术研究所 Key-Value local storage method and system based on solid state disk (SSD)
CN103455437A (en) * 2012-05-30 2013-12-18 慧荣科技股份有限公司 Data storage device and data storage device operation method
US20140040199A1 (en) * 2012-07-31 2014-02-06 Wojclech Golab Data Management Using Writeable Snapshots in Multi-Versioned Distributed B-Trees
CN103518364A (en) * 2013-03-19 2014-01-15 华为技术有限公司 Data update method for distributed storage system and server
CN103677670A (en) * 2013-12-11 2014-03-26 华为技术有限公司 Method and device for reading data
CN104461384A (en) * 2014-11-28 2015-03-25 华为技术有限公司 Data write-in method and storage device

Also Published As

Publication number Publication date
CN104461384A (en) 2015-03-25
CN104461384B (en) 2017-11-24

Similar Documents

Publication Publication Date Title
US11099769B1 (en) Copying data without accessing the data
US11226747B2 (en) System and method for copy on write on an SSD
US8799601B1 (en) Techniques for managing deduplication based on recently written extents
JP5369807B2 (en) Storage device
US10120795B2 (en) Wear-leveling nandflash memory reading/writing method
WO2016082559A1 (en) Data writing method and storage device
TWI603194B (en) Data storage device and data accessing method
US8478933B2 (en) Systems and methods for performing deduplicated data processing on tape
JP2016526737A (en) POSIX-compatible file system, method for generating file list, and storage device
CN107135662B (en) Differential data backup method, storage system and differential data backup device
US20140280392A1 (en) File system operation on multi-tiered volume
JP2017204037A (en) Information processor, duplication elimination program, and duplication elimination method
US20170083537A1 (en) Mapping logical identifiers using multiple identifier spaces
US9898468B2 (en) Single pass file system repair with copy on write
US11321002B2 (en) Converting a virtual volume between volume types
US20160070648A1 (en) Data storage system and operation method thereof
US11176089B2 (en) Systems and methods for implementing dynamic file systems
US10268421B2 (en) Information recording device and information recording method
KR20090042570A (en) Apparatus and method for managing files and memory unit
US9977599B2 (en) Data deduplication with support for both thick and thin provisioning of storage objects
US8655892B2 (en) Data reorganization
JP2005108239A (en) Storage system for storing data in hierarchical data structure
JPH06103128A (en) Storage device
US11748259B2 (en) System and method to conserve device lifetime for snapshot generation
US10740015B2 (en) Optimized management of file system metadata within solid state storage devices (SSDs)

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: 15863823

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15863823

Country of ref document: EP

Kind code of ref document: A1