CN106020726B - Method, equipment and the storage device of metadata is written - Google Patents
Method, equipment and the storage device of metadata is written Download PDFInfo
- Publication number
- CN106020726B CN106020726B CN201610344167.9A CN201610344167A CN106020726B CN 106020726 B CN106020726 B CN 106020726B CN 201610344167 A CN201610344167 A CN 201610344167A CN 106020726 B CN106020726 B CN 106020726B
- Authority
- CN
- China
- Prior art keywords
- metadata
- written
- attribute
- write
- storage medium
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention provides a kind of to be written to metadata from the first storage medium method in the second storage medium, equipment and the storage device that metadata is written.The described method includes: metadata to be written described in the attribute-bit based on metadata to be written;The metadata for meeting the first attribute is written using the first writing mode;And meet the metadata of the second attribute using the write-in of the second writing mode.
Description
Technical field
The present invention relates to the fields of metadata write-back, more particularly it relates to be written the method for metadata, equipment,
And storage device.
Background technique
Solid state hard disk (SSD) is the data storage device based on flash memory, has been obtained and is widely used.One in SSD
A significant components are flash translation layer (FTL) (FTL), are located in SSD controller, and being used for will be from the logical block address of host
(LBA) physical block address (PBA) being mapped as on hard disk.It is general to map FTL algorithm using based on second level for FTL, wherein
So-called " second level mapping " refers to the mapping of page grade and the mapping of cluster grade.
However, the quantity of mapping table will be very huge when using based on second level mapping FTL algorithm.At this point, if only existing
Metadata write-back is carried out when shutdown, it will influence shutdown speed, it is therefore desirable to first number is in time carried out in hard disk normal work
According to write-back.If carrying out metadata write-back, the speed that meeting blocked user data are write using obstruction mode;, whereas if with non-resistance
Plug mode write-back, then it is difficult to ensure that after power down data reconstruction consistency.
Summary of the invention
In view of the above, the present invention provides be written to metadata in the second storage medium from the first storage medium
Method, equipment and be written metadata storage device, writing speed and data consistency can be combined
Protection.
According to an aspect of the invention, there is provided a kind of be written to the second storage Jie from the first storage medium for metadata
Method in matter, comprising: metadata to be written described in the attribute-bit based on metadata to be written;It is write using the first writing mode
Enter to meet the metadata of the first attribute;And meet the metadata of the second attribute using the write-in of the second writing mode.
According to another aspect of the present invention, a kind of storage device that metadata is written is provided, comprising: storage unit is deposited
Store up metadata;Processing unit, metadata to be written described in the attribute-bit based on metadata to be written, using the first writing mode
The storage unit is written into the metadata for meeting the first attribute, and the member of the second attribute will be met using the second writing mode
The storage unit is written in data.
According to another aspect of the invention, provide it is a kind of by metadata from the first storage medium be written to the second storage be situated between
Equipment in matter, comprising: identify unit, metadata to be written described in the attribute-bit based on metadata to be written;First write-in
The metadata for meeting the first attribute is written using the first writing mode for unit;And second writing unit, using the second write-in side
Formula write-in meets the metadata of the second attribute.
The embodiment of the present invention the method for being written to metadata in the second storage medium from the first storage medium, set
In standby and write-in metadata storage device, different write-back modes is used by the metadata for different attribute, thus
The protection of writing speed and data consistency can be combined.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, making below by required in the description to embodiment
Attached drawing is briefly described.The accompanying drawings in the following description is only exemplary embodiment of the present invention.
Fig. 1, which is that diagram is according to an embodiment of the present invention, is written to metadata in the second storage medium from the first storage medium
Method flow chart;
Fig. 2 is the exemplary schematic diagram of state transformation for illustrating metadata write-back according to an embodiment of the present invention;
Fig. 3 is the schematic diagram for illustrating example mappings table and cluster table according to an embodiment of the present invention;
Fig. 4 is the configuration block diagram of the storage device of diagram write-in metadata according to another embodiment of the present invention;And
Fig. 5 is to illustrate metadata is written to the second storage from the first storage medium being situated between for another embodiment according to the present invention
The configuration block diagram of equipment in matter.
Specific embodiment
Hereinafter, by preferred embodiments of the present invention will be described in detail with reference to the annexed drawings.Note that in the specification and drawings
In, substantially the same step and element are denoted by the same reference numerals, and to the repetition of explanation of these steps and element
It will be omitted.
Firstly, describing according to an embodiment of the present invention metadata is written to second from the first storage medium to deposit referring to Fig.1
Method 10 in storage media.Fig. 1, which is that diagram is according to an embodiment of the present invention, is written to second from the first storage medium for metadata
The flow chart of method 10 in storage medium.
Here, the first storage medium is, for example, the volatile memory of RAM (random access memory) etc., and the second storage
Medium is, for example, the non-volatile memories of ROM (read-only memory), EPROM (Erasable Programmable Read Only Memory EPROM), SSD etc.
Device.More specifically, because " metadata write-back " mentioned in aforementioned background art refers to metadata from volatile memory
It is written in nonvolatile memory, therefore can also be used as the example of method 10 described here.
As shown in fig. 1, metadata is written to the second storage medium from the first storage medium in the embodiment of the present invention
In method 10 when starting, firstly, in step S101, metadata to be written described in the attribute-bit based on metadata to be written.
Specifically, the attribute of metadata to be written for example may include the data volume of metadata, level etc..For example, when to
When write-in metadata is mapping table, the data volume of mapping table is big, and level is low;When metadata to be written is cluster table, the number of cluster table
Lower than the data volume of mapping table according to measuring, level is higher than the level of mapping table;When metadata to be written is such as pointer, index
When other key metadatas, the data volume of this metadata is minimum, level highest.
According to these instance attributes of metadata to be written, the metadata to be written can be identified." mark described here
Knowledge ", which for example can be for some metadata to be identified as, meets the first attribute or the second attribute.It is also understood that according to different members
These metadata, can be divided into such as two classes by the respective attribute of data, and first kind metadata meets the first attribute, and second
Class metadata meets the second attribute.Thus, it is possible to which different processing is carried out to inhomogeneous metadata in the next steps.
More specifically, because the data volume of mapping table and cluster table is bigger for other key metadatas, and it
Level it is lower for other key metadatas, therefore mapping table and cluster table can be identified as satisfaction first belong to
Property, other key metadatas are identified as and meet the second attribute, that is to say, that by mapping table and cluster table sort are first kind member number
According to, and other key metadatas are classified as the second class metadata.
Then, in step S102, the metadata for meeting the first attribute is written using the first writing mode.
Specifically, the first writing mode for example can be non-blocking fashion.So-called " non-blocking fashion ", which refers to, to carry out
When metadata write-back, other movements of the user to the data write-in of the second storage medium etc. are not prevented.That is, passing through non-resistance
Write-back that plug mode carries out metadata can carry out simultaneously in parallel with user data write-in, can guarantee number of users in this way
According to the speed of write-in.
More specifically, as previously mentioned, the metadata for meeting the first attribute is, for example, mapping table and cluster table.Therefore, Ke Yi
Using non-blocking fashion write-in mapping table and cluster table in step S102.
Then, in step S103, the metadata for meeting the second attribute is written using the second writing mode.
Specifically, the second writing mode for example can be obstruction mode.So-called " obstruction mode ", which refers to, is carrying out first number
When according to write-back, other movements of the user to the data write-in of the second storage medium etc. are prevented.That is, by way of obstruction
When carrying out metadata write-back, there is no other data write activities.In this way, data will not be by more in metadata address period
Change, therefore can guarantee the consistency of data reconstruction after power down.
More specifically, as previously mentioned, the metadata for meeting the second attribute is, for example, its other than mapping table and cluster table
Its key metadata.Therefore, other key metadatas can be written using obstruction mode in step s 103.
On the one hand, because other key metadatas such as pointer, index are particularly important, that is, level is higher, institute
With in order to guarantee data consistency, these metadata cannot be modified during write-back, it is therefore desirable to be returned using obstruction mode
Write these metadata.In addition, it is contemplated that the data volume of these metadata is smaller, therefore their block type write-back process is very short,
So also can be very short to the blocking time of user data write-in, therefore user data writing speed will not be greatly affected.
On the other hand, compared with other key metadatas of such as pointer, index etc., the data volume of mapping table and cluster table compared with
Greatly, so if when using obstruction mode write-back mapping table and cluster table, the speed of user data write-in will receive larger impact, because
This is more suitable using non-blocking fashion write-back mapping table and cluster table.In addition, it is contemplated that the level of mapping table and cluster table is lower,
That is, it is important not as those described above key metadata, therefore, even if certain in mapping table during non-block type write-back
Data are changed by the write activity of user, will not cause to be modified such as above-mentioned key metadata caused by it is so serious after
Fruit.In addition, further step can also be taken as that will describe later herein to eliminate first number during non-block type write-back
According to being modified generated adverse effect.
After performing step S103, the method that metadata is written to from the first storage medium in the second storage medium
10 terminate.
It should be understood that the specific example of the attribute of the above-mentioned metadata to be written provided is of the invention only for the purposes of understanding, and
Not limit the invention to this.Similarly, the specific example of the above-mentioned metadata provided and the specific mark to metadata to be written
The citing of knowledge mode (that is, mode classification) does not also limit the invention.The religion that those skilled in the art provide in the application
On the basis of showing, its any suitable attribute can be based on to any possible metadata according to the actual situation, it is suitable to carry out
Mark, and then use suitable write-back mode.
In the method according to an embodiment of the present invention being written to metadata from the first storage medium in the second storage medium
In 10, different write-back modes is used by the metadata for different attribute, that is to say, that mutually tie using two kinds of write-back modes
It closes, so as to combine the protection of writing speed and data consistency.
Optionally, it is not seen in fig. 1, metadata is written from the first storage medium according to an embodiment of the present invention
Into the method 10 in the second storage medium, the attribute includes at least the priority of the metadata to be written, also, described
Step S101 may include following sub-step:
The priority of the metadata to be written is compared with reference to priority;And
If the priority of the metadata to be written refers to priority lower than described, by the metadata mark to be written
Know to meet the first attribute, otherwise the metadata to be written is identified as and meets the second attribute.
Specifically, as previously mentioned, the attribute of metadata to be written is not limited to the data volume of aforementioned illustration, level.Example
Such as, it is assumed here that the attribute includes at least the priority of metadata to be written.More specifically, priority for example can according to
Certain attributes (characteristic) such as data volume, level of metadata are written to determine.For example, according to the data volume size of mapping table
With level height, the priority of mapping table can be determined as 1;According to the data volume size and level of cluster table height, can incite somebody to action
The priority of cluster table is determined as 2;And according to the data volume size and level of other key metadatas height, these can be closed
The priority of key metadata is determined as 3.
Here, it may also be assumed that being equal to 3 with reference to priority, then by respectively by mapping table, cluster table and other crucial first numbers
According to priority with reference to compared with priority, the priority of available mapping table and cluster table is below with reference to priority, because
Mapping table and cluster table are identified as by this meets the first attribute, that is, as previously mentioned, being classified into first kind metadata.By
It is equal in the priority of other key metadatas and refers to priority, therefore they are identified as and meets the second attribute, that is, such as preceding institute
It states, is classified into the second class metadata.Thus, it is possible to respectively to the member of different identification in subsequent step S102 and S103
(write-back) is written using different writing modes in data.
It should be understood that priority given here is also only a kind of example of attribute, without limiting the invention.Together
Sample, the way of example described here for being identified (classification) to metadata to be written based on priority are not also constituted the present invention
Limitation.Those skilled in the art can according to the actual situation, based on other any suitable attributes come to metadata to be written into
Line identifier (classification), with their writing mode of determination.
Optionally, it is not seen in fig. 1, metadata is written from the first storage medium according to an embodiment of the present invention
Into the method 10 in the second storage medium, the metadata for meeting the first attribute includes the first metadata and second yuan
Data, and the metadata for meeting the second attribute includes third metadata, also, the step S102 may include as follows
Sub-step:
Copy out first metadata;
First metadata is written using the first writing mode;
Terminate the write-in of first metadata based on the first feedback from second storage medium;
Based on first metadata, second metadata is modified;
Modified second metadata is written using the first writing mode;And
Terminate the write-in of modified second metadata based on the second feedback from second storage medium.
Specifically, for ease of description, above-mentioned optional each sub-steps are described in detail below with reference to Fig. 2.Fig. 2 is diagram
The state of metadata write-back according to an embodiment of the present invention changes exemplary schematic diagram.
Specifically, hard disk in normal work, for example, metadata write-back can be triggered by certain strategy, and constantly to member
The update of data carries out increment type write-back.The schematic diagram of single metadata write-back is shown in Fig. 2.
As shown in Figure 2, when certain metadata write-back of system trigger, into the first metadata write-back state 2201.
In order to be more convenient for illustrating, it is assumed that the first metadata corresponds to the page of mapping table, more specifically, being, for example, to have updated reflecting for metadata
The page of firing table.At this point, coming out firstly the need of by these page copies for the mapping table for needing to be written, this is in order to prevent in non-obstruction
These pages are changed in real time during mode write-back.Then, using these pages in aforementioned non-blocking fashion write-back mapping table,
Until receiving the first feedback 2210 of the second storage medium from such as SSD, second yuan just is converted to from this state 2201
Write back data state 2202.
Here, the first feedback 2210 is, for example, to need the page of write-back successful by whole write-backs from SSD feedback mapping table
Feedback, that is, passing through this first feedback 2210 triggering states transformation.More specifically, for example, write-back can will be needed in mapping table
The number of pages of page be sent to SSD, SSD when the number of pages of the page of the completion write-back counted is equal to the number of pages of page for needing write-back,
Then send first feedback 2210.Alternatively, the number of pages of the page of write-back can also be sent completely by SSD, when the need for being sent to SSD
When wanting the number of pages of the page of write-back equal with the completion number of pages of page of write-back that SSD is sent back, judge that the write-back of mapping table is completed, this
When, the first feedback 2210 corresponds to the number of pages of the page of the completion write-back equal with the number of pages for the page for needing write-back.It should be understood that first
Feedback 2210 is not limited to the sample situation enumerated here, and those skilled in the art can design the first feedback according to the actual situation
2210 any suitable implementation.
After the first metadata (for example, page of mapping table) completes write-back, that is, be converted to state from state 2201
2202, carry out the write-back of the second metadata.Specifically, let it be assumed, for the purpose of illustration, that the second metadata corresponds to cluster table.Because of cluster
The physical address of the page of mapping table is had recorded in table, therefore, when the page of mapping table updates, needs accordingly to modify cluster table
In respective items.Then, after corresponding modification, write-back is carried out to modified cluster table using aforementioned non-blocking fashion.Such as Fig. 2
Shown in, similarly with state 2201, the second feedback 2220 until receiving the second storage medium from such as SSD,
Third metadata write-back state 2203 is converted to from state 2202.With first feedback 2210 similarly, second feedback 2220 indicate
All pages of write-backs success of cluster table, that is, passing through this second feedback 2220 triggering states transformation.
In state 2203, the write-back of obstruction mode is carried out to the third metadata of for example aforementioned other key metadatas.
Also, after completing third metadata write-back, this metadata write-back terminates, and waits the touching of metadata write-back next time
Hair.
In order to be even further appreciated that the present invention, illustrate by taking mapping table and cluster table as an example below with reference to Fig. 3 above-mentioned each optional
The application example of sub-step.Fig. 3 is the schematic diagram for illustrating example mappings table and cluster table according to an embodiment of the present invention.
Fig. 3 (A) shows exemplary map table 301.Write-in data are had recorded in mapping table 301 in preceding 8 column, the 9th column refer to
Show the logical page number (LPN) of mapping table, the data on the left of the every row of mapping table 301 indicate the corresponding physical address of mapping table page.Fig. 3 (B) shows
Exemplary cluster table 302 corresponding with the exemplary map table 301 in Fig. 3 (A) is gone out.Cluster table 302 is for recording mapping table 301
The physical address of page, shown in the left side two in the cluster table 302 as shown in Fig. 3 (B) arranges.Wherein respectively illustrated above each column
The corresponding logical page number (LPN) of the physical address of each column.
Specifically, it is assumed that write-in data 200-215 for the first time then generates mapping table and is placed in physical address 100-101, such as
Shown by front two row in mapping table 301 shown in Fig. 3 (A).Wherein, the first row corresponds to logical page number (LPN) " vlpn0 ", and second
Row corresponds to logical page number (LPN) " vlpn1 ".That is, for this write-in, logical page number (LPN) " vlpn0 " corresponds to physical address
100, correspond to write-in data 200-207 (that is, the first row of table 301), logical page number (LPN) " vlpn1 " corresponds to physical address
101, correspond to write-in data 208-215 (that is, second row of table 301).It is written accordingly for this data, cluster table 302
Accordingly record the physical address 100 of the page of mapping table 301 with logical page number (LPN) " vlpn0 " and " vlpn1 " respectively in the first row
With 101.
Assuming that second of write-in is to rewrite an other page.For example, the third line institute in the mapping table 301 as shown in Fig. 3 (A)
Show, data 212 is rewritten as 216, and data 214 are rewritten as 217.It this time rewrites and only relates to logical page number (LPN) " vlpn1 ", and
It is not related to logical page number (LPN) " vlpn0 ", and " vlpn1 " after rewriting corresponds to physical address 102.Therefore, correspondingly, in Fig. 3
(B) in the second row in cluster table 302 shown in, the physical address corresponding to logical page number (LPN) " vlpn0 " is remained unchanged, that is, still
It is 100, and corresponds to recording physical address 102 again logical page number (LPN) " vlpn1 ".
Further, it is assumed that third time write-in is to be rewritten as 219 for 210 and be rewritten as 218 for 211, as shown in Fig. 3 (A)
Mapping table 301 in shown in fourth line.It this time rewrites and still only relates to logical page number (LPN) " vlpn1 ", without regard to logical page number (LPN)
" vlpn0 ", and " vlpn1 " after rewriting corresponds to physical address 103.Therefore, correspondingly, the cluster table shown in Fig. 3 (B)
In the third line in 302, the physical address corresponding to logical page number (LPN) " vlpn0 " is remained unchanged, that is, is still 100, and is corresponded to and patrol
Collect recording physical address 103 again page number " vlpn1 ".
The corresponding relationship between mapping table and cluster table is described in detail above with reference to Fig. 3.For it is above-mentioned be written three times it is every
It is secondary, metadata write-back can be triggered as shown in Figure 2, i.e., metadata involved in mapping table 301 is changed in state 2201
Page carry out non-obstruction write-back, and cluster table 302 is correspondingly modified based on the change in mapping table 301 in state 2202,
And non-obstruction write-back is carried out to modified cluster table 302, which is not described herein again.
It should be understood that the setting of mapping table shown in Fig. 3 and cluster table is only a kind of sample situation, without to structure of the present invention
At limitation.Those skilled in the art can use the set-up mode of any suitable mapping table and cluster table.
Still optionally further, it is not seen in fig. 1, it is according to an embodiment of the present invention by metadata from the first storage medium
The method 10 being written in the second storage medium can be comprising steps of be written in using the second writing mode using the first write-in
The item changed in the first metadata during the first metadata and the second metadata is written in mode.
Specifically, in order to make it easy to understand, still corresponding to mapping table and the second metadata with the first metadata corresponds to cluster table
For be illustrated.As previously mentioned, first copy out mapping table when carrying out write-back to mapping table, it is then right again
Mapping table and the cluster table of corresponding modification carry out non-obstruction write-back.The mapping table of institute's write-back and cluster table correspond to non-block back as a result,
Write the state before process.However, during non-obstruction write-back, since user data write-in is not prevented, mapping table
In metadata possibly through the read-write operation of hard disk and by real time modifying, so as to cause corresponding other key metadatas
By real time modifying.For example, then the physical address of the page of mapping table can occur in case of situation is rewritten as shown in Figure 3
Modification, so that the vcount value as key metadata is also modified, is carried out the pass of write-back by obstruction mode in this way
Key metadata is modified key metadata.That is, the map information of the page in the mapping table of institute's write-back and institute's write-back
Key metadata can exist it is inconsistent.In this case, when hard disk normal shutdown, these are inconsistent not will cause it is any
It influences, however, if hard disk occurs the abnormal shutdown of power-off etc. suddenly and needs the one of more accurate guarantee metadata and data
When cause property, then need to restore by above-mentioned optional step.
Start to carry out mapping table non-block type time to be stored in preparation for example, one can be increased in key metadata
It writes and starts to carry out between block type write-back key metadata (that is, carrying out the non-block type write-back phase to mapping table and cluster table
Between) part modified in mapping table, also, in block type write-back key metadata, this increased of institute is hindered together
Plug write-back.In this way, if normal shutdown, it can be when restoring, using the mapping table modification item of metadata record, to load
The item of the mapping table of metadata recovers corresponding mapping table version.
By above-mentioned optional step, data caused by abnormal power down condition can be further prevented inconsistent.
Optionally, it is not seen in fig. 1, metadata is written from the first storage medium according to an embodiment of the present invention
It, can be comprising steps of being chosen based on Selection Strategy before the step S101 into the method 10 in the second storage medium
The metadata to be written.
Specifically, increment writeback policies can be used, that is to say, that only choose the page progress for changing (update) in mapping table
Write-back, rather than write-back is carried out to whole pages, so as to reduce write-back amount, mitigate system burden.
It should be understood that above-mentioned increment writeback policies are just to for example, the invention is not limited thereto.Those skilled in the art
Any suitable Selection Strategy can be taken to choose metadata to be written according to the actual situation.
Still optionally further, it is not seen in fig. 1, metadata is situated between from the first storage according to an embodiment of the present invention
Matter is written in the method 10 in the second storage medium, above-mentioned based on the metadata that be written described in Selection Strategy selection
Optional step before, can with comprising steps of based on write-in policy triggering metadata write-in.
Specifically, as shown in Figure 2, when triggering write-back, the write-back of each metadata is carried out.For example, write-in policy can
To be when metadata is updated (change).However, it should be understood that the invention is not limited thereto, those skilled in the art can be with
According to the actual situation, any suitable write-in policy is taken to trigger metadata write-in.
Optionally, it is not seen in fig. 1, metadata is written from the first storage medium according to an embodiment of the present invention
Into the method 10 in the second storage medium, first writing mode can be non-blocking fashion, and described second is written
Mode can be obstruction mode.Due to having been illustrated for non-blocking fashion and obstruction mode both write-back modes above
Detail, therefore which is not described herein again.
Optionally, it is not seen in fig. 1, according to an embodiment of the present invention be written to metadata from the first storage medium
Method 10 in second storage medium can map FTL algorithm based on second level.Specifically, for example, as previously mentioned, example can be used
Mapping table and cluster table as shown in Figure 3 combine the mode of mapping.
Metadata is written to from the first storage medium above by reference to what Fig. 1-3 described one embodiment of the present of invention
Method 10 in two storage mediums.In the method 10, different write-back sides is used by the metadata for different attribute
Formula, that is to say, that combined using two kinds of write-back modes, so as to combine writing speed and data consistency
Protection.
The storage device 40 of write-in metadata according to another embodiment of the present invention is described next, with reference to Fig. 4.Fig. 4 is
Illustrate the configuration block diagram of the storage device 40 of write-in metadata according to another embodiment of the present invention.Here, the storage device
40 for example can be the nonvolatile memory of such as SSD.
As shown in figure 4, the storage device 40 of write-in metadata according to an embodiment of the present invention may include storage unit 410
With processing unit 420.
Storage unit 410 stores metadata.It is to be written described in attribute-bit of the processing unit 420 based on metadata to be written
The metadata for meeting the first attribute is written the storage unit 410 using the first writing mode, and uses second by metadata
The storage unit 410 is written in the metadata for meeting the second attribute by writing mode.
Optionally, the attribute includes at least the priority of the metadata to be written.Also, the processing unit 420
Also: the priority of the metadata to be written is compared with reference to priority;And if the metadata to be written it is excellent
First grade refers to priority lower than described, then is identified as the metadata to be written and meets the first attribute, otherwise will be described to be written
Enter metadata and is identified as the second attribute of satisfaction.
Optionally, the metadata for meeting the first attribute includes the first metadata and the second metadata, and described
The metadata for meeting the second attribute includes third metadata.Also, the processing unit 420 is also: copying out first yuan of number
According to;First metadata is written by the storage unit 410 using the first writing mode;Based on from the storage unit
First feedback, terminates the write-in of first metadata;Based on first metadata, second metadata is modified;Using
The storage unit 410 is written in modified second metadata by the first writing mode;And based on from the storage unit
Second feedback, terminate the write-in of modified second metadata.
Still optionally further, the processing unit 420 is gone back: will be write using the first writing mode using the second writing mode
The storage unit 410 is written in the item changed in the first metadata during entering the first metadata and the second metadata.
Optionally, described in the attribute-bit based on metadata to be written before metadata to be written, the processing
Unit 420 is gone back: based on the metadata that be written described in Selection Strategy selection.
Still optionally further, before the metadata that be written described in chosen based on Selection Strategy, the processing is single
Member 420 is gone back: based on write-in policy triggering metadata write-in.
Optionally, first writing mode is non-blocking fashion, and second writing mode is obstruction mode.
Optionally, the processing unit 420 is based on second level mapping FTL algorithm.
The storage device 40 of the write-in metadata of one embodiment of the present of invention is described above by reference to Fig. 4.It is deposited described
In storage device 40, different write-back modes is used by the metadata for different attribute, that is to say, that use two kinds of write-back sides
Formula combines, so as to combine the protection of writing speed and data consistency.
Next, with reference to Fig. 5 description, metadata is written to by another embodiment from the first storage medium according to the present invention
Equipment 50 in second storage medium.Fig. 5 be illustrate another embodiment according to the present invention by metadata from the first storage medium
It is written to the configuration block diagram of the equipment 50 in the second storage medium.Here, as previously mentioned, the first storage medium is, for example, RAM etc.
Volatile memory, and the second storage medium is, for example, the nonvolatile memory of ROM, EPROM, SSD etc..
As shown in Figure 5, according to an embodiment of the present invention that metadata is written to the second storage Jie from the first storage medium
Equipment 50 in matter may include mark unit 510, the first writing unit 520 and the second writing unit 530.
Identify metadata to be written described in attribute-bit of the unit 510 based on metadata to be written.First writing unit 520
The metadata for meeting the first attribute is written using the first writing mode.Also, the second writing unit 530 uses the second writing mode
Write-in meets the metadata of the second attribute.
The configuration of each unit that metadata is written to the equipment 50 in the second storage medium from the first storage medium
With concrete operations are according to an embodiment of the present invention described in referring to Fig.1-3 is written to metadata from the first storage medium
It is described in detail in method 10 in second storage medium, is not repeated herein.
More than, it -5 describes referring to Fig.1 and according to an embodiment of the present invention metadata is written to from the first storage medium
The storage device of method, equipment and write-in metadata in two storage mediums.
It should be noted that in the present specification, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Finally, it is to be noted that, it is above-mentioned it is a series of processing not only include with sequence described here in temporal sequence
The processing of execution, and the processing including executing parallel or respectively rather than in chronological order.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can be by
Software adds the mode of required hardware platform to realize, naturally it is also possible to all be implemented by hardware.Based on this understanding,
Technical solution of the present invention can be embodied in the form of software products in whole or in part to what background technique contributed,
The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make
It obtains a computer equipment (can be personal computer, server or the network equipment etc.) and executes each embodiment of the present invention
Or method described in certain parts of embodiment.
In embodiments of the present invention, units/modules can use software realization, to be executed by various types of processors.
For example, the executable code module of a mark may include the one or more physics or logic of computer instruction
Block, for example, it can be built as object, process or function.Nevertheless, the executable code of institute's mark module is not necessarily to
It is physically located together, but may include the different instructions being stored in different positions, combined when in these command logics
When together, Component units/module and the regulation purpose for realizing the units/modules.
When units/modules can use software realization, it is contemplated that the level of existing hardware technique, it is possible to software
The units/modules of realization, without considering the cost, those skilled in the art can build corresponding hardware circuit
Realize corresponding function, the hardware circuit includes conventional ultra-large integrated (VLSI) circuit or gate array and such as
The existing semiconductor of logic chip, transistor etc either other discrete elements.Module can also be set with programmable hardware
Standby, field programmable gate array, programmable logic array, programmable logic device etc. are realized.
The present invention is described in detail above, specific case used herein is to the principle of the present invention and embodiment party
Formula is expounded, and the above description of the embodiment is only used to help understand the method for the present invention and its core ideas;Meanwhile it is right
In those of ordinary skill in the art, according to the thought of the present invention, change is had in specific embodiments and applications
Place, in conclusion the contents of this specification are not to be construed as limiting the invention.
Claims (15)
1. a kind of method for being written to metadata in the second storage medium from the first storage medium, comprising:
Metadata to be written described in attribute-bit based on metadata to be written;
The metadata for meeting the first attribute is written using the first writing mode;And
The metadata for meeting the second attribute is written using the second writing mode,
Wherein, first writing mode is non-blocking fashion, and second writing mode is obstruction mode, non-obstruction side
Formula is the other data write-in not prevented when writing metadata into the second storage medium to the second storage medium, and obstruction mode is
It prevents that other data of the second storage medium are written when writing metadata into the second storage medium.
2. the method for claim 1, wherein the attribute includes at least the priority of the metadata to be written, and
And
Wherein, metadata to be written described in the attribute-bit based on metadata to be written includes:
The priority of the metadata to be written is compared with reference to priority;And
If the priority of the metadata to be written refers to priority lower than described, the metadata to be written is identified as
Meet the first attribute, otherwise the metadata to be written is identified as and meets the second attribute.
3. the method for claim 1, wherein it is described meet the first attribute metadata include the first metadata and
Second metadata, and the metadata for meeting the second attribute includes third metadata, and
Wherein, the metadata for meeting the first attribute using the write-in of the first writing mode includes:
Copy out first metadata;
First metadata is written using the first writing mode;
Terminate the write-in of first metadata based on the first feedback from second storage medium;
Based on first metadata, second metadata is modified;
Modified second metadata is written using the first writing mode;And
Terminate the write-in of modified second metadata based on the second feedback from second storage medium.
4. method as claimed in claim 3, further includes:
It is written in using the second writing mode using first during the first writing mode the first metadata of write-in and the second metadata
The item changed in metadata.
5. the method as described in claim 1, the metadata to be written described in the attribute-bit based on metadata to be written
Before, further includes:
Based on the metadata that be written described in Selection Strategy selection.
6. method as claimed in claim 5, before the metadata that be written described in chosen based on Selection Strategy, also wrap
It includes:
Based on write-in policy triggering metadata write-in.
7. the method for claim 1, wherein the method is based on second level mapping FTL algorithm.
8. a kind of storage device that metadata is written, comprising:
Storage unit stores metadata;
Processing unit, metadata to be written described in the attribute-bit based on metadata to be written, will be expired using the first writing mode
The storage unit is written in the metadata of the first attribute of foot, and will meet the metadata of the second attribute using the second writing mode
The storage unit is written,
Wherein, first writing mode is non-blocking fashion, and second writing mode is obstruction mode, non-obstruction side
Formula is the other data write-in not prevented when writing metadata into storage unit to storage unit, and obstruction mode is by metadata
It prevents that other data of storage unit are written when being written to storage unit.
9. storage device as claimed in claim 8, wherein the attribute includes at least the preferential of the metadata to be written
Grade, and
Wherein, the processing unit is also:
The priority of the metadata to be written is compared with reference to priority;And
If the priority of the metadata to be written refers to priority lower than described, the metadata to be written is identified as
Meet the first attribute, otherwise the metadata to be written is identified as and meets the second attribute.
10. storage device as claimed in claim 8, wherein it is described meet the first attribute metadata include the first metadata,
And second metadata, and the metadata for meeting the second attribute includes third metadata, and
Wherein, the processing unit is also:
Copy out first metadata;
First metadata is written by the storage unit using the first writing mode;
Based on the first feedback from the storage unit, terminate the write-in of first metadata;
Based on first metadata, second metadata is modified;
Modified second metadata is written by the storage unit using the first writing mode;And
Based on the second feedback from the storage unit, terminate the write-in of modified second metadata.
11. storage device as claimed in claim 10, wherein the processing unit also:
It will be first yuan during the first metadata and the second metadata be written using the first writing mode using the second writing mode
The storage unit is written in the item changed in data.
12. storage device as claimed in claim 8, wherein described in the attribute-bit based on metadata to be written to
Be written metadata before, the processing unit also:
Based on the metadata that be written described in Selection Strategy selection.
13. storage device as claimed in claim 12, wherein the first number that be written described in chosen based on Selection Strategy
According to before, the processing unit also:
Based on write-in policy triggering metadata write-in.
14. storage device as claimed in claim 8, wherein the processing unit is based on second level and maps FTL algorithm.
15. a kind of equipment for being written to metadata in the second storage medium from the first storage medium, comprising:
Identify unit, metadata to be written described in the attribute-bit based on metadata to be written;
The metadata for meeting the first attribute is written using the first writing mode for first writing unit;And
The metadata for meeting the second attribute is written using the second writing mode for second writing unit,
Wherein, first writing mode is non-blocking fashion, and second writing mode is obstruction mode, non-obstruction side
Formula is the other data write-in not prevented when writing metadata into the second storage medium to the second storage medium, and obstruction mode is
It prevents that other data of the second storage medium are written when writing metadata into the second storage medium.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610344167.9A CN106020726B (en) | 2016-05-23 | 2016-05-23 | Method, equipment and the storage device of metadata is written |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610344167.9A CN106020726B (en) | 2016-05-23 | 2016-05-23 | Method, equipment and the storage device of metadata is written |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106020726A CN106020726A (en) | 2016-10-12 |
CN106020726B true CN106020726B (en) | 2019-11-26 |
Family
ID=57096044
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610344167.9A Active CN106020726B (en) | 2016-05-23 | 2016-05-23 | Method, equipment and the storage device of metadata is written |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106020726B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108829354A (en) * | 2018-06-21 | 2018-11-16 | 郑州云海信息技术有限公司 | A kind of solid-state hard disk SSD management method and SSD |
CN111190550B (en) * | 2019-12-31 | 2024-03-29 | 深圳市安云信息科技有限公司 | Metadata acceleration method and device and storage equipment |
CN113360079A (en) * | 2020-03-05 | 2021-09-07 | 努比亚技术有限公司 | Disk data writing method, terminal and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103207883A (en) * | 2012-01-12 | 2013-07-17 | Lsi公司 | Method For Metadata Persistence |
CN104541253A (en) * | 2012-09-26 | 2015-04-22 | 英特尔公司 | Techniques associated with protecting system critical data written to non-volatile memory |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8402205B2 (en) * | 2010-03-18 | 2013-03-19 | Seagate Technology Llc | Multi-tiered metadata scheme for a data storage array |
-
2016
- 2016-05-23 CN CN201610344167.9A patent/CN106020726B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103207883A (en) * | 2012-01-12 | 2013-07-17 | Lsi公司 | Method For Metadata Persistence |
CN104541253A (en) * | 2012-09-26 | 2015-04-22 | 英特尔公司 | Techniques associated with protecting system critical data written to non-volatile memory |
Also Published As
Publication number | Publication date |
---|---|
CN106020726A (en) | 2016-10-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8463826B2 (en) | Incremental garbage collection for non-volatile memories | |
US10445005B2 (en) | Memory system and operating method thereof | |
CN104756088B (en) | Flexible wear management for nonvolatile memory | |
US20130151759A1 (en) | Storage device and operating method eliminating duplicate data storage | |
CN105683953B (en) | Support the data storage device of acceleration database manipulation | |
CN103999161A (en) | Apparatus and method for phase change memory drift management | |
CN110347332A (en) | Garbage collection strategy for storage system and the method that executes the garbage collection | |
CN109710587A (en) | Data hierarchy method, system, equipment and medium based on Ceph | |
KR20100107453A (en) | Storage sub-system for a computer comprising write-once memory devices and write-many memory devices and related method | |
CN109799950A (en) | The adaptive management of intermediate storage | |
CN106020726B (en) | Method, equipment and the storage device of metadata is written | |
CN109558338A (en) | Dynamic page distribution in memory | |
US10861572B2 (en) | Memory device | |
CN107402719B (en) | Data storage method and data recovery method for data storage device, and data storage device using the same | |
CN107003863A (en) | Guide on-chip system device | |
US20180129557A1 (en) | System and methodology for error management within a shared non-volatile memory architecture using bloom filters | |
TWI388986B (en) | Flash memory apparatus and method for operating a flash memory apparatus | |
Chen et al. | Hiflash: A history independent flash device | |
CN108762989A (en) | Date storage method, device, equipment and the readable storage medium storing program for executing of solid state disk | |
TWI670640B (en) | Data storage method and data recovery method for data storage device, and data storage device using the same methods | |
US10474582B2 (en) | NAND flash storage device and methods using non-NAND storage cache | |
CN103210389B (en) | A kind for the treatment of method and apparatus of metadata | |
CN109753237A (en) | Calculate equipment and non-volatile dual inline memory modules | |
CN107193947A (en) | A kind of file system cache incremental refreshment method and system | |
US8977814B1 (en) | Information lifecycle management for binding content |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |