A kind of metadata storing method and device

文档序号:1741931 发布日期:2019-11-26 浏览:23次 中文

阅读说明:本技术 一种元数据存储方法及装置 (A kind of metadata storing method and device ) 是由 刘如意 孙京本 李佩 于 2019-08-23 设计创作,主要内容包括:本申请提供了一种元数据存储方法及装置,确定预设写缓存中刷盘目录下的待刷盘队列,待刷盘队列中存储有缓存树,缓存树包括刷盘树和接收树,刷盘树和接收树为B+树数据结构。控制接收树从等待队列中获取待写入元数据的地址信息。控制刷盘树从接收树中获取待写入元数据的地址信息,依据地址信息,将待写入元数据写入固态硬盘。可见本申请中,基于预设写缓存中刷盘队列中存储的缓存树,实现从等待队列中获取待写入元数据的地址信息,并依据地址信息,将待写入元数据写入固态硬盘中,由此能够将随机小块的元数据写入操作,转换为连续大块的元数据写入操作,从而显著提高了元数据写入固态硬盘的效率,提升全闪存储系统的数据处理效率和性能。(This application provides a kind of metadata storing method and devices, determine the plate to be brushed queue in default write buffer under brush catalogue, and cache tree is stored in plate to be brushed queue, and cache tree includes brush tree and receives tree, and brush tree and reception tree are B+ data tree structure.Control and receive the address information that tree obtains metadata to be written from waiting list.Control brush tree obtains the address information of metadata to be written from receiving in tree, according to address information, be written into metadata write-in solid state hard disk.It can be seen that in the application, based on the cache tree stored in brush queue in default write buffer, realize the address information that metadata to be written is obtained from waiting list, and according to address information, it is written into metadata write-in solid state hard disk, thus, it is possible to be converted to the metadata write operation of continuous bulk for the metadata write operation of random fritter, to significantly improve the efficiency of metadata write-in solid state hard disk, the data-handling efficiency and performance of full flash memory storage system are promoted.)

1. a kind of metadata storing method, which is characterized in that be applied to full flash memory storage system, comprising:

It determines the plate to be brushed queue in default write buffer under brush catalogue, is stored with cache tree in the plate to be brushed queue, it is described Cache tree includes brush tree and receives tree, and the brush tree and reception tree are B+ data tree structure;

The address information for receiving tree and obtaining metadata to be written from waiting list is controlled, the waiting list is for storing Metadata write request, the metadata write request include the address information of the metadata to be written;

It controls the brush tree and obtains the address information of metadata to be written in tree from described receive, according to the address information, Solid state hard disk is written into the metadata to be written.

2. the method according to claim 1, wherein the default process of the default write buffer includes:

The memory space that preset range is chosen in non-power-failure protection memory, using the memory space as it is described it is default write it is slow It deposits.

3. the method according to claim 1, wherein the control receptions tree from waiting list acquisition to The address information of metadata is written, comprising:

Based on a with the address information for receiving the brush tree acquisition metadata to be written that tree belongs in a cache tree Number controls the address information for receiving tree and obtaining the metadata to be written of corresponding number from waiting list;

In the brush tree after obtaining the address information of the metadata to be written in reception tree, the reception is controlled Tree continues the address information that the metadata to be written of corresponding number is obtained from the waiting list, until in the waiting list Address information without retrievable metadata to be written.

4. the method according to claim 1, wherein the control brush tree obtains from reception tree According to the address information solid state hard disk is written in the metadata to be written by the address information of metadata to be written, comprising:

It controls the brush tree and successively obtains the address information of metadata to be written from the reception tree, and obtained according to each Solid state hard disk is written in the metadata to be written of the correspondence address information by the address information arrived, until the reception is set The middle address information that can not obtain metadata to be written.

5. a kind of metadata storage device characterized by comprising

Determination unit stores in the plate to be brushed queue for determining the plate to be brushed queue in default write buffer under brush catalogue There is cache tree, the cache tree includes brush tree and receives tree, and the brush tree and reception tree are B+ data tree structure;

Control unit, it is described etc. for controlling the address information for receiving tree and obtaining metadata to be written from waiting list It is used to store metadata write request to queue, the metadata write request includes the address letter of the metadata to be written Breath;

Writing unit obtains the address information of metadata to be written, foundation from described receive for controlling the brush tree in tree Solid state hard disk is written in the metadata to be written by the address information.

6. device according to claim 5, which is characterized in that the determination unit includes:

Choose module, for non-power-failure protection memory in choose preset range memory space, using the memory space as The default write buffer.

7. device according to claim 5, which is characterized in that described control unit includes:

First control module, for based on the brush tree acquisition member to be written for receiving tree and belonging in a cache tree The address information number of data controls the address for receiving tree and obtaining the metadata to be written of corresponding number from waiting list Information;

Second control module, for obtaining the address information of the metadata to be written from the reception tree in the brush tree Later, the address information for receiving tree and continuing the metadata to be written of acquisition corresponding number from the waiting list is controlled, Until the address information without retrievable metadata to be written in the waiting list.

8. device according to claim 5, which is characterized in that said write unit includes:

Writing module successively obtains the address information of metadata to be written for controlling the brush tree from the reception tree, And according to the address information got every time, solid state hard disk is written into the metadata to be written of the correspondence address information, Until described receive the address information that can not obtain metadata to be written in tree.

9. a kind of full flash memory storage system, which is characterized in that store and fill including metadata described in any one of claim 5-8 It sets.

Technical field

This application involves technical field of data processing more particularly to a kind of metadata storing methods and device.

Background technique

With the rapid advances of solid state hard disk technology, the cost of solid state hard disk is gradually decreased, as composed by solid state hard disk Full flash memory storage system is increasingly by the favor of users.In order to adapt to the storage characteristics of solid state hard disk, existing full flash memory storage System writes the+data storage method of garbage reclamation using additional.Full flash memory storage system is writing the+process of garbage reclamation using additional In, a large amount of metadata can be generated, after a large amount of metadata is via caching, can be written in solid state hard disk again.However, existing Metadata storage mode in, according to the metadata write operation of random fritter, disorderly the metadata in caching is written solid In state hard disk, based on the additional storage characteristics write of solid state hard disk, the write-in for taking this writing mode that can make solid state hard disk is imitated Rate is substantially reduced, to reduce the data-handling efficiency and performance of full flash memory storage system.

Therefore, a kind of metadata storing method is needed, for improving the efficiency of metadata write-in solid state hard disk, to be promoted The data-handling efficiency and performance of full flash memory storage system.

Summary of the invention

This application provides a kind of metadata storing method and devices, it is therefore intended that improves metadata write-in solid state hard disk Efficiency, to promote the data-handling efficiency and performance of full flash memory storage system.

To achieve the goals above, this application provides following technical schemes:

The embodiment of the present application first aspect discloses a kind of metadata storing method, and the metadata storing method includes:

It determines the plate to be brushed queue in default write buffer under brush catalogue, is stored with cache tree in the plate to be brushed queue, The cache tree includes brush tree and receives tree, and the brush tree and reception tree are B+ data tree structure;

The address information for receiving tree and obtaining metadata to be written from waiting list is controlled, the waiting list is used for Metadata write request is stored, the metadata write request includes the address information of the metadata to be written;

The address information that the brush tree obtains metadata to be written from the reception tree is controlled, is believed according to the address Solid state hard disk is written in the metadata to be written by breath.

Optionally, in above-mentioned metadata storing method, the default process of the default write buffer includes:

The memory space that preset range is chosen in non-power-failure protection memory, writes the memory space as described preset Caching.

Optionally, in above-mentioned metadata storing method, the control reception tree obtains to be written from waiting list Enter the address information of metadata, comprising:

Believed based on the address for belonging to the acquisition of the brush tree in cache tree metadata to be written with the reception tree Number is ceased, the address information for receiving tree and obtaining the metadata to be written of corresponding number from waiting list is controlled;

In the brush tree after obtaining the address information of the metadata to be written in reception tree, described in control It receives tree and continues the address information for obtaining the metadata to be written of corresponding number from the waiting list, until the waiting team Address information without retrievable metadata to be written in column.

Optionally, in above-mentioned metadata storing method, the control brush tree from receptions set in acquisition to According to the address information solid state hard disk is written in the metadata to be written by the address information that metadata is written, comprising:

The address information that the brush tree successively obtains metadata to be written from the reception tree is controlled, and according to each Solid state hard disk is written in the metadata to be written of the correspondence address information by the address information got, until described connect Receive the address information that metadata to be written can not be obtained in tree.

The embodiment of the present application second aspect discloses a kind of metadata storage device, and the metadata storage device includes:

Determination unit, for determining the plate to be brushed queue in default write buffer under brush catalogue, in the plate to be brushed queue It is stored with cache tree, the cache tree includes brush tree and receives tree, and the brush tree and reception tree are B+ tree data knot Structure;

