CN104731527B - A kind of three band state transition methods - Google Patents

A kind of three band state transition methods Download PDF

Info

Publication number
CN104731527B
CN104731527B CN201510115469.4A CN201510115469A CN104731527B CN 104731527 B CN104731527 B CN 104731527B CN 201510115469 A CN201510115469 A CN 201510115469A CN 104731527 B CN104731527 B CN 104731527B
Authority
CN
China
Prior art keywords
band
correcting
eleting codes
mirror image
pillar location
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.)
Expired - Fee Related
Application number
CN201510115469.4A
Other languages
Chinese (zh)
Other versions
CN104731527A (en
Inventor
刘国良
董欢庆
刘振军
蔡杰明
张军伟
刘浏
马留英
刘健
杨琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Zhongke Bluewhale Information Technology Co ltd
Institute of Computing Technology of CAS
Original Assignee
Tianjin Zhongke Bluewhale Information Technology Co ltd
Institute of Computing Technology of CAS
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 Tianjin Zhongke Bluewhale Information Technology Co ltd, Institute of Computing Technology of CAS filed Critical Tianjin Zhongke Bluewhale Information Technology Co ltd
Priority to CN201510115469.4A priority Critical patent/CN104731527B/en
Publication of CN104731527A publication Critical patent/CN104731527A/en
Application granted granted Critical
Publication of CN104731527B publication Critical patent/CN104731527B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of three band state transition methods, including:Three band states are changed, wherein three band states are used to indicate current logic strip and its position relationship;And which data block on correcting and eleting codes pillar location and mirror image pillar location after the instruction change of correcting and eleting codes bitmap is made to constitute correcting and eleting codes band.Present invention reduces overheads caused by Data Migration, improve the performance of three strap systems.

Description

A kind of three band state transition methods
Technical field
The present invention relates to technical field of memory, more particularly, to striping technical field of memory.
Background technology
Three banding techniques refer to each band for logical layer, and internal realize is made of three logic strips, uses If in solving during small write performance present in traditional RAID technique is too low and data writing process caused by failure data not Consensus (write hole problems).Referring to Fig. 1, three logic strips are respectively M bands, RS bands and N bands, wherein:
1, M bands (mirror image band):The data that this takes are protected using copy mechanism.Mirror image band is for storing Small letter data, to promote the performance of reading and writing data;In addition, the write-in of mirror image band does not cover the data that correcting and eleting codes item takes, Therefore avoid in ablation process that data are inconsistent caused by node failure.When the small letter of mirror image band runs up to full item When band or system startup mirror image item take the conversion of correcting and eleting codes band to vacate mirror image band the space occupied, mirror image band meeting It is converted to correcting and eleting codes band.
2, RS bands (correcting and eleting codes band):The data that this takes are protected using Reed-Solomon encoding mechanisms.
3, N bands (hollow bar band):The band of data is not stored.Of short duration storage place when hollow bar band is full band write-in, Its state is immediately transferred to correcting and eleting codes band after writing complete.The presence of hollow bar band makes data write-in not cover original mirror image band The data taken with correcting and eleting codes item, it is ensured that be not in the inconsistent problem of data.
In addition, in order to ensure the data that mirror image item takes have the protection level for being not less than the data that correcting and eleting codes item takes, The copy corresponding to data that mirror image item takes is stored on the vertical bar band (or replica node) where the check block of the band.
Although having above-mentioned advantage, existing three strap system does not refer to the concrete mode of state conversion, such as Fruit migrates using by the valid data of a band to by the way of another band, then due to occupying additional data bandwidth and CPU Time, so as to cause performance less efficient, and then that three strap systems can be influenced.
Invention content
To solve the above problems, according to one embodiment of present invention, providing a kind of three band state transition methods, packet It includes:
Three band states are changed, wherein three band states are used to indicate current logic strip and its position relationship;And Which data block on correcting and eleting codes pillar location and mirror image pillar location after the instruction change of correcting and eleting codes bitmap is set to constitute correcting and eleting codes Band.
In the above method, the data block for constituting correcting and eleting codes band, the correcting and eleting codes pillar location after change and mirror image item are removed Mirror image band is constituted with other data blocks on position.
In the above method, when execution mirror image item takes the conversion of correcting and eleting codes band to:
Exchange mirror image pillar location and correcting and eleting codes pillar location;And the correcting and eleting codes after making the instruction of correcting and eleting codes bitmap exchange Which data block on pillar location and mirror image pillar location constitutes correcting and eleting codes band.
In the above method, with the data block on 1 corresponding correcting and eleting codes pillar location in the correcting and eleting codes bitmap, Yi Jiyu Data block on 0 corresponding mirror image pillar location in the correcting and eleting codes bitmap constitutes correcting and eleting codes band.
In the above method, before so that the correcting and eleting codes bitmap is indicated which data block constitutes correcting and eleting codes band, also obtain Mirror image item before exchange takes the data of write-in, calculates verification and the mirror image band before exchanging is written in the verification.
In the above method, when the hollow bar band of full band write-in is transformed into correcting and eleting codes band:
Empty pillar location is changed to correcting and eleting codes pillar location, and make another two position be respectively mirror image pillar location and Empty pillar location;And the data block on the correcting and eleting codes pillar location after the instruction change of correcting and eleting codes bitmap is made to constitute correcting and eleting codes item Band.
In the above method, the three bands state includes:
Correcting and eleting codes pillar location is first position, mirror image pillar location is the second position and empty pillar location is third position It sets;
Mirror image pillar location is first position, correcting and eleting codes pillar location is the second position and empty pillar location is third position It sets;
Empty pillar location is first position, mirror image pillar location is the second position and correcting and eleting codes pillar location is third position It sets;And
Empty pillar location is first position, correcting and eleting codes pillar location is the second position and mirror image pillar location is third position It sets.
In the above method, the three bands state is indicated using the bitmap of 2bit.
Three bands state transition method provided by the invention only changes three band states and correcting and eleting codes bitmap, can be achieved with nothing The conversion operation that Data Migration, no data cover, reduces overhead caused by Data Migration, improves three strap systems Performance.
Description of the drawings
Embodiments of the present invention is further illustrated referring to the drawings, wherein:
Fig. 1 is the schematic diagram of three ribbon structures;
Fig. 2 is the flow chart of three bands state transition method according to an embodiment of the invention;
Fig. 3 is the schematic diagram of three bands State Transformer according to an embodiment of the invention;
Fig. 4 (a) and 4 (b) are the schematic diagrames of mirror image stripe write operation according to an embodiment of the invention;
Fig. 5 (a) -5 (c) is the schematic diagram that mirror image band according to an embodiment of the invention is transformed into correcting and eleting codes band;
Fig. 6 (a) -6 (c) is the signal that mirror image band in accordance with another embodiment of the present invention is transformed into correcting and eleting codes band Figure.
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, pass through below in conjunction with attached drawing specific real Applying example, the present invention is described in more detail.It should be appreciated that described herein, specific examples are only used to explain the present invention, and It is not used in the restriction present invention.
According to one embodiment of present invention, a kind of three band state transition methods are provided.
Generally, this method includes:Three band states are changed, wherein three band states are used to indicate current logic item Band and its position relationship;And make on correcting and eleting codes pillar location and mirror image pillar location after the instruction change of correcting and eleting codes bitmap Which data block constitutes correcting and eleting codes band.
The three bands state transition method is described in detail in conjunction with Fig. 2, it should be noted that the method described in specification Each step be not necessarily necessary, but one or more of steps can be omitted or substituted according to practical situation Suddenly, and its sequence is also to change.
The first step:Change three band states
Three band states be used to indicate when include in first three band any three logic strips and these three logic strips it Between position relationship.Herein, the number of three pillar locations is denoted as C, B, A, by taking three ribbon structure shown in FIG. 1 as an example, position C In bottom, position B in intermediate and position A topmost, three band states in Fig. 1 are represented by RS M N, and instruction, which is entangled, deletes Code (RS) pillar location is in position C, mirror image (M) pillar location in position B, and empty (N) pillar location is in position A.It should be understood that this Logic strip position in text is not equal to logic strip.
According to the principle of three banding techniques, due at most only allowing there is effective entangles to delete in three band of synchronization Code-bar band at most only allows have a mirror image band and at least a hollow bar band, then considers synchronization in different location The logic strip combination being likely to occur, can be obtained 14 three band states as shown in Table 1, wherein the last one state ERR Indicate that band is unavailable.
Table 1
If indicating above-mentioned three bands state in the form of a bitmap, at least need to be indicated with 4 positions (bit).
In one embodiment, in the case where not considering state ERR, the state set of above-mentioned table 1 can be simplified, Only all states are represented with four states.That is, the bitmap using 2bit can indicate all three bands states.
Specifically, for position C B A, this four states are respectively RS M N, M RS N, N RS M and N M RS. Simplify for this four states the reason of it is as follows:
For the reset condition N N N of table 1, the data on every logic strip are 0, due to data be 0 when It is also 0 that it, which is verified, therefore N N N can be expressed as to other states, such as N N RS.For state RS M N, if Mirror-write is carried out respectively to three bands in this state, mirror image band is transformed into correcting and eleting codes band, and full correcting and eleting codes band is write (the hollow bar band for expiring band write-in is transformed into correcting and eleting codes band) three kinds of operations, then according to the principle of three banding techniques, these three Operation can accordingly lead to three kinds of following states:RS M N, M RS N and N N RS.Wherein, (i.e. empty for there are two N Pillar location) state N N RS, due to data all be 0 when, hollow bar band and mirror image band are of equal value, therefore can be by N N RS are denoted as M N RS or N M RS.In one embodiment, state N M RS can be used to indicate state N N RS;Another In one embodiment, can also adoption status M N RS indicate state N N RS, it should be noted that following embodiment is equal Using the RS three band state representations adjacent with M.Similarly, other states in table 1 (removing ERR) can be expressed as this four One kind in kind state.
Therefore, the bitmap of 2bit can be fully described that three bands are write in full correcting and eleting codes band or mirror image band is transformed into and entangles The band state transfer problem being related to when code-bar band is deleted, as shown in table 2.
Table 2
In other examples, the bitmap of n (n is more than 2 positive integer) a bit can also be used as three ribbons State bitmap, wherein with three current band states of 2 bit instructions, remaining n-2 bit can reserve for other use.
Based on above-mentioned four kinds of state RS M N, M RS N, N M RS and N RS M, Fig. 3, which is shown, is executing mirror-write, mirror After slice band is transformed into correcting and eleting codes band, or full correcting and eleting codes stripe write operation, which kind of state is these four states be transformed into respectively. As shown in figure 3, wherein+M indicates that mirror image stripe write operation ,+MF indicate that mirror image band is transformed into correcting and eleting codes band, and+RS is indicated The write operation of full correcting and eleting codes band, can be initially any one state.For example, if executing mirror at state RS M N Slice takes the conversion of correcting and eleting codes band to, then Status Change is that M RS N (take turning for correcting and eleting codes band in execution mirror image item When changing, mirror image pillar location and correcting and eleting codes pillar location are exchanged), three band state bitmaps become 01 (referring to table 2) from 00, with Indicate transformed logic strip and its position relationship;If executing the write operation of full correcting and eleting codes band, shape in this state State be changed to N M RS (i.e. when executing the write operation of full correcting and eleting codes band, empty pillar location be changed to correcting and eleting codes pillar location, The position adjacent with correcting and eleting codes pillar location is mirror image pillar location, and another position is empty pillar location, it should be appreciated that here " adjacent " be only intended to illustrate adjacent in the textual representation of three band states, be not necessarily referring to physically adjacent), three band states Bitmap changes into 10 from 00.Such representation is more highly efficient than by the way of 14 kinds of states.
Second step:Correcting and eleting codes bitmap is changed to indicate correcting and eleting codes band
In order to realize do not occur in the conversion that full correcting and eleting codes band is write and mirror image item takes correcting and eleting codes band to it is actual Data Migration, to improve system performance, this method is indicated using correcting and eleting codes bitmap (i.e. RS bitmaps) on logic strip position Which data block constitute the correcting and eleting codes band of logic.Based on above-mentioned four kinds of states, correcting and eleting codes bitmap can be used to be deleted to indicate to entangle Which data block on code pillar location and mirror image pillar location constitutes correcting and eleting codes band, and on the two logic strip positions Other data blocks constitute mirror image band.
According to above-mentioned four kinds of state RS M N, M RS N, N M RS and N RS M, correcting and eleting codes band is taken to for mirror image item Conversion so that correcting and eleting codes bitmap is referred to (referring to the first step) after the exchange for executing mirror image pillar location and correcting and eleting codes pillar location Show which data block on the correcting and eleting codes pillar location and mirror image pillar location after exchanging constitutes correcting and eleting codes band.For example, for Size is three bands of N+M, using the correcting and eleting codes bitmap of N+M bit, wherein the number on correcting and eleting codes pillar location corresponding with 1 Correcting and eleting codes band is constituted according to the data block on block and mirror image pillar location corresponding with 0.
In one embodiment, before executing mirror image item and taking the conversion of correcting and eleting codes band to, mirror image band is being executed When write operation, as shown in Fig. 4 (a) and 4 (b), need a mirror image bitmap (i.e. M bitmaps) carrys out which data of rotating mirror slice band There are effective mirror image datas on block.For example, corresponding data block is there are effective mirror image data on 1 rotating mirror slice band, and 0 Indicate that effective mirror image data is not present in corresponding data block.Specifically, taking turning for correcting and eleting codes band to executing mirror image item When changing, before the three band states of change, effective mirror image data can be obtained according to mirror image bitmap, is deleted according to mirror image data and entangling Partial data on code-bar band calculates verification, check block and data block (herein, is described together to verification write-in mirror image band For data block, and according to method provided by the invention, check block is always located on the same logic strip), and change mirror Image position figure is to indicate the data block where mirror image data and verification.At this point, the data block and correcting and eleting codes band of the instruction of mirror image bitmap On partial data block constitute transformed correcting and eleting codes band.Then, correcting and eleting codes pillar location and mirror image pillar location are exchanged, and And correcting and eleting codes bitmap is changed to indicate which data block on the logic strip position after exchanging is constituted correcting and eleting codes band.
According to above-mentioned four kinds of state RS M N, M RS N, N M RS and N RS M, for the write operation of full correcting and eleting codes band (the hollow bar band for expiring band write-in is transformed into correcting and eleting codes band), correcting and eleting codes pillar location is changed to by empty pillar location, is made another Two outer positions be respectively mirror image pillar location and empty pillar location (for the present embodiment, mirror image pillar location with entangle Delete yard pillar location be expressed as in three band states it is adjacent);And make the correcting and eleting codes item after the instruction change of correcting and eleting codes bitmap Correcting and eleting codes band is constituted with the data block on position.
Three bands state transition method provided by the invention is described with reference to three specific examples.
Example one, mirror image item take the conversion for the first time of correcting and eleting codes band to.
1, referring to Fig. 5 (a), correcting and eleting codes band is full 0, and data D2 ', D4 ' and D5 ' is newly written in mirror image band, when first three Carrier state is RS M N.
2, execute D2 ', the D4 ' before mirror image item takes the conversion of correcting and eleting codes band to, being newly written according to mirror image band and D5 ' calculates verification, and mirror image band is written, as shown in Fig. 5 (b).
3, referring to Fig. 5 (c), three band states is changed, i.e., three band states are changed to M RS N from RS M N.In addition, Correcting and eleting codes bitmap (RS bitmaps) is changed, obtains 1010111010001000, instruction is made of the grey data block of Fig. 5 (c) entangles Delete code-bar band, the non-grey data block composition mirror image band of mirror image pillar location and correcting and eleting codes pillar location.
Example two, after the conversion of example one, occur mirror image band write the conversion for taking correcting and eleting codes band to mirror image item.
1, it referring to Fig. 6 (a), has newly write D1 " and D4 " and has arrived mirror image band.
2, the partial data block that the new data block and correcting and eleting codes item taken according to current mirror image item takes, calculates new school (P1 ", P2 ", P3 ", P4 ") is tested, current mirror image band is written, as shown in Fig. 6 (b).
3, referring to Fig. 6 (c), band state M RS N are changed to RS M N, and correcting and eleting codes bitmap is revised as 1001110111111111, transformed correcting and eleting codes band is constituted by the grey data block of Fig. 6 (c) with instruction, and mirror image band The non-grey data block of position and correcting and eleting codes pillar location constitutes mirror image band.
Example three, the full correcting and eleting codes band of generation is write after the conversion of example two.
It is written directly to hollow bar band (writing sky pillar location), empty pillar location and correcting and eleting codes pillar location are exchanged, shape State is changed to N M RS from RS M N, while abandoning the data that former mirror image band and former correcting and eleting codes item take.
It should be appreciated that although this specification describes according to various embodiments, not each embodiment only includes one A independent technical solution, this description of the specification is merely for the sake of clarity, and those skilled in the art should will say As a whole, the technical solutions in the various embodiments may also be suitably combined for bright book, and forming those skilled in the art can be with The other embodiment of understanding.
The foregoing is merely the schematical specific implementation modes of the present invention, are not limited to the scope of the present invention.It is any Those skilled in the art, do not depart from the design of the present invention and under the premise of principle made by equivalent variations, modification and combination, The scope of protection of the invention should all be belonged to.

Claims (7)

1. a kind of three band state transition methods, including:
Three band states are changed,
Wherein, three band refer to the mirror image band for raid-array, three of correcting and eleting codes band, hollow bar band Logic strip, the mirror image band are the logic strip protected using copy mechanism for data thereon, and described entangle is deleted Code-bar band is the logic strip that the protection of Reed-Solomon encoding mechanisms is used for data thereon, and the hollow bar band is not deposit The logic strip of data is put,
The three bands state is used to indicate current logic strip and its position relationship, including:Correcting and eleting codes pillar location is the One position, mirror image pillar location are the second position and empty pillar location is the third place;Mirror image pillar location is first position, entangles Delete that a yard pillar location is the second position and empty pillar location is the third place;Empty pillar location is first position, mirror image band position It is the third place to be set to the second position and correcting and eleting codes pillar location;Empty pillar location is first position, correcting and eleting codes pillar location is The second position and mirror image pillar location are the third place;And
Make in three band states after the instruction change of correcting and eleting codes bitmap which on correcting and eleting codes pillar location and mirror image pillar location Data block constitutes correcting and eleting codes band.
2. according to the method described in claim 1, wherein, removing the data block for constituting correcting and eleting codes band, the correcting and eleting codes after change Other data blocks on pillar location and mirror image pillar location constitute mirror image band.
3. method according to claim 1 or 2, wherein when execution mirror image item takes the conversion of correcting and eleting codes band to:
Exchange mirror image pillar location and correcting and eleting codes pillar location;And
Which data block composition on correcting and eleting codes pillar location and mirror image pillar location after making the instruction of correcting and eleting codes bitmap exchange is entangled Delete code-bar band.
4. according to the method described in claim 3, wherein, with 1 corresponding correcting and eleting codes pillar location in the correcting and eleting codes bitmap On data block, and on 0 corresponding mirror image pillar location in the correcting and eleting codes bitmap data block constitute correcting and eleting codes item Band.
5. according to the method described in claim 3, wherein, indicating which data block constitutes correcting and eleting codes making the correcting and eleting codes bitmap Before band, also obtain the mirror image item before exchange take write-in data, calculate verification and by the verification write-in exchange before Mirror image band.
6. method according to claim 1 or 2, wherein when the hollow bar band of full band write-in is transformed into correcting and eleting codes band:
Empty pillar location is changed to correcting and eleting codes pillar location, and another two position is made to be respectively mirror image pillar location and hollow bar Band position;And
The data block on the correcting and eleting codes pillar location after the instruction change of correcting and eleting codes bitmap is set to constitute correcting and eleting codes band.
7. method according to claim 1 or 2, wherein indicate the three bands state using the bitmap of 2bit.
CN201510115469.4A 2015-03-17 2015-03-17 A kind of three band state transition methods Expired - Fee Related CN104731527B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510115469.4A CN104731527B (en) 2015-03-17 2015-03-17 A kind of three band state transition methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510115469.4A CN104731527B (en) 2015-03-17 2015-03-17 A kind of three band state transition methods

Publications (2)

Publication Number Publication Date
CN104731527A CN104731527A (en) 2015-06-24
CN104731527B true CN104731527B (en) 2018-09-07

Family

ID=53455461

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510115469.4A Expired - Fee Related CN104731527B (en) 2015-03-17 2015-03-17 A kind of three band state transition methods

Country Status (1)

Country Link
CN (1) CN104731527B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1563411B1 (en) * 2002-11-14 2013-06-19 EMC Corporation Systems and methods for restriping files in a distributed file system
CN101866307A (en) * 2010-06-24 2010-10-20 杭州华三通信技术有限公司 Data storage method and device based on mirror image technology
EP3438839A1 (en) * 2011-09-30 2019-02-06 Intel Corporation Presentation of direct accessed storage under a logical drive model
CN103645859B (en) * 2013-11-19 2016-04-13 华中科技大学 A kind of magnetic disk array buffer storage method of virtual SSD and SSD isomery mirror image

Also Published As

Publication number Publication date
CN104731527A (en) 2015-06-24

Similar Documents

Publication Publication Date Title
US11003556B2 (en) Method, device and computer program product for managing storage system
CN106407040B (en) A kind of duplicating remote data method and system
CN102736945B (en) A kind of method and system of the Multi-instance running application
CN104503706A (en) Data storing method and data reading method based on disk array
US7739371B2 (en) Computer system
CN107479922A (en) A kind of flash data management method, device and computer-readable recording medium
CN104750565B (en) NAND bad block processing method and NAND flash memory equipment
CN109343790A (en) A kind of date storage method based on NAND FLASH, terminal device and storage medium
CN107291883A (en) The Snapshot Method and device of a kind of distributed memory system
CN103440205B (en) A kind of set top box data storage method and device
CN101819543A (en) Snapshot data processing method, system and storage device
CN104102535B (en) Process migration method and transportable operating system
CN103699337B (en) Writing control method and system based on independent redundant array of independent disks (RAID)
CN109302466A (en) Data processing method, relevant device and computer storage medium
EP3147797B1 (en) Data management method, node and system for database cluster
CN104937564B (en) The data flushing of group form
CN107967122A (en) A kind of method for writing data of block device, device and medium
CN104268097B (en) A kind of metadata processing method and system
CN106951340B (en) A kind of RS correcting and eleting codes data layout method and system preferential based on locality
CN106104515A (en) Utilize File system design and the fault recovery method of nonvolatile memory
US7624129B2 (en) Dual logging of changes to a user preference in a computer device
CN106027638A (en) Hadoop data distribution method based on hybrid coding
CN109412830A (en) The cured method, apparatus of Adapter Name, computer equipment and storage medium
CN104731526B (en) The method and device that a kind of discontented band is write
CN109298873A (en) A kind of method for upgrading system and device

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180907