The content of the invention
This application provides a kind of data processing method and device, to solve dirty data mark in the prior art, cause
The larger technical problem of resource consumption.
To achieve the above object, the application provides following technical scheme:
First aspect, there is provided a kind of data processing method, including:
When detecting dirty data, the first memory block for being used to index at least two first predetermined volumes pre-established is inquired about
The first bitmap, the first memory blocks of at least two first predetermined volumes is to divide data space to determine;
It is dirty to judge whether correspondence position of the first memory block in first bitmap belonging to the dirty data is provided with
Data Identification;
If it is not, correspondence position of the first memory block belonging to the dirty data in first bitmap is set into dirty data
Identify, and the first memory block is divided into the second memory block of at least two second predetermined volumes, establish for indexing institute
State the second bitmap of the second memory block of at least two second predetermined volumes;
If so, being defined as the second bitmap that the first memory block belonging to the dirty data is established, second bitmap is will
What correspondence position of the first memory block in the first bitmap was established when setting dirty data to identify, deposited for indexing described first
Store up the second memory block of at least two second predetermined volumes of block division;By the second memory block belonging to the dirty data described
Correspondence position in second bitmap sets dirty data to identify.
In the first possible implementation of the first aspect, methods described also includes:
Judge whether the quantity of each second bitmap apoplexy involving the solid organs Data Identification meets preparatory condition;
If so, then the second bitmap for meeting the preparatory condition is deleted.
With reference to the possible implementation of the first of the first aspect or the first aspect, the first party is additionally provided
The possible implementation of second of face, methods described also include:
The data of the second memory block storage corresponding to the second bitmap of dirty data mark will be provided with, and be provided with dirty number
According to the data of the first memory block storage corresponding to the first bitmap of mark, and in the absence of the second bitmap, handled.
With reference to the possible implementation of the first of the first aspect or the first aspect, the first party is additionally provided
It is defined as the second bitmap that the first memory block belonging to the dirty data is established described in the third possible implementation in face, and will
Correspondence position of second memory block in second bitmap belonging to the dirty data, which sets dirty data to identify, to be included:
Judge the first memory block belonging to the dirty data with the presence or absence of the second bitmap established;
If so, be defined as second bitmap that first memory block belonging to the dirty data is established, and by the dirty number
Dirty data is set to identify according to correspondence position of the second affiliated memory block in the second bitmap;
If it is not, the step of being detected described in returning during dirty data continues executing with.
With reference to any of the above-described kind of the first aspect or the first aspect may implementation, additionally provide described the
4th kind of possible implementation of one side, the data space are source device memory space, and the dirty data is described
The data being not copied in source device in mirroring device;
It is described to detect that dirty data is specifically to detect that system issues data to source device, it is determined that the data are dirty number
According to.
With reference to the 4th kind of possible implementation of the first aspect, the 5th kind of possibility of the first aspect is additionally provided
Implementation, the dirty data that the second memory block storage corresponding to the second bitmap of dirty data mark will be provided with, Yi Jishe
Corresponding to the first bitmap for being equipped with dirty data mark, and the dirty data of the first memory block storage in the absence of the second bitmap, carry out
Processing includes:
The dirty data of the second memory block storage corresponding to the second bitmap of dirty data mark will be provided with, and be provided with dirty
Corresponding to first bitmap of Data Identification, and the dirty data of the first memory block storage in the absence of the second bitmap, copy to described
In mirroring device.
Second aspect, there is provided a kind of data processing equipment, including:
Data detecting unit, during for detecting dirty data, inquiring about being used for of pre-establishing, to index at least two first pre-
First bitmap of the first memory block of constant volume, the first memory block of at least two first predetermined volumes is by data storage
Space division determines;
Judging unit is identified, for judging correspondence of the first memory block belonging to the dirty data in first bitmap
Whether position is provided with dirty data mark;
First mark setting unit, for when the mark judging unit result for it is no when, by belonging to the dirty data
Correspondence position of the first memory block in first bitmap sets dirty data to identify;
Bitmap establishes unit, for the first memory block to be divided into the second storage of at least two second predetermined volumes
Block, establish the second bitmap of the second memory block for indexing at least two second predetermined volumes;
Second mark setting unit, for when the mark judging unit result is is, being defined as the dirty data institute
The second bitmap that the first memory block of category is established, second bitmap are the correspondence by the first memory block in the first bitmap
What position was established when setting dirty data to identify, at least two second predetermined volumes divided for indexing the first memory block
Second memory block;Correspondence position of the second memory block belonging to the dirty data in second bitmap is set into dirty data mark
Know.
In the first possible implementation of the second aspect, in addition to:
Quantity judging unit, for judging whether the quantity of each second bitmap apoplexy involving the solid organs Data Identification meets preparatory condition;
Unit is deleted, for the second bitmap for meeting the preparatory condition to be deleted.
With reference to the possible implementation of the first of the second aspect or the second aspect, the second party is additionally provided
The possible implementation of second of face, in addition to:
Processing unit, for the data of the second memory block storage corresponding to the second bitmap of dirty data mark will to be provided with,
And be provided with corresponding to the first bitmap of dirty data mark, and the data of the first memory block storage in the absence of the second bitmap,
Handled.
With reference to the possible implementation of the first of the second aspect or the second aspect, the second party is additionally provided
The third possible implementation in face, the second mark setting unit include:
Bitmap judging unit, for judging the first memory block belonging to the dirty data with the presence or absence of the second established
Figure, if it is not, triggering the data detecting unit;
Second mark sets subelement, for when the bitmap judging unit result is to be, being defined as the dirty data
Second bitmap that affiliated first memory block is established, and by the second memory block belonging to the dirty data in the second
Correspondence position in figure sets dirty data to identify.
With reference to any of the above-described kind of the second aspect or the second aspect may implementation, additionally provide described the
4th kind of possible implementation of two aspects, the data space is source device memory space, and the dirty data is described
The data being not copied in source device in mirroring device;
The data detecting unit detects that dirty data is specifically to detect that system issues data to source device, if so, really
The fixed data are dirty data.
With reference to the 4th kind of possible implementation of the second aspect, the 5th kind of possibility of the second aspect is additionally provided
Implementation, the processing unit are specifically used for being provided with the second memory block storage corresponding to the second bitmap of dirty data mark
Dirty data, and be provided with corresponding to the first bitmap of dirty data mark, and deposited in the absence of the first memory block of the second bitmap
The dirty data of storage, copy in the mirroring device.
To sum up, this application provides a kind of data processing method and device, when detecting dirty data, inquiry pre-establishes
The first bitmap for being used to index the first memory block of at least two first predetermined volumes, and judge belonging to the dirty data that first deposits
Store up whether correspondence position of the block in the first bitmap is provided with dirty data mark, if it is not, then set dirty data to identify, and will
The first memory block marks off the second memory block of at least two second predetermined volumes, establishes the second of the second memory block of index
Figure;If so, then setting dirty data to identify correspondence position of the second memory block belonging to the dirty data in the second bitmap, first is pre-
Constant volume can select larger capacity, and only when first memory block has dirty data mark, subdivided second memory block is built
Vertical second bitmap is marked, and both ensure that data volume during data identifying processing, has reduced processing expense, while reduce position
Scheme the resource taken.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only some embodiments of the present application, rather than whole embodiments.It is based on
Embodiment in the application, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of the application protection.
One of main thought of the embodiment of the present application can include:
When detecting dirty data, the first memory block for being used to index at least two first predetermined volumes pre-established is inquired about
The first bitmap, and judge whether correspondence position of the affiliated first memory block of the dirty data in the first bitmap is provided with dirty data
Mark, if it is not, then being set dirty data mark, and the first memory block is marked off the of at least two second predetermined volumes
Two memory blocks, establish the second bitmap of the second memory block of index;If so, then by the second memory block belonging to the dirty data in second
Correspondence position in figure sets dirty data to identify, and the first predetermined volumes can select larger capacity, and only in first memory block
When dirty data mark be present, subdivided second memory block is established the second bitmap and is marked, when both ensure that data identifying processing
Data volume, reduce processing expense, at the same reduce bitmap occupancy resource.
Fig. 1 is a kind of flow chart of data processing method one embodiment that the embodiment of the present application provides, and this method can be with
Including following steps:
101:When detecting dirty data, inquire about first for indexing at least two first predetermined volumes pre-established and deposit
Store up the first bitmap of block.
Wherein, the first memory block of at least two first predetermined volumes is that data space is divided into what is determined.
In the present embodiment, data space is divided in advance, marks off the of at least two first predetermined volumes
One memory block, and establish the first bitmap corresponding at least two first memory blocks.Bitmap refers to one represented using bit array
Set, for indexing different memory blocks, wherein the quantity of the first memory block marked off can be with the first predetermined volumes sum
It is relevant according to memory space total capacity.
Diverse location in corresponding first bitmap of different memory blocks so that corresponding first bitmap of each first memory block
One, take a byte.
It should be noted that data space is divided into division simply in logic in the embodiment of the present application, and
It is not division physically.
Data space refers to the memory headroom of the storage mediums such as the disk for data storage.
First predetermined volumes can set a larger value, so as in advance by rough stroke of data space
Separate the memory block of several larger storage capacity.
For example, for 1TB can be stored(Terabyte, terabyte)The disk of data, the first predetermined volumes can be set
It is set to 2MB(Megabyte, Mbytes), i.e. each in the first bitmap represents 2MB first memory block.
When detecting dirty data, that is, inquire about first bitmap pre-established.
The dirty data can not carry out pre-processing and directly receiving, data in a state of nature, or
Imperfect, Noise, inconsistent data, or it is not in given scope or meaningless for practical business, or lattice
Formula is illegal, and nonstandard coding and ambiguous data of service logic etc. in the system of source be present.
102:It is dirty to judge whether correspondence position of the first memory block in the first bitmap belonging to the dirty data is provided with
Data markers;If it is not, step 103 is performed, if so, performing step 105.
Data are stored according to storage address, and each first memory block corresponds to different storage address, therefore basis
The LBA (Logical Block Address, logical block addresses) of the dirty data, it may be determined that the first memory block belonging to it,
Correspondence position of the memory block in the first bitmap is found so as to corresponding, and judges whether the corresponding position is provided with dirty number
According to mark, dirty data mark can be as the place value of the corresponding position.
Dirty data mark is to be used to distinguish to be stored with dirty data in first memory block, place value " 1 " can be used to represent, numerical value
" 0 " can then represent not store dirty data, therefore it can be specifically to sentence to judge whether corresponding position is provided with dirty data mark
Whether the place value of disconnected corresponding position is 1.
It is a kind of schematic diagram of first bitmap in the embodiment of the present application as shown in Figure 1a, it is assumed that the capacity of first bitmap is
16 bytes, take the resource of 16 bits, corresponding 16 first memory blocks, and the first bitmap median is the first of 1 position correspondence
Memory block shows to be stored with dirty data.
103:Dirty data is set to identify correspondence position of the first memory block belonging to the dirty data in the first bitmap.
104:The first memory block is divided into the second memory block of at least two second predetermined volumes, establish described in extremely
Second bitmap corresponding to second memory block of few two the second predetermined volumes.
, will if corresponding position of the affiliated first memory block of the dirty data in the first bitmap is not provided with dirty data mark
The correspondence position is marked, and sets dirty data to identify, represents that its corresponding first memory block is stored with dirty data.
Meanwhile continue to divide by the first memory block, i.e., first memory block is finely divided, is divided into multiple second
Memory block, the capacity of every one second memory block is the second predetermined volumes, and establishes the second bitmap corresponding to the second memory block, second
The capacity of the quantity of memory block and the second predetermined volumes and the first memory block, i.e. the first predetermined volumes are relevant, and usual the
The quantity of two memory blocks is equal to the quotient that the first predetermined volumes divided by the second predetermined volumes obtain.
Understanding, the second predetermined volumes are less than the first predetermined volumes, for example, when the first predetermined volumes are 2M, the second pre- constant volume
Amount can be 16K.
105:It is defined as the second bitmap that the first memory block belonging to the dirty data is established, and by belonging to the dirty data
Correspondence position of second memory block in the second bitmap set dirty data to identify.
The second bitmap that first memory block belonging to the dirty data is established is in the first bitmap by the first memory block
In correspondence position establish when setting dirty data to identify, at least two second for indexing the first memory block division are pre-
Second memory block of constant volume.
If the first bitmap corresponding to the affiliated first memory block of the dirty data is provided with dirty data mark, as described in step 104,
The first memory block will now be divided into the second memory block of at least two second predetermined volumes, and establishing has index second to deposit
Store up the second bitmap of block.The second memory block belonging to the dirty data can be now continued to search for, its affiliated second memory block is existed
Correspondence position in second bitmap sets dirty data to identify.
Certain step 104 is not limited to the operation opportunity described in the present embodiment, as long as first memory block is in the first bitmap
In correspondence position be provided with dirty data mark, you can to establish the second bitmap of first memory block, its can first storage
Correspondence position of the block in the first bitmap sets while dirty data mark or carried out afterwards.
According to the relation between first memory block and the second memory block, the correspondence of the first bitmap and the second bitmap can be established
Relation, so as to find the second bitmap corresponding to the second memory block belonging to dirty data.
RBTree algorithm queries can be specifically utilized during the second bitmap corresponding to the second memory block belonging to lookup dirty data,
To accelerate inquiry velocity.Each corresponding location index number at diverse location in first bitmap and the second bitmap, is building
During vertical second bitmap, it can be inserted using location index number as index is searched in RBTree.When being inquired about, pass through position rope
Quotation marks, pair of second memory block in the second bitmap in the affiliated first memory block of dirty data can be found using RBTree
Answer position.
It is, of course, also possible to be realized using other algorithms, the application is defined not to this.
In the present embodiment, when the correspondence position only in first memory block in the first bitmap is provided with dirty data mark,
Just first memory block is continued to divide, remember dirty data, first memory block using second icon corresponding to the second memory block
The first predetermined volumes can set larger capacity, so as to reduce bitmap occupancy system resource, reduce resource and disappear
Consumption.
When carrying out dirty data identification and processing, the first bitmap and the second bitmap, the dirty number in the second bitmap are searched
According to mark, it can look only for and handle the data of the second memory block storage, if the second memory block is not present in first memory block, then look into
Look for and handle the data of first memory block storage.
That is to say will be provided with the data of the second memory block storage corresponding to the second bitmap of dirty data mark, and set
Corresponding to the first bitmap for having dirty data mark, and the data of the first memory block storage in the absence of the second bitmap, handled.
Treating capacity during so as to ensure that data processing, is unlikely to the larger data of identifying processing capacity, increases overhead, such as
During the processing for needing to replicate dirty data operates, if the capacity of the affiliated memory block of dirty data is larger, it can to replicate and grasp
The data volume dealt with is larger, causes processing expense larger, and uses the application, if in the presence of the second memory block, deals with objects
It is changed into the data of the second memory block storage, because the second memory block capacity is smaller, therefore processing expense can be reduced.
In the present embodiment, when detecting dirty data, inquire about pre-establish be used for index at least two first pre- constant volumes
First bitmap of the first memory block of amount, when correspondence position of the affiliated first memory block of the dirty data in the first bitmap is not provided with
There is dirty data mark, then set dirty data to identify the relevant position, and the first memory block is marked off at least two second
Second memory block of predetermined volumes, the second bitmap of the second memory block of index is established, when the affiliated first memory block of dirty data is corresponding
The first bitmap in relevant position be provided with dirty data mark, then by the second bitmap corresponding to the second memory block belonging to dirty data
In relevant position set dirty data to identify, because the first predetermined volumes are larger, without consuming excessive system resource, and only
When correspondence position of the first memory block in the first bitmap is provided with dirty data mark, just continue to divide the foundation of the second memory block
Second bitmap is marked, and both ensure that processing data amount during data identifying processing so that processing expense is unlikely to excessive, together
When ensure that and do not consume excessive resource.
Fig. 2 is a kind of flow chart for another embodiment of data processing method that the embodiment of the present application provides, and this method can
With including following steps:
201:When detecting dirty data, inquire about first for indexing at least two first predetermined volumes pre-established and deposit
Store up the first bitmap of block.
The first memory block of few two first predetermined volumes is to divide data space to determine.
202:It is dirty to judge whether correspondence position of the first memory block in the first bitmap belonging to the dirty data is provided with
Data Identification, if it is not, step 203 is performed, if so, performing step 205:
203:Dirty data is set to identify correspondence position of the first memory block belonging to the dirty data in the first bitmap.
204:The first memory block is divided into the second memory block of at least two second predetermined volumes, established for rope
Draw the second bitmap of the second memory block of at least two second predetermined volumes.
205:It is defined as the second bitmap that the first memory block belonging to the dirty data is established, and by belonging to the dirty data
Correspondence position of second memory block in the second bitmap set dirty data to identify.
The second bitmap that first memory block belonging to the dirty data is established is in the first bitmap by the first memory block
In correspondence position establish when setting dirty data to identify, at least two second for indexing the first memory block division are pre-
Second memory block of constant volume.
Step 201~step 205 is similar to the step 101 in above-described embodiment~step 204, will not be repeated here.
206:Judge whether the quantity of each second bitmap apoplexy involving the solid organs Data Identification meets preparatory condition, if so, performing step
207, if it is not, continuing to judge.
207:The second bitmap for meeting the preparatory condition is deleted.
For the dirty data detected, performed according to the operation described in step 201~step 205, so as to deposit
The dirty data stored up in the data in data space is marked.
In the present embodiment, it can also judge whether the quantity of the mark of the dirty data in the second established bitmap meets default bar
Part, so as to which the second bitmap for meeting preparatory condition be deleted, the efficient merging of dirty data is realized, is further reduced for marking
Remember the resource that the bitmap of dirty data takes.
Preparatory condition can be set according to practical situations, when the dirty data mark quantity in the second bitmap meets in advance
If during condition, show that the dirty data quantity of at least two second memory blocks storage of first memory block division meets default bar
Part, it is believed that first memory block mainly stores dirty data, can now delete the second bitmap, to cause in index dirty data
When, first memory block is only searched according to the first bitmap.It is achieved thereby that dirty data union operation, had both reduced bitmap and has taken resource,
Facilitate data processing again.
The preparatory condition is such as can be 30 the percent of dirty data mark quantity occupy-place figure capacity.
The operation of step 206~step 207 does not limit the execution flow of the present embodiment, its can be either step it
It is preceding or perform afterwards.
Therefore, because the second bitmap of first memory block may be not present, in step 205, by belonging to the dirty data
Correspondence position of second memory block in the second bitmap can specifically include when setting dirty data to identify:
Judge the first memory block belonging to the dirty data with the presence or absence of the second bitmap established;
If so, correspondence position of the second memory block belonging to the dirty data in the second bitmap is set into dirty data mark
Know;
If it is not, then continuing to detect dirty data, the operation of step 201 is performed.
208:The data of the second memory block storage corresponding to the second bitmap of dirty data mark will be provided with, and be provided with
Corresponding to first bitmap of dirty data mark, and the data of the first memory block storage in the absence of the second bitmap, handled.
After dirty data is marked, the identification and processing of data can be facilitated.It is to be provided with when carrying out dirty data processing
The data of second memory block storage corresponding to second bitmap of dirty data mark, and it is provided with the first bitmap of dirty data mark
It is corresponding, and the data of the first memory block storage in the absence of the second bitmap, handled.According to the second bitmap apoplexy involving the solid organs data mark
The position of knowledge can determine which corresponding the second memory block, can be true also according to the position of the first bitmap apoplexy involving the solid organs Data Identification
Make and which first memory block corresponded to.The dirty data of dirty data or the storage of the second memory block so as to first memory block storage
Handled.
The operation of step 208 does not limit the execution flow with the present embodiment yet, and it can be before either step or it
After perform.
Different second memory blocks and the dirty data of different first memory blocks storage can be handled simultaneously, to accelerate to handle
Progress, such as when dirty data is replicated, if the first bitmap that dirty data identifies will be set or set that dirty data identifies the
The dirty data of corresponding first memory block or the second memory block is replicated two bitmaps simultaneously respectively, can improve duplicating efficiency.
In the present embodiment, when detecting dirty data, inquire about pre-establish be used for index at least two first pre- constant volumes
First bitmap of the first memory block of amount, when correspondence position of the affiliated first memory block of the dirty data in the first bitmap is not provided with
There is dirty data mark, then set dirty data to identify the relevant position, and the first memory block is divided more at least two second
Second memory block of predetermined volumes, the second bitmap of the second memory block of index is established, when the affiliated first memory block of dirty data is corresponding
The first bitmap in relevant position be provided with dirty data mark, then by the second bitmap corresponding to the second memory block belonging to dirty data
In relevant position set dirty data identify.When the quantity of the dirty data mark in the second bitmap meets preparatory condition, then will
Second bitmap is deleted, and realizes the merging of discontinuous dirty data.So as to when carrying out data processing, if in the presence of the second bitmap,
The data of the second memory block corresponding to the second bitmap dirty data mark are then handled, if the second bitmap is not present, handle first
The data of first memory block corresponding to figure dirty data mark.So as to both reduce the resource of bitmap occupancy, and ensure that at data
Data volume during reason, excessive extra processing expense is not increased.
It can be applied particularly to replicate in software in one practical application of the embodiment of the present application, replicate software and refer to utilize
The replication capacity of data, there is provided the function such as backup, disaster tolerance, Data Migration.Replicating software execution equipment includes source device and mirror image
Equipment, replicating software is realized by the data duplication in source device into mirroring device, and ensures source device and mirroring device
Middle data are consistent.System issues(Such as input/output IO is issued)Data arrive first at source device, source device again will under
The data duplication of hair is into mirroring device, because the efficiency of data distributing could possibly be higher than the efficiency of data duplication, therefore under causing
The data being sent in source device can not be copied in mirroring device in time, and now the data not replicated also are dirty number
According to.
Therefore, in corresponding the embodiment of the present application, the storage of data storage is used in the data space namely source device
Space, dirty data are the data being not copied in source device in mirroring device, detect that dirty data that is to say the system of detecting
Data are issued to source device, system issues data to source device, you can it is dirty data to determine the data.
With reference to the practical application scene, technical scheme is described in detail, Fig. 3 is what the embodiment of the present application provided
A kind of flow chart of another embodiment of data processing method, this method can include:
301:The system of detecting issues data to source device, and it is dirty data to determine the data.
302:Inquire about the first bitmap for being used to index the first memory block of at least two first predetermined volumes pre-established.
The first memory block of at least two first predetermined volumes is to divide data space to determine.Such as
64M data space, when the first predetermined volumes are 2M, it can at most mark off 32 pieces of memory blocks.
303:It is dirty to judge whether correspondence position of the first memory block in the first bitmap belonging to the dirty data is provided with
Data Identification, if it is not, step 304 is performed, if so, performing step 306.
304:Dirty data is set to identify correspondence position of the first memory block belonging to the dirty data in the first bitmap.
305:The first memory block is divided into the second memory block of at least two second predetermined volumes, established for rope
Draw the second bitmap of the second memory block of at least two second predetermined volumes;
306:It is defined as the second bitmap that the first memory block belonging to the dirty data is established, and by belonging to the dirty data
Correspondence position of second memory block in second bitmap set dirty data to identify.
Described is that the second bitmap that the first memory block belonging to dirty data is established is at first by the first memory block
What the correspondence position in figure was established when setting dirty data to identify, for indexing at least two second of the first memory block division
Second memory block of predetermined volumes.
307:Judge whether the quantity of each second bitmap apoplexy involving the solid organs Data Identification meets preparatory condition, if so, performing step
308, if it is not, continuing to judge.
308:The second bitmap for meeting the preparatory condition is deleted.
309:The dirty data of the second memory block storage corresponding to the second bitmap of dirty data mark will be provided with, and set
Corresponding to the first bitmap for having dirty data mark, and the dirty data of the first memory block storage in the absence of the second bitmap, copy to
In the mirroring device.
It is the data stored in the data or the second memory block that will be stored in first memory block in the present embodiment, it is multiple
Make in mirroring device, facilitate data processing, carried beneficial to data.
Identified by dirty data, can only replicate the data in first memory block or only replicate number in the second memory block
According to, take resource so as to both reduce bitmap, turn avoid copied more data volume and caused by data to carry expense larger.
And the dirty data mark quantity in the second bitmap deletes the second bitmap, completes bitmap and merge, realize when meeting preparatory condition
The merging of discontinuous dirty data, further reduce bitmap and take resource.
For foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as to a series of combination of actions, but
It is that those skilled in the art should know, the application is not limited by described sequence of movement, because according to the application, certain
A little steps can use other orders or carry out simultaneously.Secondly, those skilled in the art should also know, be retouched in specification
The embodiment stated belongs to preferred embodiment, necessary to involved action and module not necessarily the application.
Fig. 4 is a kind of structural representation of data processing equipment one embodiment of the application, and the device can include:
Data detecting unit 401, during for detecting dirty data, inquiring about being used for of pre-establishing indexes at least two first
First bitmap of the first memory block of predetermined volumes.
The first memory block of at least two first predetermined volumes is to divide data space to determine.
Judging unit 402 is identified, for judging correspondence of the first memory block belonging to the dirty data in the first bitmap
Whether position is provided with dirty data mark.
First mark setting unit 403, for when mark judging unit 402 result for it is no when, by the dirty data
Correspondence position of the affiliated first memory block in the first bitmap sets dirty data to identify.
Bitmap establishes unit 404, for the first memory block to be divided into the second of at least two second predetermined volumes
Memory block, establish the second bitmap of the second memory block for indexing at least two second predetermined volumes.
Second mark setting unit 405, for when mark judging unit 402 result is is, being defined as described dirty
The second bitmap that first memory block belonging to data is established, second bitmap be by the first memory block in the first bitmap
Correspondence position establish when setting dirty data to identify, at least two second for indexing the first memory block division are predetermined
Second memory block of capacity;Correspondence position of the second memory block belonging to the dirty data in the second bitmap is set into dirty data
Mark.
If the first bitmap corresponding to the affiliated first memory block of the dirty data is provided with dirty data mark, as it was noted above, should
First memory block now includes the second memory block, and foundation has the second bitmap.Belonging to the dirty data can now be continued to search for
Two memory blocks, dirty data is set to identify correspondence position of its affiliated second memory block in the second bitmap.
In the present embodiment, when the correspondence position only in first memory block in the first bitmap is provided with dirty data mark,
Just first memory block is continued to divide, remember dirty data, first memory block using second icon corresponding to the second memory block
The first predetermined volumes can set larger capacity, so as to reduce bitmap occupancy system resource, reduce resource and disappear
Consumption.
In the present embodiment, when detecting dirty data, inquire about pre-establish be used for index at least two first pre- constant volumes
First bitmap of the first memory block of amount, when correspondence position of the affiliated first memory block of the dirty data in the first bitmap is not provided with
There is dirty data mark, then set dirty data to identify the relevant position, and the first memory block is divided more at least two second
Second memory block of predetermined volumes, the second bitmap of the second memory block of index is established, when the affiliated first memory block of dirty data is corresponding
The first bitmap in relevant position be provided with dirty data mark, then by the second bitmap corresponding to the second memory block belonging to dirty data
In relevant position set dirty data to identify, because the first predetermined volumes are larger, without consuming excessive system resource, and only
When correspondence position of the first memory block in the first bitmap is provided with dirty data mark, just continue to divide the foundation of the second memory block
Second bitmap is marked, and both ensure that data volume during data identifying processing so that overhead is unlikely to excessive, protects simultaneously
Demonstrate,prove and do not consumed excessive resource.
Fig. 5 is a kind of structural representation of another embodiment of data processing equipment of the application, and the device can include:
Data detecting unit 501, during for detecting dirty data, inquiring about being used for of pre-establishing indexes at least two first
First bitmap of the first memory block of predetermined volumes, the first memory block of at least two first predetermined volumes is to deposit data
Store up what space division determined.
Judging unit 502 is identified, for judging correspondence of the first memory block belonging to the dirty data in the first bitmap
Whether position is provided with dirty data mark.
First mark setting unit 503, for when mark judging unit 502 result for it is no when, by the dirty data
Correspondence position of the affiliated first memory block in the first bitmap sets dirty data to identify.
Bitmap establishes unit 504, for the first memory block to be divided into the second of at least two second predetermined volumes
Memory block, establish the second bitmap of the second memory block for indexing at least two second predetermined volumes.
Second mark setting unit 505, for when mark judging unit 502 result is is, being defined as described dirty
The second bitmap that first memory block belonging to data is established, second bitmap be by the first memory block in the first bitmap
Correspondence position establish when setting dirty data to identify, at least two second for indexing the first memory block division are predetermined
Second memory block of capacity;Correspondence position of the second memory block belonging to the dirty data in the second bitmap is set into dirty data
Mark.
Quantity judging unit 506, judges whether the quantity of each second bitmap apoplexy involving the solid organs Data Identification meets preparatory condition.
Unit 507 is deleted, for the second bitmap for meeting the preparatory condition to be deleted.
Because the second bitmap of first memory block may be not present, therefore the second mark setting unit can include:
Bitmap judging unit, for judging that the first memory block belonging to the dirty data whether there is corresponding second
Figure, if it is not, triggering the data detecting unit.
Second mark sets subelement, for when the bitmap judging unit result is to be, being defined as the dirty data
Second bitmap that affiliated first memory block is established, and by the second memory block belonging to the dirty data in the second bitmap
Correspondence position set dirty data identify.
Processing unit 508, for the number of the second memory block storage corresponding to the second bitmap of dirty data mark will to be provided with
According to, and be provided with corresponding to the first bitmap of dirty data mark, and the number of the first memory block storage in the absence of the second bitmap
According to being handled.
After dirty data is marked, the identification and processing of data can be facilitated.It is to be provided with when carrying out dirty data processing
The data of second memory block storage corresponding to second bitmap of dirty data mark, and it is provided with the first bitmap of dirty data mark
It is corresponding, and the data of the first memory block storage in the absence of the second bitmap, handled.
Different second memory blocks and the dirty data of different first memory blocks storage can be handled simultaneously, to accelerate to handle
Progress, such as when dirty data is replicated, if will set first corresponding to the first bitmap or the second bitmap that dirty data identifies
The dirty data of memory block or the second memory block is replicated simultaneously, can improve duplicating efficiency.
In the present embodiment, when detecting dirty data, inquire about pre-establish be used for index at least two first pre- constant volumes
First bitmap of the first memory block of amount, when correspondence position of the affiliated first memory block of the dirty data in the first bitmap is not provided with
There is dirty data mark, then set dirty data to identify the relevant position, and the first memory block is marked off at least two second
Second memory block of predetermined volumes, the second bitmap of the second memory block of index is established, when the affiliated first memory block of dirty data is corresponding
The first bitmap in relevant position be provided with dirty data mark, then by the second bitmap corresponding to the second memory block belonging to dirty data
In relevant position set dirty data identify.When the quantity of the dirty data mark in the second bitmap meets preparatory condition, then will
Second bitmap is deleted.So as to when carrying out data processing, if in the presence of the second bitmap, handle the second bitmap dirty data mark pair
The data for the second memory block answered, if the second bitmap is not present, handle the first storage corresponding to the first bitmap dirty data mark
The data of block.So as to both reduce the resource of bitmap occupancy, and data volume when ensure that data processing, do not increase excessive volume
Outer processing expense.
Wherein, it is source device memory space in a practical application, the data space, the dirty data is described
The data being not copied in source device in mirroring device.
Therefore, the data detecting unit detects that dirty data is specifically to detect that system issues data to source device, if so,
It is dirty data to determine the data.
The processing unit is specifically used for being provided with the second memory block storage corresponding to the second bitmap of dirty data mark
Dirty data, and be provided with corresponding to the first bitmap of dirty data mark, and deposited in the absence of the first memory block of the second bitmap
The dirty data of storage, copy in the mirroring device.
Identified by dirty data, can only replicate the data in first memory block or only replicate number in the second memory block
According to, take resource so as to both reduce bitmap, turn avoid copied more data volume and caused by data to carry expense larger.
And the dirty data mark quantity in the second bitmap deletes the second bitmap, completes bitmap and merge, further when meeting preparatory condition
Reduce bitmap and take resource.
The data processing equipment of above-mentioned offer, in actual applications, it is desirably integrated into computing device, deployment the application is real
Apply the computing device of the example data processing equipment, it is possible to achieve to the mark of dirty data so that be not take up excessive resource, and protect
Data volume during data processing is demonstrate,proved.
By above description, those skilled in the art can be understood that the application can add by software must
The mode of the general hardware platform needed is realized.Therefore, referring to Fig. 6, the embodiment of the present application additionally provides a kind of computing device, should
Computing device comprises at least memory 601 and the processor 602 being connected by bus with memory 601.
The memory 601 is used to store batch processing instruction;The memory 601 can be high-speed RAM memory, also may be used
It can be nonvolatile memory(non-volatile memory), for example, at least magnetic disk storage etc..
The processor 602 is used for the programmed instruction for calling the memory, performs following operation:
When detecting dirty data, the first memory block for being used to index at least two first predetermined volumes pre-established is inquired about
The first bitmap, the first memory blocks of at least two first predetermined volumes is to divide data space to determine;
Judge whether correspondence position of the first memory block in the first bitmap belonging to the dirty data is provided with dirty data
Mark;
If it is not, correspondence position of the first memory block belonging to the dirty data in the first bitmap is set into dirty data mark
Know, and the first memory block is divided into the second memory block of at least two second predetermined volumes, establish described for indexing
Second bitmap of the second memory block of at least two second predetermined volumes;
If so, be defined as the second bitmap that first memory block belonging to the dirty data is established, and by the dirty data institute
Correspondence position of second memory block of category in second bitmap sets dirty data to identify.
The second bitmap that first memory block belonging to the dirty data is established is in the first bitmap by the first memory block
In correspondence position establish when setting dirty data to identify, at least two second for indexing the first memory block division are pre-
Second memory block of constant volume.
The processor 602 is probably a central processor CPU, or specific integrated circuit ASIC(Application
Specific Integrated Circuit), or it is arranged to implement the integrated electricity of one or more of the embodiment of the present invention
Road.
Alternatively, the computing device can be used for performing any data shown in Fig. 1-Fig. 3 that the embodiment of the present application provides
Processing method.
In a practical application, the computing device can realize the processing for replicating dirty data in operation, i.e., by under system
The data for being sent to source device are defined as dirty data, and are marked according to technical scheme, can cause to dirty data
Mark is not take up excessive resource, can merge discrete dirty data, facilitates replication processes when data are carried.
Each embodiment is described by the way of progressive in this specification, what each embodiment stressed be and other
The difference of embodiment, between each embodiment identical similar portion mutually referring to.For device disclosed in embodiment
For, because it is corresponded to the method disclosed in Example, so description is fairly simple, related part is said referring to method part
It is bright.
Finally, it is to be noted that, herein, such as first and second or the like relational terms be used merely to by
One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation
Between any this actual relation or order be present.Moreover, term " comprising ", "comprising" or its any other variant meaning
Covering including for nonexcludability, so that process, method, article or equipment including a series of elements not only include that
A little key elements, but also the other element including being not expressly set out, or also include for this process, method, article or
The intrinsic key element of equipment.In the absence of more restrictions, the key element limited by sentence "including a ...", is not arranged
Except other identical element in the process including the key element, method, article or equipment being also present.
For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly, this is being implemented
The function of each unit can be realized in same or multiple softwares and/or hardware during application.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application can
Realized by the mode of software plus required general hardware platform.Based on such understanding, the technical scheme essence of the application
On the part that is contributed in other words to prior art can be embodied in the form of software product, the computer software product
It can be stored in storage medium, such as ROM/RAM, magnetic disc, CD, including some instructions are causing a computer equipment
(Can be personal computer, server, or network equipment etc.)Perform some of each embodiment of the application or embodiment
Method described in part.
The foregoing description of the disclosed embodiments, professional and technical personnel in the field are enable to realize or using the application.
A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein
General Principle can be realized in other embodiments in the case where not departing from spirit herein or scope.Therefore, the application
The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one
The most wide scope caused.