Control unit, for controlling the address information for receiving tree and obtaining metadata to be written from waiting list, institute Waiting list is stated for storing metadata write request, the metadata write request includes the address of the metadata to be written Information;

Writing unit obtains the address information of metadata to be written from described receive for controlling the brush tree in tree, According to the address information, solid state hard disk is written into the metadata to be written.

Optionally, in above-mentioned metadata storage device, the determination unit includes:

Module is chosen, for choosing the memory space of preset range in non-power-failure protection memory, by the memory space As the default write buffer.

Optionally, in above-mentioned metadata storage device, described control unit includes:

First control module, for be written based on the acquisition of the brush tree in a cache tree is belonged to the reception tree Enter the address information number of metadata, controls described receive and set the metadata to be written for obtaining corresponding number from waiting list Address information;

Second control module, for obtaining the address of the metadata to be written from the reception tree in the brush tree After information, the address letter for receiving tree and continuing the metadata to be written of acquisition corresponding number from the waiting list is controlled Breath, until the address information without retrievable metadata to be written in the waiting list.

Optionally, in above-mentioned metadata storage device, said write unit includes:

Writing module, the address for successively obtaining metadata to be written from the reception tree for controlling the brush tree are believed Breath, and according to the address information got every time, the metadata to be written write-in solid-state of the correspondence address information is hard Disk, until described receive the address information that can not obtain metadata to be written in tree.

The embodiment of the present application third aspect discloses a kind of full flash memory storage system, and the full flash memory storage system includes above-mentioned Apply for metadata storage device disclosed in embodiment second aspect.

Metadata storing method and device provided by the present application determine the plate to be brushed team in default write buffer under brush catalogue It arranges, cache tree is stored in plate to be brushed queue, cache tree includes brush tree and receives tree, and brush tree and reception tree are B+ tree data Structure.The address information that tree obtains metadata to be written from waiting list is controlled and received, waiting list is for storing metadata Write request, metadata write request include the address information of metadata to be written.Control brush tree from receive tree in acquisition to The address information that metadata is written is written into metadata write-in solid state hard disk according to address information.It can be seen that in the application, base The cache tree stored in brush queue in default write buffer realizes the address letter that metadata to be written is obtained from waiting list Breath, and according to address information, it is written into metadata write-in solid state hard disk, thus, it is possible to the metadata of random fritter is written Operation, is converted to the metadata write operation of continuous bulk, to significantly improve the efficiency of metadata write-in solid state hard disk, mentions Rise the data-handling efficiency and performance of full flash memory storage system.

Detailed description of the invention

In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.

Fig. 1 is a kind of schematic diagram of metadata storing method provided by the embodiments of the present application;

Fig. 2 is a kind of ground for controlling and receiving tree and obtaining metadata to be written from waiting list provided by the embodiments of the present application The schematic diagram of the specific implementation of location information;

Fig. 3 is a kind of structural schematic diagram of metadata storage device provided by the embodiments of the present application;

Fig. 4 is the structural schematic diagram of another metadata storage device provided by the embodiments of the present application;

Fig. 5 is the structural schematic diagram of another metadata storage device provided by the embodiments of the present application;

Fig. 6 is the structural schematic diagram of another metadata storage device provided by the embodiments of the present application.

Specific embodiment

Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.

As shown in Figure 1, being a kind of schematic diagram of metadata storing method provided by the embodiments of the present application, this method is applied to Full flash memory storage system, includes the following steps:

S101: the plate to be brushed queue in default write buffer under brush catalogue is determined.

In S101, it is stored with cache tree in plate to be brushed queue, cache tree includes brush tree and receives tree, brush tree and is connect Receiving tree is B+ data tree structure.

It should be noted that metadata cache is in power down protection memory, because power down protection memory memory source very It is limited, in order to improve the memory usage of power down protection memory.

Optionally, the memory space that preset range is chosen in non-power-failure protection memory is write using memory space as default Caching.

It should be noted that default write buffer includes multiple catalogues, brush catalogue is to meet brush condition in multiple catalogues Catalogue.One or more cache trees are stored in plate to be brushed queue under brush catalogue.

S102: the address information that tree obtains metadata to be written from waiting list is controlled and received.

In S102, waiting list includes first number to be written for storing metadata write request, metadata write request According to address information.

It should be noted that receive tree obtains the address information of metadata to be written from waiting list, and by the address Information is stored in the node of itself.

