CN106933970A - A kind of fast writing data to EXT subregions method and apparatus - Google Patents
A kind of fast writing data to EXT subregions method and apparatus Download PDFInfo
- Publication number
- CN106933970A CN106933970A CN201710074013.7A CN201710074013A CN106933970A CN 106933970 A CN106933970 A CN 106933970A CN 201710074013 A CN201710074013 A CN 201710074013A CN 106933970 A CN106933970 A CN 106933970A
- Authority
- CN
- China
- Prior art keywords
- block group
- block
- data
- group
- burning
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/1727—Details of free space management performed by the file system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/1805—Append-only file systems, e.g. using logs or journals to store data
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Quality & Reliability (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a kind of method and apparatus of fast writing data to EXT subregions, methods described generates corresponding image file with the actual size of EXT subregions, when burning is carried out, block erasing treatment is first done to the whole district, for the block group of the data that are stored with data block, still by whole block group burning;For there is no data storage in data block but meeting the first pre-conditioned block group, the superblock and block group descriptor of the burning block group;For there is no data storage in data block and being unsatisfactory for the first pre-conditioned block group, then not burning block group.Compared to by the mode of whole image file burning (will each piece of group all burning one by one), this programme greatly reduces the data volume of burning, while carrying out Resize operations without to subregion when starting first time, is conducive to improving burning efficiency.
Description
Technical field
The present invention relates to computer technology security fields, the method for more particularly to a kind of fast writing data to EXT subregions
And device.
Background technology
At present, burning data mainly has following two to the method for unformatted EXT subregions:The first is according to EXT points
The actual size in area generates the image file of customized content, then image file is burned onto in EXT subregions.Due to the mirror image for generating
File is often larger, causes that recordable time is long, burning inefficiency.Another kind is according to the customized content size generation for treating burning
Image file, then the image file of generation is burned onto in EXT subregions.It is right to be needed when starting first time in this way
EXT subregions do Resize operations, will have a strong impact on the startup time of first time.
The content of the invention
For this reason, it may be necessary to provide a kind of technical scheme of fast writing data to EXT subregions, it is used to solve existing burning number
According to the method burning efficiency to EXT it is low, start the time it is long the problems such as.
To achieve the above object, the method for inventor providing a kind of fast writing data to EXT subregions, methods described bag
Include following steps:
According to EXT subregion capacity, will treat that burning data is generated as the image file of EXT zoned formats, the image file
Including multiple block groups, each piece of group one piece of group sequence number of correspondence, each piece of group includes superblock, block group descriptor, bitmap block sum
According to block;
Function is wiped using block, whole EXT partition datas are wiped;
The superblock and block group descriptor of backup block group;
One bitmap block of block group of image file is read, whether the data that are stored with the data block of the block group are judged, if
The block group is then burned onto the corresponding burning position of the block group in EXT subregions, otherwise judge current block group block group sequence number whether
Meet first pre-conditioned, if then current block group in the superblock of burning current block group and block group descriptor to EXT subregions
Corresponding burning position, otherwise not burning current block group;
The next piece of bitmap block of the block group of group sequence number is read, whether the data that are stored with the data block of the block group are judged, if
That the block group is burned onto the corresponding burning position of the block group in EXT subregions, otherwise judge the block group block group sequence number whether
Meet first pre-conditioned, if then block group correspondence in superblock and block group descriptor to the EXT subregions of the burning block group
Burning position, otherwise not burning block group;Above-mentioned steps are performed, until traveling through all pieces of groups of image file, burning terminates.
Further, described first it is pre-conditioned including:The power of block group serial number 3,5,7.
Further, the image file of the EXT zoned formats includes EXT2 image files, EXT3 image files and EXT4
Image file.
Further, the described piece of positive integer of 0~n-1 of group serial number, the block group sequence number between adjacent block group increases successively,
N is the block group number included by image file.
Further, each block group includes multiple data blocks and a bitmap block, described " to read one block group of image file
Bitmap block, judge the data that whether are stored with the data block of the block group " include:Whether the bitmap block for judging the block group is complete
Zero, there is no data storage if then judging all data blocks of the block group, otherwise judge at least one data block in the block group
Be stored with data.
Inventor additionally provides a kind of device of fast writing data to EXT subregions, and described device is given birth to including image file
Into unit, erasing unit, backup units, judging unit and burning unit;The judging unit includes the first judging unit and the
Two judging units;
The image file generation unit is used for according to EXT subregion capacity, will treat that burning data is generated as EXT zoned formats
Image file, the image file includes multiple block groups, each piece of group one piece of group sequence number of correspondence, and each piece of group includes super
Block, block group descriptor, bitmap block and data block;
The erasing unit is used to wipe function using block, wipes whole EXT partition datas;
The backup units are used for the superblock and block group descriptor of backup block group;
First judging unit is used to read one bitmap block of block group of image file, in judging the data block of the block group
Whether be stored with data, if then burning unit is used to for the block group to be burned onto the corresponding burning position of the block group in EXT subregions,
Otherwise described second judging unit is used to judge whether the block group sequence number of current block group to meet first pre-conditioned, if then burning
Unit is used for the corresponding burning position of current block group in the superblock of burning current block group and block group descriptor to EXT subregions,
Otherwise not burning current block group;
First judging unit is additionally operable to read the next piece of bitmap block of the block group of group sequence number, judges the data of the block group
Whether data, if then burning unit is used to for the block group to be burned onto the corresponding burning of block group in EXT subregions if being stored with block
Position, otherwise described second judging unit is used to judge whether the block group sequence number of the block group to meet first pre-conditioned, if then
Burning unit is used for the corresponding burning position of the block group in the superblock of the burning block group and block group descriptor to EXT subregions,
Otherwise not burning block group;Above-mentioned steps are performed, until traveling through all pieces of groups of image file, burning terminates.
Further, described first it is pre-conditioned including:The power of block group serial number 3,5,7.
Further, the image file of the EXT zoned formats includes EXT2 image files, EXT3 image files and EXT4
Image file.
Further, the described piece of positive integer of 0~n-1 of group serial number, the block group sequence number between adjacent block group increases successively,
N is the block group number included by image file.
Further, each block group includes multiple data blocks and a bitmap block, and described " the first judging unit is used to read
Whether one bitmap block of block group of image file, judges the data that are stored with the data block of the block group " include:First judging unit
Whether the bitmap block for judging the block group is complete zero, does not have data storage if then judging all data blocks of the block group, no
Then judge in the block group that at least one data block is stored with data.
Fast writing data described in above-mentioned technical proposal to EXT subregions method and apparatus, methods described includes following
Step:First according to EXT subregion capacity, will treat that burning data is generated as the image file of EXT zoned formats;Then wiped using block
Except function, the superblock and block group descriptor of the whole EXT partition datas of erasing, and backup block group;Then read image file one
Whether the bitmap block of individual block group, judges the data that are stored with the data block of the block group, if the block group then is burned onto into EXT subregions
In the corresponding burning position of the block group, otherwise judge whether the block group sequence number of current block group meets first pre-conditioned, if then
The corresponding burning position of current block group, does not burn otherwise in superblock and block group descriptor to the EXT subregions of burning current block group
Record current block group;Above-mentioned steps are performed, until traveling through all pieces of groups of image file, burning terminates.The present invention is by wiping work(
Can replace not needing the write operation of data, and data and meet first pre-conditioned for not being stored with image file
Block group, a burning corresponding superblock of block group and block group descriptor, compared to the mode of whole burning block group one by one, significantly
Burning efficiency is improve, recordable time is shortened.
Brief description of the drawings
The fast writing data that Fig. 1 is related to for an embodiment of the present invention to the method for EXT subregions flow chart;
The fast writing data that Fig. 2 is related to for an embodiment of the present invention to the device of EXT subregions signal;
The structural representation of the image file that Fig. 3 is related to for an embodiment of the present invention;
Description of reference numerals:
101st, image file generation unit;
102nd, unit is wiped;
103rd, backup units;
104th, judging unit;111st, the first judging unit;112nd, the second judging unit;
105th, burning unit.
Specific embodiment
To describe technology contents, structural feature, the objects and the effects of technical scheme in detail, below in conjunction with specific reality
Apply example and coordinate accompanying drawing to be explained in detail.
Fig. 1 is referred to, the flow chart of the method for the fast writing data described in an embodiment of the present invention to EXT subregions.
Methods described can be run on the electronic equipment calculated with processing function, and the electronic equipment can be a host computer,
Such as computer.Host computer specifically includes the following steps when burning data is to EXT subregions:
Step S101 is initially entered according to EXT subregion capacity, will treat that burning data is generated as the mirror image text of EXT zoned formats
Part.Image file can be stored on the hard disk of host computer, in order to subsequent operation.As shown in figure 3, the image file includes
Multiple block groups (Block Group), one piece of group sequence number of each piece of group (Block Group) correspondence (is 0~n in Fig. 3, represents block
Group sequence number is followed successively by 0~n n+1 block group altogether), each piece of group includes superblock (super Block), block group descriptor
(GDT), bitmap block (Block Bitmap), index node bitmap (inode Bitmap), index node table (inode Table)
With data block (Data Blocks).
Wherein, superblock (super Block) is located at the foremost of block group, and its effect is the big of storage file system
Block that is small, empty and filling up, and their own sum and other such information,
The catalogue of main description file system and the static distribution situation of file, and the various compositions for describing file system
Size, quantity of structure etc..Block group descriptor table (GDT) is referred to as a group description table, and it is located at next piece of superblock
Number, it is the Global Information for being specifically used to describe the block group in EXTX file system.Bitmap block (Block Bitmap) have recorded
Whether all data blocks have the situation of the data that are stored with current block group, and usual block group descriptor has multiple positions, and each is used for
Whether a data block is stored with data in characterizing block group, for example, can be represented with " 1 " or " 0 ", when in block group descriptor
When a certain position is " 1 ", represents and be stored with the corresponding data block of this data;Conversely, when a certain position in block group descriptor is
When " 0 ", represent in the corresponding data block of this there is no data storage.Index node bitmap (inode Bitmap) and index node
Table (inode Table) is used to be indexed different pieces of information block in a block group, so as to learn the number of each data block
According to storage condition.Data block (Data Blocks) is used for data storage.
Then enter step S102 and wipe function using block, wipe whole EXT partition datas.Function is wiped by block first will
File in EXT subregions is emptied, and so when in the data block in judging a certain piece of group with the presence or absence of there is data, would not be subject to
The interference of the original data being stored with of EXT subregions, is easy to subsequent treatment.In the present embodiment, the mirror of the EXT zoned formats
As file includes EXT2 image files, EXT3 image files and EXT4 image files.
Then into the superblock and block group descriptor of step S103 backup block groups.For the number that is not stored with data block
According to but meet the first pre-conditioned block group for, based on related protocol, it is necessary to the superblock and block group of using the block group are retouched
Symbol is stated, so that both is backed up in advance, so as to follow-up burning.In the present embodiment, same mirror image text is belonged to
The different masses group of part is respectively provided with identical superblock and block group descriptor, so, backup when be only backed up a superblock and
Block group descriptor, the superblock and block group descriptor of backup can be stored in the hard disk of host computer, naturally it is also possible to deposited
Storage is in other movable storage devices.
Then enter step S104 and read one bitmap block of block group of image file, judge in the data block of the block group whether
Be stored with data, if the corresponding burning position of the block group during current block group to be then burned onto EXT subregions into step S107, no
Then judge whether the block group sequence number of current block group meets first pre-conditioned into step S105, if then enter step S106 burning
Record the corresponding burning position of current block group in the superblock and block group descriptor to EXT subregions of current block group, otherwise not burning
Current block group.
In the present embodiment, each block group includes multiple data blocks and a bitmap block, described " to read image file one
Whether the bitmap block of individual block group, judges the data that are stored with the data block of the block group " include:Judge the block group bitmap block whether
It is complete zero, does not have data storage if then judging all data blocks of the block group, otherwise judges at least one number in the block group
It is stored with data (judge the data block in the block group in be stored with data) according to block.For the block of the data that are stored with data block
, it is necessary to the whole block group of burning, i.e., the part including superblock, block group descriptor, bitmap block, data block etc. for group.For data
For there is no the block group of data storage in block, if it meets first pre-conditioned, need the block group part burning, specifically
It is the superblock and block group descriptor of the burning block group.In the present embodiment, the described piece of positive integer of 0~n-1 of group serial number,
Block group sequence number between adjacent block group increases successively, and n is the block group number included by image file, then described first is pre-conditioned
For:The power of block group serial number 3,5,7.Image file is that burning is carried out in units of block group being burned onto in EXT subregions, i.e., often
One piece of group has oneself corresponding burning position in EXT subregions, when the data that are not both stored with a certain piece of data block of group,
And the block group sequence number of the block group again for 3,5,7 power when, then just without the block group is burned onto in EXT subregions, i.e. the block
Burning position of the group in EXT subregions can be available, and then read the bitmap block of the corresponding next piece of group of sequence number of current block group,
To decide whether that next piece of group is burned onto in EXT subregions.
To judge whether all pieces of groups in image file travel through completion into step S108 after step S106 or S107, if
It is to terminate into step S110 burnings, otherwise enters step S109 and read the corresponding next piece of group of current block group sequence number, and
Step S104 to S107 is continued executing with, until all pieces of groups of image file travel through completion, terminates burning.
The above method generates corresponding image file with the actual size of EXT subregions, when burning is carried out, first the whole district is done
Block erasing is processed, for the block group of the data that are stored with data block, still by whole block group burning;For not having in data block
For having data storage but meeting the first pre-conditioned block group, the superblock and block group descriptor of the burning block group;For
There is no data storage in data block and be unsatisfactory for for the first pre-conditioned block group, then the not burning block group.Compared to will be whole
The mode (will each piece of group all burning one by one) of individual image file burning, this programme greatly reduces the data volume of burning, together
When first time start when carry out Resize operations without to subregion, be conducive to improve burning efficiency.
Fig. 3 is referred to, the schematic diagram of the device of the fast writing data described in an embodiment of the present invention to EXT subregions.
Described device is have the electronic equipment calculated with processing function, and the electronic equipment can be a host computer, such as computer.It is described
Device includes image file generation unit 101, erasing unit 102, backup units 103, judging unit 104 and burning unit 105;
The judging unit 104 includes the first judging unit 111 and the second judging unit 112;
The image file generation unit 101 is used for according to EXT subregion capacity, will treat that burning data is generated as EXT subregions
The image file of form, the image file includes multiple block groups, and each piece of group one piece of group sequence number of correspondence, each piece of group includes surpassing
Level block, block group descriptor, bitmap block and data block;
The erasing unit 102 is used to wipe function using block, wipes whole EXT partition datas;
The backup units 103 are used for the superblock and block group descriptor of backup block group;
First judging unit 111 is used to read one bitmap block of block group of image file, judges the data of the block group
Whether data, if then burning unit 105 is used to for the block group to be burned onto the corresponding burning of block group in EXT subregions if being stored with block
Record position, otherwise described second judging unit 112 is used to judge whether the block group sequence number of current block group to meet first pre-conditioned,
If then burning unit 105 is used for current block group in the superblock of burning current block group and block group descriptor to EXT subregions
Correspondence burning position, otherwise not burning current block group;
First judging unit 111 is additionally operable to read the next piece of bitmap block of the block group of group sequence number, judges the block group
Whether data, if the block group is corresponding during then burning unit 105 is used to for the block group to be burned onto EXT subregions if being stored with data block
Burning position, otherwise described second judging unit 112 is used to judge whether the block group sequence number of the block group to meet the first default bar
Part, if then burning unit 105 is used for block group correspondence in the superblock of the burning block group and block group descriptor to EXT subregions
Burning position, otherwise not burning block group;Above-mentioned steps are performed, until traveling through all pieces of groups of image file, burning terminates.
In the device using fast writing data to EXT subregions, image file generation unit 101 is according to EXT points first
Area's capacity, will treat that burning data is generated as the image file of EXT zoned formats.Image file can be stored in the hard disk of host computer
On, in order to subsequent operation.As shown in figure 3, the image file includes multiple blocks group (Block Group), each piece of group
One piece of group sequence number of (Block Group) correspondence (being 0~n in Fig. 3, represent that block group sequence number is followed successively by 0~n n+1 block group altogether),
Each piece of group includes superblock (super Block), block group descriptor (GDT), bitmap block (Block Bitmap), index node
Bitmap (inode Bitmap), index node table (inode Table) and data block (Data Blocks).
Wherein, superblock (super Block) is located at the foremost of block group, and its effect is the big of storage file system
Block that is small, empty and filling up, and their own sum and other such information, the mesh of main description file system
Record and the static distribution situation of file, and describe size, the quantity of various composition structures of file system etc..Block group descriptor
Table (GDT) is referred to as a group description table, and it is located at next piece number of superblock, and it is to be specifically used to description EXTX files system
The Global Information of the block group in system.Whether all data blocks have storage during bitmap block (Block Bitmap) have recorded current block group
There is the situation of data, usual block group descriptor there are multiple positions, whether a data block is stored with during each is used to characterize block group
Data, for example, can be represented with " 1 " or " 0 ", when a certain position in block group descriptor is " 1 ", represent the corresponding number of this
According to the data that are stored with block;Conversely, when a certain position in block group descriptor is " 0 ", representing in the corresponding data block of this and not having
There is data storage.Index node bitmap (inode Bitmap) and index node table (inode Table) are used for a block group
Middle different pieces of information block is indexed, so as to learn the data storage situation of each data block.Data block (Data Blocks)
For data storage.
Then erasing unit 102 wipes function using block, wipes whole EXT partition datas.Function is wiped by block first will
File in EXT subregions is emptied, and so when in the data block in judging a certain piece of group with the presence or absence of there is data, would not be subject to
The interference of the original data being stored with of EXT subregions, is easy to subsequent treatment.In the present embodiment, the mirror of the EXT zoned formats
As file includes EXT2 image files, EXT3 image files and EXT4 image files.
The then superblock and block group descriptor of the backup block group of backup units 103.For the number that is not stored with data block
According to but meet the first pre-conditioned block group for, based on related protocol, it is necessary to the superblock and block group of using the block group are retouched
Symbol is stated, so that both is backed up in advance, so as to follow-up burning.In the present embodiment, same mirror image text is belonged to
The different masses group of part is respectively provided with identical superblock and block group descriptor, so, backup when be only backed up a superblock and
Block group descriptor, the superblock and block group descriptor of backup can be stored in the hard disk of host computer, naturally it is also possible to deposited
Storage is in other movable storage devices.
Then the first judging unit 101 reads one bitmap block of block group of image file, in judging the data block of the block group
Whether data, if then current block group is burned onto the corresponding burning position of the block group in EXT subregions by burning unit 105 if being stored with
Put, otherwise the second judging unit 112 judges whether the block group sequence number of current block group meets first pre-conditioned, if burning unit
The corresponding burning position of current block group in the superblock and block group descriptor to EXT subregions of 105 burning current block groups, otherwise not
Burning current block group.
In the present embodiment, each block group includes multiple data blocks and a bitmap block, described " to read image file one
Whether the bitmap block of individual block group, judges the data that are stored with the data block of the block group " include:Judge the block group bitmap block whether
It is complete zero, does not have data storage if then judging all data blocks of the block group, otherwise judges at least one number in the block group
It is stored with data (judge the data block in the block group in be stored with data) according to block.For the block of the data that are stored with data block
, it is necessary to the whole block group of burning, i.e., the part including superblock, block group descriptor, bitmap block, data block etc. for group.For data
For there is no the block group of data storage in block, if it meets first pre-conditioned, need the block group part burning, specifically
It is the superblock and block group descriptor of the burning block group.In the present embodiment, the described piece of positive integer of 0~n-1 of group serial number,
Block group sequence number between adjacent block group increases successively, and n is the block group number included by image file, then described first is pre-conditioned
For:The power of block group serial number 3,5,7.Image file is that burning is carried out in units of block group being burned onto in EXT subregions, i.e., often
One piece of group has oneself corresponding burning position in EXT subregions, when the data that are not both stored with a certain piece of data block of group,
And the block group sequence number of the block group again for 3,5,7 power when, then just without the block group is burned onto in EXT subregions, i.e. the block
Burning position of the group in EXT subregions can be available, and then read the bitmap block of the corresponding next piece of group of sequence number of current block group,
To decide whether that next piece of group is burned onto in EXT subregions.
In the present embodiment, the judging unit also includes the 3rd judging unit.Complete when a certain piece of group burning or
After judging not burning, the 3rd judging unit is used to judge whether all pieces of groups in image file have traveled through completion, if then
Burning terminates, and will otherwise read the corresponding next piece of group of the block group sequence number in image file, and the first judging unit will continue to sentence
Whether next piece of group of breaking is stored with data, then the step of it is similar with the execution step of lastblock group, here is omitted, until
After all of piece of group of traversal, burning terminates.
Fast writing data described in above-mentioned technical proposal to EXT subregions method and apparatus, methods described includes following
Step:First according to EXT subregion capacity, will treat that burning data is generated as the image file of EXT zoned formats;Then wiped using block
Except function, the superblock and block group descriptor of the whole EXT partition datas of erasing, and backup block group;Then read image file one
Whether the bitmap block of individual block group, judges the data that are stored with the data block of the block group, if the block group then is burned onto into EXT subregions
In the corresponding burning position of the block group, otherwise judge whether the block group sequence number of current block group meets first pre-conditioned, if then
The corresponding burning position of current block group, does not burn otherwise in superblock and block group descriptor to the EXT subregions of burning current block group
Record current block group;Above-mentioned steps are performed, until traveling through all pieces of groups of image file, burning terminates.The present invention is by wiping work(
Can replace not needing the write operation of data, and data and meet first pre-conditioned for not being stored with image file
Block group, a burning corresponding superblock of block group and block group descriptor, compared to the mode of whole burning block group one by one, significantly
Burning efficiency is improve, recordable time is shortened.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality
Body or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or deposited between operating
In any this actual relation or order.And, term " including ", "comprising" or its any other variant be intended to
Nonexcludability is included, so that process, method, article or terminal device including a series of key elements not only include those
Key element, but also other key elements including being not expressly set out, or also include being this process, method, article or end
The intrinsic key element of end equipment.In the absence of more restrictions, limited by sentence " including ... " or " including ... "
Key element, it is not excluded that also there is other key element in the process including the key element, method, article or terminal device.This
Outward, herein, " it is more than ", " being less than ", " exceeding " etc. are interpreted as not including this number;" more than ", " below ", " within " etc. understand
It is to include this number.
It should be understood by those skilled in the art that, the various embodiments described above can be provided as method, device or computer program producing
Product.These embodiments can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Form.All or part of step in the method that the various embodiments described above are related to can be instructed by program correlation hardware come
Complete, described program can be stored in the storage medium that computer equipment can read, for performing the various embodiments described above side
All or part of step described in method.The computer equipment, including but not limited to:Personal computer, server, general-purpose computations
Machine, special-purpose computer, the network equipment, embedded device, programmable device, intelligent mobile terminal, intelligent home device, Wearable
Smart machine, vehicle intelligent equipment etc.;Described storage medium, including but not limited to:RAM, ROM, magnetic disc, tape, CD, sudden strain of a muscle
Deposit, USB flash disk, mobile hard disk, storage card, memory stick, webserver storage, network cloud storage etc..
The various embodiments described above are with reference to the method according to embodiment, equipment (system) and computer program product
Flow chart and/or block diagram are described.It should be understood that every during flow chart and/or block diagram can be realized by computer program instructions
The combination of flow and/or square frame in one flow and/or square frame and flow chart and/or block diagram.These computers can be provided
Programmed instruction is to the processor of computer equipment producing a machine so that by the finger of the computing device of computer equipment
Order is produced for realizing what is specified in one flow of flow chart or multiple one square frame of flow and/or block diagram or multiple square frames
The device of function.
These computer program instructions may be alternatively stored in the computer that computer equipment can be guided to work in a specific way and set
In standby readable memory so that instruction of the storage in the computer equipment readable memory is produced and include the manufacture of command device
Product, the command device is realized in one flow of flow chart or multiple one square frame of flow and/or block diagram or multiple square frame middle fingers
Fixed function.
These computer program instructions can be also loaded on computer equipment so that performed on a computing device a series of
Operating procedure is to produce computer implemented treatment, so that the instruction for performing on a computing device is provided for realizing in flow
The step of function of being specified in one flow of figure or multiple one square frame of flow and/or block diagram or multiple square frames.
Although being described to the various embodiments described above, those skilled in the art once know basic wound
The property made concept, then can make other change and modification to these embodiments, so embodiments of the invention are the foregoing is only,
Not thereby scope of patent protection of the invention, the equivalent structure that every utilization description of the invention and accompanying drawing content are made are limited
Or equivalent flow conversion, or other related technical fields are directly or indirectly used in, similarly it is included in patent of the invention
Within protection domain.
Claims (10)
1. a kind of fast writing data to EXT subregions method, it is characterised in that comprise the following steps:
According to EXT subregion capacity, will treat that burning data is generated as the image file of EXT zoned formats, the image file includes
Multiple block groups, each piece of group one piece of group sequence number of correspondence, each piece of group includes superblock, block group descriptor, bitmap block and data block;
Function is wiped using block, whole EXT partition datas are wiped;
The superblock and block group descriptor of backup block group;
One bitmap block of block group of image file is read, whether the data that are stored with the data block of the block group are judged, if then will
The block group is burned onto the corresponding burning position of the block group in EXT subregions, otherwise judges whether the block group sequence number of current block group meets
First is pre-conditioned, if then in the superblock of burning current block group and block group descriptor to EXT subregions current block group it is right
Answer burning position, otherwise not burning current block group;
The next piece of bitmap block of the block group of group sequence number is read, whether the data that are stored with the data block of the block group is judged, if then
The block group is burned onto the corresponding burning position of the block group in EXT subregions, otherwise judges whether the block group sequence number of the block group meets
First is pre-conditioned, if then corresponding burning of block group in superblock and block group descriptor to the EXT subregions of the burning block group
Record position, the otherwise not burning block group;Above-mentioned steps are performed, until traveling through all pieces of groups of image file, burning terminates.
2. fast writing data as claimed in claim 1 to EXT subregions method, it is characterised in that the described first default bar
Part includes:The power of block group serial number 3,5,7.
3. fast writing data as claimed in claim 1 to EXT subregions method, it is characterised in that the EXT zoned formats
Image file include EXT2 image files, EXT3 image files and EXT4 image files.
4. fast writing data as claimed in claim 1 to EXT subregions method, it is characterised in that described piece of group serial number 0
The positive integer of~n-1, the block group sequence number between adjacent block group increases successively, and n is the block group number included by image file.
5. fast writing data as claimed in claim 1 to EXT subregions method, it is characterised in that each block group include it is many
Individual data block and a bitmap block, it is described " to read one bitmap block of block group of image file, be in the data block for judging the block group
The no data that are stored with " include:Whether the bitmap block for judging the block group is complete zero, if then judging that all data blocks of the block group do not have
There is data storage, otherwise judge in the block group that at least one data block is stored with data.
6. a kind of fast writing data to EXT subregions device, it is characterised in that it is single that described device includes that image file is generated
Unit, erasing unit, backup units, judging unit and burning unit;The judging unit is sentenced including the first judging unit and second
Disconnected unit;
The image file generation unit is used for according to EXT subregion capacity, will treat that burning data is generated as the mirror of EXT zoned formats
As file, the image file includes multiple block groups, and each piece of group one piece of group sequence number of correspondence, each piece of group includes superblock, block
Group descriptor, bitmap block and data block;
The erasing unit is used to wipe function using block, wipes whole EXT partition datas;
The backup units are used for the superblock and block group descriptor of backup block group;
First judging unit is used to read one bitmap block of block group of image file, judge in the data block of the block group whether
Be stored with data, if then burning unit is used to for the block group to be burned onto the corresponding burning position of the block group in EXT subregions, otherwise
Second judging unit is used to judge whether the block group sequence number of current block group to meet first pre-conditioned, if then burning unit
For the corresponding burning position of current block group in superblock and block group descriptor to the EXT subregions of burning current block group, otherwise
Not burning current block group;
First judging unit is additionally operable to read the next piece of bitmap block of the block group of group sequence number, in judging the data block of the block group
Whether be stored with data, if then burning unit is used to for the block group to be burned onto the corresponding burning position of the block group in EXT subregions,
Otherwise described second judging unit is used to judge whether the block group sequence number of the block group to meet first pre-conditioned, if then burning list
Unit for the corresponding burning position of the block group in the superblock and block group descriptor to EXT subregions of the burning block group, otherwise not
The burning block group;Above-mentioned steps are performed, until traveling through all pieces of groups of image file, burning terminates.
7. fast writing data as claimed in claim 6 to EXT subregions device, it is characterised in that the described first default bar
Part includes:The power of block group serial number 3,5,7.
8. fast writing data as claimed in claim 6 to EXT subregions device, it is characterised in that the EXT zoned formats
Image file include EXT2 image files, EXT3 image files and EXT4 image files.
9. fast writing data as claimed in claim 6 to EXT subregions device, it is characterised in that described piece of group serial number 0
The positive integer of~n-1, the block group sequence number between adjacent block group increases successively, and n is the block group number included by image file.
10. fast writing data as claimed in claim 6 to EXT subregions device, it is characterised in that each block group include it is many
Individual data block and a bitmap block, described " the first judging unit is used to read one bitmap block of block group of image file, and judging should
Whether be stored with data in the data block of block group " include:Whether the bitmap block that the first judging unit is used to judge the block group is complete
Zero, there is no data storage if then judging all data blocks of the block group, otherwise judge at least one data in the block group
Block is stored with data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710074013.7A CN106933970B (en) | 2017-02-10 | 2017-02-10 | A kind of fast writing data to EXT subregion method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710074013.7A CN106933970B (en) | 2017-02-10 | 2017-02-10 | A kind of fast writing data to EXT subregion method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106933970A true CN106933970A (en) | 2017-07-07 |
CN106933970B CN106933970B (en) | 2019-11-22 |
Family
ID=59423115
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710074013.7A Active CN106933970B (en) | 2017-02-10 | 2017-02-10 | A kind of fast writing data to EXT subregion method and apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106933970B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107766067A (en) * | 2017-09-28 | 2018-03-06 | 福州瑞芯微电子股份有限公司 | A kind of lifting compressional mirror is as the method, storage medium and computer of replication rate |
CN110569218A (en) * | 2019-08-01 | 2019-12-13 | 厦门市美亚柏科信息股份有限公司 | offline modification method and device for EXT file system and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102792283A (en) * | 2010-02-26 | 2012-11-21 | Jvc建伍株式会社 | Processing device and write method |
CN102968422A (en) * | 2011-08-31 | 2013-03-13 | 中国航天科工集团第二研究院七○六所 | System and method for controlling streaming data storage |
CN103049350A (en) * | 2012-12-06 | 2013-04-17 | 浪潮(北京)电子信息产业有限公司 | Synchronous initializing method and device for remote replication system mirrored volume |
US8615500B1 (en) * | 2012-03-29 | 2013-12-24 | Emc Corporation | Partial block allocation for file system block compression using virtual block metadata |
CN104537050A (en) * | 2014-12-25 | 2015-04-22 | 华中科技大学 | Method for batch and rapid establishment of metadata and data of file system |
CN105989885A (en) * | 2015-03-18 | 2016-10-05 | 爱思开海力士有限公司 | Memory system and operating method thereof |
-
2017
- 2017-02-10 CN CN201710074013.7A patent/CN106933970B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102792283A (en) * | 2010-02-26 | 2012-11-21 | Jvc建伍株式会社 | Processing device and write method |
CN102968422A (en) * | 2011-08-31 | 2013-03-13 | 中国航天科工集团第二研究院七○六所 | System and method for controlling streaming data storage |
US8615500B1 (en) * | 2012-03-29 | 2013-12-24 | Emc Corporation | Partial block allocation for file system block compression using virtual block metadata |
CN103049350A (en) * | 2012-12-06 | 2013-04-17 | 浪潮(北京)电子信息产业有限公司 | Synchronous initializing method and device for remote replication system mirrored volume |
CN104537050A (en) * | 2014-12-25 | 2015-04-22 | 华中科技大学 | Method for batch and rapid establishment of metadata and data of file system |
CN105989885A (en) * | 2015-03-18 | 2016-10-05 | 爱思开海力士有限公司 | Memory system and operating method thereof |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107766067A (en) * | 2017-09-28 | 2018-03-06 | 福州瑞芯微电子股份有限公司 | A kind of lifting compressional mirror is as the method, storage medium and computer of replication rate |
CN110569218A (en) * | 2019-08-01 | 2019-12-13 | 厦门市美亚柏科信息股份有限公司 | offline modification method and device for EXT file system and storage medium |
CN110569218B (en) * | 2019-08-01 | 2021-11-23 | 厦门市美亚柏科信息股份有限公司 | Offline modification method and device for EXT file system and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106933970B (en) | 2019-11-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10108543B1 (en) | Efficient physical garbage collection using a perfect hash vector | |
CN104461390B (en) | Write data into the method and device of imbricate magnetic recording SMR hard disks | |
CN102629258B (en) | Repeating data deleting method and device | |
CN106201659B (en) | A kind of method and host of live migration of virtual machine | |
CN106874348B (en) | File storage and index method and device and file reading method | |
CN109726177A (en) | A kind of mass file subregion indexing means based on HBase | |
CN103914522A (en) | Data block merging method applied to deleting duplicated data in cloud storage | |
CN105677904B (en) | Small documents storage method and device based on distributed file system | |
CN103942292A (en) | Virtual machine mirror image document processing method, device and system | |
CN103744875B (en) | Data quick migration method and system based on file system | |
CN113064859B (en) | Metadata processing method and device, electronic equipment and storage medium | |
CN103699673B (en) | A kind of image processing method of mobile terminal, device and mobile terminal | |
CN107766374A (en) | The optimization method and system that a kind of mass small documents storage is read | |
CN103593447B (en) | Data processing method and device applied to database table | |
CN106569750A (en) | Data compression method and device | |
CN106933970A (en) | A kind of fast writing data to EXT subregions method and apparatus | |
CN104572492A (en) | Method and apparatus of burning data to FAT (File Allocation Table)32 partition | |
CN109684517A (en) | A kind of historical data storage method, reading/writing method, storage device and equipment | |
CN103210389B (en) | A kind for the treatment of method and apparatus of metadata | |
CN111176901A (en) | HDFS deleted file recovery method, terminal device and storage medium | |
CN114138424B (en) | Virtual machine memory snapshot generation method and device and electronic equipment | |
CN105260423A (en) | Duplicate removal method and apparatus for electronic cards | |
CN113467997A (en) | Data recovery method and device, mobile device and storage medium | |
CN106155878B (en) | Method and apparatus for the test environment for being created for software test in the database | |
CN103559106A (en) | Data backup method, device and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 350003 building, No. 89, software Avenue, Gulou District, Fujian, Fuzhou 18, China Patentee after: Ruixin Microelectronics Co., Ltd Address before: 350003 building, No. 89, software Avenue, Gulou District, Fujian, Fuzhou 18, China Patentee before: Fuzhou Rockchips Electronics Co.,Ltd. |