S103: control brush tree obtains the address information of metadata to be written from receiving in tree, foundation address information, will be to Metadata is written, solid state hard disk is written.

In S103, control brush tree successively obtains the address information of metadata to be written from reception tree, and according to every Solid state hard disk is written in the metadata to be written of corresponding address information by the secondary address information got, can not in tree until receiving Obtain the address information of metadata to be written.

In the embodiment of the present application, the plate to be brushed queue in default write buffer under brush catalogue is determined, in plate to be brushed queue It is stored with cache tree, cache tree includes brush tree and receives tree, and brush tree and reception tree are B+ data tree structure.Control and receive tree The address information of metadata to be written is obtained from waiting list, waiting list is for storing metadata write request, metadata Write request includes the address information of metadata to be written.Control brush tree obtains the address of metadata to be written from receiving in tree Information is written into metadata write-in solid state hard disk according to address information.It can be seen that in the application, based on being brushed in default write buffer The cache tree stored in disk queue is realized the address information for obtaining metadata to be written from waiting list, and is believed according to address Breath is written into metadata write-in solid state hard disk, by the metadata write operation of random fritter, is converted to the member of continuous bulk Data write operation, so that the efficiency of metadata write-in solid state hard disk is significantly improved, at the data for promoting full flash memory storage system Manage efficiency and performance.

Optionally, in above-mentioned S102 shown in fig. 1, the ground that tree obtains metadata to be written from waiting list is controlled and received Location information this process in the concrete realization, as shown in Fig. 2, controlling and receiving tree from waiting for one kind provided by the embodiments of the present application The schematic diagram that the specific implementation of the address information of metadata to be written is obtained in queue, includes the following steps:

S201: based on the address information for belonging to the acquisition of the brush tree in cache tree metadata to be written with reception tree Number controls and receives the address information for setting the metadata to be written that corresponding number is obtained from waiting list.

In S201, waiting list includes first number to be written for storing metadata write request, metadata write request According to address information.

Specifically, if with the address information for setting the brush tree acquisition metadata to be written belonged in a cache tree is received Number is 10, then controls and receives the address information set and obtain 10 metadata to be written from waiting list.

It should be noted that above-mentioned specific implementation process is used only for illustrating.

S202: it in brush tree after obtaining the address information of metadata to be written in reception tree, controls and receives tree and continues The address information of the metadata to be written of corresponding number is obtained from waiting list, until without retrievable to be written in waiting list Enter the address information of metadata.

In S202, the number that tree obtains address information from waiting list every time is received, is obtained from reception tree with brush tree It is one-to-one for taking the number of address information.

In the embodiment of the present application, based on the brush tree acquisition metadata to be written that receives tree and belong in a cache tree Address information number, control and receive set from waiting list obtain corresponding number metadata to be written address information.In Brush tree controls and receives tree and continues to obtain from waiting list after the address information for obtaining metadata to be written in reception tree The address information of the metadata to be written of corresponding number, until the address letter in waiting list without retrievable metadata to be written Breath.It can be seen that brush tree is after obtaining the address information to the write-in metadata of corresponding number in reception tree, control in the application It receives tree and continues the address information for obtaining the metadata to be written of corresponding number from waiting list, thus, it is possible to realize in bulk Metadata is written in solid state hard disk, in other words, the metadata write operation of random fritter can be converted to continuous bulk Metadata write operation, thus significantly improve metadata write-in solid state hard disk efficiency, promote the number of full flash memory storage system According to treatment effeciency and performance.

Based on above-mentioned metadata storing method provided by the embodiments of the present application, the embodiment of the present application also correspondence provides one kind The structural schematic diagram of metadata storage device, as shown in figure 3, the device is suitable for full flash memory storage system, which includes:

Determination unit 100 is deposited in plate to be brushed queue for determining the plate to be brushed queue in default write buffer under brush catalogue Cache tree is contained, cache tree includes brush tree and receives tree, and brush tree and reception tree are B+ data tree structure.

Control unit 200 is set the address information for obtaining metadata to be written from waiting list for controlling and receiving, is waited For storing metadata write request, metadata write request includes the address information of metadata to be written for queue.

Writing unit 300, for controlling brush tree from the address information for obtaining metadata to be written in tree is received, according to ground Location information is written into metadata write-in solid state hard disk.

In the embodiment of the present application, the plate to be brushed queue in default write buffer under brush catalogue is determined, in plate to be brushed queue It is stored with cache tree, cache tree includes brush tree and receives tree, and brush tree and reception tree are B+ data tree structure.Control and receive tree The address information of metadata to be written is obtained from waiting list, waiting list is for storing metadata write request, metadata Write request includes the address information of metadata to be written.Control brush tree obtains the address of metadata to be written from receiving in tree Information is written into metadata write-in solid state hard disk according to address information.It can be seen that in the application, based on being brushed in default write buffer The cache tree stored in disk queue is realized the address information for obtaining metadata to be written from waiting list, and is believed according to address Breath is written into metadata write-in solid state hard disk, continuous thus, it is possible to be converted to the metadata write operation of random fritter The metadata write operation of bulk promotes full flash memory storage system to significantly improve the efficiency of metadata write-in solid state hard disk Data-handling efficiency and performance.

Optionally, as shown in figure 4, being the structural representation of another metadata storage device provided by the embodiments of the present application Figure, wherein determination unit 100 includes:

Module 101 is chosen, for choosing the memory space of preset range in non-power-failure protection memory, memory space is made To preset write buffer.

In the embodiment of the present application, metadata cache is in power down protection memory, because of the memory source of power down protection memory It is extremely limited.The memory space that preset range is chosen in non-power-failure protection memory, using memory space as default write buffer, energy The memory usage for enough improving power down protection memory, to promote the data-handling efficiency and performance of full flash memory storage system.

Optionally, as Fig. 5 shows, for the structural schematic diagram of another metadata storage device provided by the embodiments of the present application, Wherein, control unit 200 includes:

First control module 201, for based on the brush tree acquisition member to be written that receives tree and belong in a cache tree The address information number of data controls and receives the address letter for setting the metadata to be written that corresponding number is obtained from waiting list Breath.

Second control module 202, after obtaining the address information of metadata to be written in brush tree is set from reception, It controls and receives tree and continues the address information for obtaining the metadata to be written of corresponding number from waiting list, until in waiting list Address information without retrievable metadata to be written.

In the embodiment of the present application, based on the brush tree acquisition metadata to be written that receives tree and belong in a cache tree Address information number, control and receive set from waiting list obtain corresponding number metadata to be written address information.In Brush tree controls and receives tree and continues to obtain from waiting list after the address information for obtaining metadata to be written in reception tree The address information of the metadata to be written of corresponding number, until the address letter in waiting list without retrievable metadata to be written Breath.It can be seen that brush tree is after obtaining the address information to the write-in metadata of corresponding number in reception tree, control in the application It receives tree and continues the address information for obtaining the metadata to be written of corresponding number from waiting list, thus, it is possible to realize in bulk Metadata is written in solid state hard disk, in other words, the metadata write operation of random fritter can be converted to continuous bulk Metadata write operation, thus significantly improve metadata write-in solid state hard disk efficiency, promote the number of full flash memory storage system According to treatment effeciency and performance.

Optionally, as Fig. 6 shows, for the structural schematic diagram of another metadata storage device provided by the embodiments of the present application, Wherein, writing unit 300 includes:

Writing module 301 successively obtains the address information of metadata to be written for controlling brush tree from reception tree, and According to the address information got every time, solid state hard disk is written into the metadata to be written of corresponding address information, until receiving tree The middle address information that can not obtain metadata to be written.

In the embodiment of the present application, control brush tree successively obtains the address information of metadata to be written from reception tree, And according to the address information got every time, solid state hard disk is written into the metadata to be written of corresponding address information, until receiving The address information of metadata to be written can not be obtained in tree.It can be seen that in the application, based on being deposited in brush queue in default write buffer The cache tree of storage realizes the address information that metadata to be written is obtained from waiting list, and according to address information, is written into Metadata is written in solid state hard disk in bulk thus, it is possible to realize in metadata write-in solid state hard disk, in other words, can be incited somebody to action The metadata write operation of random fritter, is converted to the metadata write operation of continuous bulk, to significantly improve metadata The efficiency that solid state hard disk is written, promotes the data-handling efficiency and performance of full flash memory storage system.

Optionally, the embodiment of the present application also provides a kind of full flash memory storage systems, which includes above-mentioned Apply for the metadata storage device that embodiment provides.

Professional technician can be realized or use the application.Profession of the various modifications to these embodiments to this field It will be apparent for technical staff, the general principles defined herein can not depart from spirit herein or model In the case where enclosing, realize in other embodiments.Therefore, the application is not intended to be limited to the embodiments shown herein, And it is to fit to the widest scope consistent with the principles and novel features disclosed herein.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种命令队列控制方法、控制电路及地址映射设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类