CN106033454A - Methods for formatting and processing virtual file system, and devices for formatting and processing virtual file system - Google Patents
Methods for formatting and processing virtual file system, and devices for formatting and processing virtual file system Download PDFInfo
- Publication number
- CN106033454A CN106033454A CN201510116899.8A CN201510116899A CN106033454A CN 106033454 A CN106033454 A CN 106033454A CN 201510116899 A CN201510116899 A CN 201510116899A CN 106033454 A CN106033454 A CN 106033454A
- Authority
- CN
- China
- Prior art keywords
- field
- file
- data
- meta
- block
- 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
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The invention provides methods for formatting and processing a virtual file system, and devices for formatting and processing a virtual file system. The method for formatting a virtual file system comprises: arranging a metadata region used to store metadata in a first continuous storage space; and arranging at least a data region used to store files in at least a second continuous storage space which is separated from the first continuous storage space, wherein the metadata region comprises a first filed and at least a second field, the second filed being used to store file index, and the first field being used to record association of file indexes.
Description
Technical field
The present invention relates to the field of Virtual File System, more particularly it relates to an virtual file
The formatting method of system, treating method and apparatus.
Background technology
Currently, the technology of so-called cloud computing becomes more and more popular.In the environment of cloud computing, generally, empty
Plan machine still uses the traditional file systems form of such as ext3, ext4, NTFS etc..But, tradition literary composition
The design of part system is based on disk and disk is that fixing immutable design pattern is carried out,
The characteristic of virtual disk cannot be utilized.
Specifically, when creating virtual machine, need the kind of first designated disk, such as SSD dish or
SATA disk etc., then, are formatted into the system of ext3, ext4 etc..Said method problematically,
First, described method needs the kind of the manual designated disk of user.Secondly as traditional file systems lattice
In formula, metadata mixes storage with data, therefore, along with the change of data scale, needs to enter accordingly
Row is changed frequently.Additionally, when disk carries out dilatation, need to suspend current ongoing business.
Summary of the invention
Because above-mentioned situation, the invention provides the formatting method of a kind of Virtual File System, process
Method and apparatus, the extension of the extension of metadata and data can be separated by it.And, described virtual
The formatting method of file system, treating method and apparatus accommodate multiple different types of the most simultaneously
Disk, and the performance of storage can be defined according to document directory structure.
According to one embodiment of the invention, it is provided that the formatting method of a kind of Virtual File System, including:
In the first Coutinuous store space, it is provided for storing the meta-data region of metadata;And with described first
At least one second Coutinuous store space that Coutinuous store space is separated arranges at least one for storing
The data field of file;Wherein, described meta-data region includes the first field and at least one second field, institute
Stating the second field to index for log file, described first field is for recording between described file index
Association.
Described meta-data region also includes the 3rd field for log, for recording described virtual file
4th field of the integrated information of system, for the 5th field of disc information and be used for recording institute
State the 6th field of the service condition of data field.
Described formatting method also includes: be provided for indicated number in the second field of described meta-data region
Designator according to the attribute of performance in district.
The quantity of described data field is multiple, and formatting method described in described formatting method also includes: connect
Receive the file storage instruction for storage one file;And based on described designator, determine for storing
State the data field of file.
Described meta-data region also includes for the 5th field of disc information with for recording described data field
The 6th field of service condition, described formatting method also includes: based on described 6th field, in institute
Determine in the data field storing described file, distribute the first data block;In described first data block
The block of the described file of middle write describes information, and described piece of description information includes the positional information of described file,
Described positional information at least includes data area number and data block number;Based on described positional information, distribution
Second data block;The file content of described file is write in described second data block;And amendment is described
5th field and described 6th field.
Described second field includes the block pointer for pointing to file, and described formatting method also includes: connect
Receive the file for reading file and read instruction;Read instruction based on described file, read described second word
Section, to obtain the block pointer of described file;Based on described block pointer, the block reading described file describes letter
Breath, described piece of description information includes that the positional information of described file, described positional information at least include data
District's numbering and data block number;And based on described positional information, read described file.
The association between described file index is represented by the side-play amount of described file index.
According to another embodiment of the present invention, it is provided that a kind of processing method for Virtual File System, bag
Include: receive for the first process order to meta-data region dilatation, wherein, described Virtual File System bag
Include be positioned at the first Coutinuous store space for storing the described meta-data region of metadata and being positioned at and institute
State the first Coutinuous store space be separated at least one second Coutinuous store space in for storing file
Data field, described meta-data region includes the first field and at least one second field, described second field
For recording the file index of described file, described first field is for recording between described file index
Association;Process order in response to first, increase second field in described meta-data region newly;And based on
Described the second newly-increased field, updates described first field.
Described meta-data region also includes the 3rd field for log, for recording described virtual file
4th field of the integrated information of system, for the 5th field of disc information and be used for recording number
The 6th field according to the service condition in district;Described processing method also includes: based on described the second newly-increased word
Section, updates described 4th field.
Described data field includes the 7th field of the integrated information for recording described data field, described process
Method also includes: receive for the second process order to data field dilatation;Order is processed in response to second,
Update described 7th field;And revise the length of described 6th field.
Described processing method also includes: receive the 3rd process order for increasing data field newly;In response to institute
State the 3rd process order, the separated with the first Coutinuous store space and the second Coutinuous store space the 3rd
A newly-increased data field being used for storing file in continuous space;One the 6th is increased newly in described meta-data region
Field;And update described 5th field.
According to another embodiment of the present invention, it is provided that the formatting mechanism of a kind of Virtual File System, including:
First arranges unit, is provided for storing the meta-data region of metadata in the first Coutinuous store space;With
And second arrange unit, second deposit continuously at least one being separated with described first Coutinuous store space
Storage arranges at least one for the data field storing file in space;Wherein, described meta-data region includes
One field and at least one second field, described second field indexes for log file, described first word
Section is for recording the association between described file index.
Described meta-data region also includes the 3rd field for log, for recording described virtual file
4th field of the integrated information of system, for the 5th field of disc information and be used for recording institute
State the 6th field of the service condition of data field.
Described formatting mechanism also includes: the 3rd arranges unit, in the second field of described meta-data region
It is provided for indicating the designator of the attribute of performance of data field.
Described formatting mechanism also includes: receive unit, receives the file storage for storage one file and refers to
Order;And determine unit, the quantity in described data field be multiple in the case of, based on described designator,
Determine the data field for storing described file.
Described meta-data region also includes for the 5th field of disc information with for recording described data field
The 6th field of service condition, described formatting mechanism also includes: the first allocation unit, based on described
6th field, determined by for storing in the data field of described file, distribute the first data block;The
One writing unit, the block writing described file in described first data block describes information, described piece of description
Information includes that the positional information of described file, described positional information at least include data area number and data block
Numbering;Second allocation unit, based on described positional information, distributes the second data block;Second writing unit,
The file content of described file is write in described second data block;And amendment unit, revise described
Five fields and described 6th field.
Described second field includes the block pointer for pointing to file, and described formatting mechanism also includes: the
Two receive unit, receive the file for reading file and read instruction;First reads unit, based on described
File reads instruction, reads described second field, to obtain the block pointer of described file;Second reads list
Unit, based on described block pointer, the block reading described file describes information, and described piece of description information includes institute
Stating the positional information of file, described positional information at least includes data area number and data block number;And
Third reading takes unit, based on described positional information, reads described file.
According to another embodiment of the present invention, it is provided that a kind of processing means for Virtual File System, bag
Include: first receives unit, receive for the first process order to meta-data region dilatation, wherein, described
Virtual File System includes the described metadata for storing metadata being positioned at the first Coutinuous store space
District and be positioned at described first Coutinuous store space be separated at least one second Coutinuous store space
In for storing the data field of file, described meta-data region includes the first field and at least one second word
Section, described second field is for recording the file index of described file, and described first field is used for recording institute
State the association between file index;First increases unit, processes order in response to first, at described unit number
Second field is increased newly according to district;And first updating block, based on described the second newly-increased field, more
The most described first field.
Described meta-data region also includes the 3rd field for log, for recording described virtual file
4th field of the integrated information of system, for the 5th field of disc information and be used for recording number
The 6th field according to the service condition in district;Described processing means also includes: the second updating block, based on institute
State the second newly-increased field, update described 4th field.
Described data field includes the 7th field of the integrated information for recording described data field, described process
Device also includes: second receives unit, receives for the second process order to data field dilatation;3rd
Updating block, processes order in response to second, updates described 7th field;And first amendment unit,
Revise the length of described 6th field.
Described processing means also includes: the 3rd receives unit, receives the 3rd process for increasing data field newly
Order;Second increase unit, in response to described 3rd process order, with the first Coutinuous store space and
The newly-increased data being used for storing file in the 3rd continuous space that second Coutinuous store space is separated
District;3rd increases unit, increases the 6th field newly in described meta-data region;And the 4th updating block,
Update described 5th field.
According to another embodiment of the present invention, it is provided that a kind of Virtual File System, including: meta-data region,
For storing metadata, and it is arranged in the first Coutinuous store space;And at least one data field,
For storing file, it is arranged at least one second company being separated with described first Coutinuous store space
In continuous memory space;Wherein, described meta-data region includes the first field and at least one second field, institute
Stating the second field to index for log file, described first field is for recording between described file index
Association.
In the formatting method of Virtual File System, treating method and apparatus of the embodiment of the present invention, logical
Cross and be stored in separated from one another to meta-data region and data field in two Coutinuous store spaces, it is possible to by unit's number
According to extension and the extension of data separate.And, the form of the Virtual File System of the embodiment of the present invention
Change method, treating method and apparatus can accommodate multiple different types of disk the most simultaneously.Additionally,
The formatting method of the Virtual File System of the embodiment of the present invention, treating method and apparatus are by metadata
The field in district is provided for indicating the designator of the attribute of performance of data field, it is possible to tie according to file directory
Structure and define the performance of storage, in other words, it is possible to when storing file according to the data disks for storing
Performance and select suitable dish, thus greatly improve the extensibility of Virtual File System, compatibility and
Motility.
Accompanying drawing explanation
Fig. 1 is the flow chart of the formatting method illustrating Virtual File System according to embodiments of the present invention;
Fig. 2 is the signal of the structure of the meta-data region of the formatting method of the diagram application embodiment of the present invention
Figure;
Fig. 3 is the flow chart of the processing method of the Virtual File System illustrating the embodiment of the present invention;
Fig. 4 is the frame of the main configuration of the formatting mechanism of the Virtual File System of the diagram embodiment of the present invention
Figure;And
Fig. 5 is the frame of the main configuration of the processing means of the Virtual File System of the diagram embodiment of the present invention
Figure.
Detailed description of the invention
The embodiment of the present invention is described in detail below with reference to accompanying drawing.
First, reference Fig. 1 is described the formatting method of Virtual File System according to embodiments of the present invention.
As it is shown in figure 1, the formatting method of the Virtual File System of the embodiment of the present invention includes two steps.
In first step S101, described formatting method is provided for storage unit in the first Coutinuous store space
The meta-data region of data.As known to those skilled, described metadata (metadaata) is to use
The essential information of the file in Virtual File System and file is described.Usually mix with data with metadata
The mode of miscellaneous storage is different, in the formatting method of the embodiment of the present invention, special, even by one piece
Continuous memory space (that is, described first Coutinuous store space) stores and states metadata.
On the other hand, in second step S102, described formatting method with described first Coutinuous store
At least one second Coutinuous store space that space is separated arranges at least one for the number storing file
According to district.
Specifically, described meta-data region includes the first field and at least one second field.Described second word
Section indexes for log file.It is to say, described second field is file index field, also referred to as rope
Draw node (indexNode) field.Described second field can record the information of each file, such as, wrap
Containing such as size, the time, the essential information of file type etc., and there is the pointer pointing to file content.
Described meta-data region can comprise one or more second field, for the index of the different file of record respectively.
The described quantity of the second field and the quantity of disk there is no one-to-one relationship, and can as required (as
When described meta-data region is inadequate) add the second independent field.
Described first field is for recording the association between described file index.Specifically, in an embodiment
In, described association is represented by the side-play amount of described file index.It is to say, described first field
The middle side-play amount recording described file index.In the present invention, it is directory entry by described first field definition
Routing information (DirPath).
More specifically, described first field can be with the distributed intelligence of recording indexes node.There is currently two
The situation of individual second field is example.If currently have two indexNode, an and indexNode
Numbered 0-10000, the numbered 10000-250000 of the 2nd indexNode, then in DirPath wrap
Containing two records: Article 1: index numbers: 0-10000, offset information (pos): 1024;Article 2:
Index numbers: 10000-250000, offset information pos:3324.When requiring to look up more than 10000 numberings
File time, then need to search from the record that Article 2 record shift quantity 3324 is initial.
Although it is pointed out that in above example and being described as a example by side-play amount, but, this
Skilled person is it is understood that the invention is not restricted to this, but can record its of described file index
His any suitable information, as long as it can be used to indicate that the association between described file index.
Thus, in the formatting method of the embodiment of the present invention, by two pieces of continuous logics separated from one another
Memory space stores described second field and described first field, i.e. file index and file rope
Association between drawing and side-play amount, thereby, it is possible to separate the extension of metadata and the extension of data.
Additionally, in another embodiment, in addition to the first field as above and the second field, described
Meta-data region can also include some other fields.Fig. 2 shows the form by the embodiment of the present invention
Change method and the schematic diagram of meta-data region structure after formatting.
As in figure 2 it is shown, described meta-data region comprises first field 204 and multiple second field 206-1
To 206-n.Additionally, described meta-data region such as could be included for log the 3rd field 201,
For recording the 4th field 202 of the integrated information of described Virtual File System, for disc information
5th field 203 and for record described data field service condition the 6th field 205-1 extremely
205-n。
Specifically, described 3rd field can be daily record (Journal) field, its log file system
Operation, is used for guaranteeing data security.
Described 4th field can be superblock (SB, Super Block) field, is used for recording whole literary composition
The integrated information of part system, such as space size, service condition etc..
Described 5th field can be disc information (DiskInfo) field, for describing involved disk
Information, such as, can comprise disk size, disk type, the position of BitMap (bitmap) as described below
Put.Specifically, when disk being carried out the operation of dilatation or interpolation etc., the described 5th can be revised accordingly
Field.Such as, when disk dilatation, a new BitMap position can be added, revise disk simultaneously
Size.When adding new disk, a new record also can be added.
Described 6th field can be bitmap as above (BitMap) field, is used for recording described number
Service condition according to district.Specifically, described 6th field is corresponding for carrying out flag data element by bit
Value.More specifically, in described 6th field, be in by the block using BitMap to describe correspondence
Use state or idle condition.
Additionally, in another embodiment, the quantity in described data field be multiple in the case of, described
Second field (that is, IndexNode) of meta-data region also can be provided for indicate the performance of data field to belong to
The designator of property.Thus, can be by considering that described designator selects suitable number when data store
According to dish.Specifically, described formatting method can receive the file storage instruction for storing a file.
Hereafter, described formatting method, based on described designator, determines the data field for storing described file.
More specifically, in one example, in the whole path of a certain file, can be with from current file
The attribute of performance of nearest catalogue is as the criterion.Thus, when attribute of performance is set to high, from all of data
Disk selects the first-selection that high performance disk stores as data.When being not provided with attribute of performance, select
Common disk.
In another example, in the whole path of a certain file, can be with the attribute of performance of root
Standard, and three the most high, medium and low attribute of performance are set.Thus, determine for storing described
During the data field of file, first-selected attribute of performance is high disk, secondary select attribute of performance be in disk.When
When above-mentioned two class disks are the most unavailable, selecting attribute of performance is low disk.
It is pointed out that the attribute of performance of above-described file is fixed then and attribute of performance really
Quantity and value be example.Those skilled in the art can use other various performances unlike those described above
Attribute is fixed then and varying number and the attribute of performance of value really, and it is within.
More specifically, when carrying out the write operation of file, described formatting method can be based on described
BitMap field, determine based on mode as above in the data field storing described file,
Distribute the first data block.Described formatting method can be based on described BitMap field, according to various principles
Distributing the first data block, it is known to those skilled in the art, is not described in detail in this.Hereafter, described lattice
Formula method can write the block of described file in described first data block and describe information.Described piece of description
Information includes the positional information of described file.Owing to can have in the formatting method of the embodiment of the present invention
Having multiple data field, therefore, described positional information not only includes that data block is numbered, and also includes that data field is compiled
Number.Hereafter, described formatting method is based on described positional information, and distribution is for the second number of file content
According to block, and in described second data block, write the file content of described file.In writing described file
After appearance, owing to capacity and the service condition of described data field have change, described formatting method correspondingly to repair
Change described DiskInfo field and described BitMap field.
On the other hand, when carrying out the read operation of file, due to described IndexNode field include for
Pointing to the block pointer of file, therefore, described formatting method is receiving the reading of the file for reading file
After instruction, instruction can be read based on described file, read described second field, thus obtain described
The block pointer of file.Hereafter, described formatting method, based on described block pointer, reads the block of described file
Description information.As it has been described above, described piece of description information includes the positional information of described file, described position
Information at least includes data area number and data block number.After obtaining the positional information of described file,
Described formatting method can read described file based on described positional information.
Above, see figures.1.and.2 and describe the form for Virtual File System of the embodiment of the present invention
Change method.In the formatting method of the embodiment of the present invention, by meta-data region and data field are divided each other
Liftoff it is stored in two Coutinuous store spaces, it is possible to the extension of metadata and the extension of data are separated.
And, the formatting method of the Virtual File System of the embodiment of the present invention, treating method and apparatus can be
System accommodates multiple different types of disk simultaneously.
Additionally, the formatting method of the Virtual File System of the embodiment of the present invention, treating method and apparatus are logical
Cross the designator being provided for indicating the attribute of performance of data field in the field of meta-data region, it is possible to according to
Document directory structure and define the performance of storage, in other words, it is possible to store according to being used for when storing file
The performance of data disks and select suitable dish, thus greatly improve Virtual File System extensibility,
Compatibility and motility.
It follows that the processing method being used for Virtual File System that the embodiment of the present invention will be described with reference to Fig. 3.
Fig. 3 is the flow chart of the processing method of the Virtual File System illustrating the embodiment of the present invention.At Fig. 3
In the Virtual File System of shown processing method, described Virtual File System includes that being positioned at first deposits continuously
Store up the described meta-data region being used for storing metadata in space and be positioned at and described first Coutinuous store sky
Between at least one second Coutinuous store space of being separated for storing the data field of file, described unit
Data field includes the first field and at least one second field, and described second field is used for recording described file
File index, described first field is for recording the association between described file index.
The meta-data region of described Virtual File System and data field and the concrete meaning of each field and set
Put and describe in detail in the described formatting method that sees figures.1.and.2, be not repeated at this.
As it is shown on figure 3, first, in step S301, described processing method receives for expanding meta-data region
The the first process order held.
It follows that in step S302, described processing method processes order in response to first, at described unit number
Second field, namely file index or index node field as above is increased newly according to district.Specifically,
After newly-increased index node field such as can be arranged on original index node field.And, described
Newly-increased index node field is co-located at as above first with original index node field and deposits continuously
In storage space.
Then, in step S303, described processing method, based on described the second newly-increased field, updates described
First field.Specifically, dividing due to the described first field record index node in the embodiment of the present invention
Cloth information, therefore, in the case of newly-increased index node, described processing method such as can be new by increasing
The distributed intelligence of index node and update described first field.Such as, there is currently two as above
In the case of individual second field, if newly-increased 3rd index node, the most described processing method will by
A newly-increased record (Article 3: index numbering 250000-500000, offset information: 8192) in DirPath
And update described first field.
Additionally, in another embodiment, above with reference to described in Fig. 1 and Fig. 2, described meta-data region is also wrapped
Include the 3rd field for log, for recording the 4th of the integrated information of described Virtual File System
The 6th of field, the 5th field for disc information and the service condition for recorded data zone
Field.In the case, when to meta-data region dilatation, described processing method is additionally based upon described newly-increased
Second field, updates described 4th field.It is to say, described processing method is based on described newly-increased
Two fields, update the integrated information of described Virtual File System.Such as, described processing method is based on described
The size of the second newly-increased field, updates the space size representing described Virtual File System in the 4th field
Information.The most such as, described processing method is additionally based upon the size of described the second newly-increased field and uses feelings
Condition, updates the information of the service condition representing described Virtual File System in described 4th field.
Further, in another embodiment, described processing method is possible not only to expand meta-data region
Appearance processes, it is also possible to data field is carried out dilatation process.Described data field includes for recording described data
7th field of the integrated information in district.That is, described 7th field is the SuperBlock word of described data field
Section, it such as defines the integrated information of capacity etc. of described data field.In the case, described process side
First method receives for the second process order to data field dilatation.Then, described processing method in response to
Second processes order, updates described 7th field.Specifically, described processing method is in response to described second
Processing order, determining will be to the capacity of described data field dilatation.Then, described processing method based on really
Fixed capacity, such as, update the information etc. representing capacity in described 7th field.It follows that described process
Method based on determined by capacity, amendment is for described 6th field of service condition of recorded data zone
The length of (that is, BitMap field).Thus, the processing method of the embodiment of the present invention achieves for number
Dilatation according to district.
Further, in the processing method of the embodiment of the present invention, it is possible not only to available data district is expanded
Hold, it is also possible to newly-increased data field.Specifically, in the case, described processing method can receive and be used for
3rd process order of newly-increased data field.Then, described processing method processes order in response to the described 3rd,
One is increased newly in the 3rd continuous space separated with the first Coutinuous store space and the second Coutinuous store space
The individual data field for storing file.It is to say, in the Virtual File System of the embodiment of the present invention,
Each data field is all located at individually, in continuous print memory space, and data field sets each other with meta-data region
Put to be completely separated, without setting alternating with each other.
Then, the processing method of the embodiment of the present invention according to the capacity of newly-increased data field and service condition,
The 6th field, namely BitMap field as above is increased newly, for record in described meta-data region
The service condition of newly-increased data field.The 6th field increased newly such as may be located at original 6th field
Afterwards.Additionally, described processing method is always according to the information of newly-increased data field, update described meta-data region
In the 5th field, i.e. disc information (DiskInfo) field.Thus, the process of the embodiment of the present invention
Method achieves the interpolation for data field.
Above, the formatting side of the Virtual File System of the embodiment of the present invention is described referring to figs. 1 through Fig. 3
Method and processing method.
In the formatting method of Virtual File System and processing method of the embodiment of the present invention, by by unit
Data field and data field are stored in two Coutinuous store spaces separated from one anotherly, it is possible to by the expansion of metadata
The extension of exhibition and data is separated.And, the formatting method of the Virtual File System of the embodiment of the present invention
Multiple different types of disk can be accommodated with processing method the most simultaneously.Additionally, the present invention implements
The formatting method of the Virtual File System of example and processing method are by arranging use in the field of meta-data region
Designator in the attribute of performance of instruction data field, it is possible to define the property of storage according to document directory structure
Can, in other words, it is possible to select suitably according to the performance of the data disks for storage when storage file
Dish, thus greatly improve the extensibility of Virtual File System, compatibility and motility.
The formatting mechanism of the Virtual File System of the embodiment of the present invention is described next, with reference to Fig. 4.
Fig. 4 is the frame of the main configuration of the formatting mechanism of the Virtual File System of the diagram embodiment of the present invention
Figure.As shown in Figure 4, the formatting mechanism 400 of the embodiment of the present invention includes: first arranges unit 401
Unit 402 is set with second.
Described first arranges unit 401 is provided for storing the unit of metadata in the first Coutinuous store space
Data field.
Described second arrange unit 402 be separated with described first Coutinuous store space at least one the
Two Coutinuous store spaces arrange at least one for the data field storing file;
Described meta-data region includes the first field and at least one second field, and described second field is used for remembering
Record file index, described first field is for recording the association between described file index.
In one embodiment, described meta-data region also includes the 3rd field for log, for remembering
Record the integrated information of described Virtual File System the 4th field, for disc information the 5th field,
And for recording the 6th field of the service condition of described data field.
In another embodiment, described formatting mechanism also includes: the 3rd arranges unit, at described unit number
According to second field in district is provided for indicating the designator of the attribute of performance of data field.
In another embodiment, described formatting mechanism also includes: receive unit, receives for storage one
The file storage instruction of file;And determine unit, the quantity in described data field be multiple in the case of,
Based on described designator, determine the data field for storing described file.
In another embodiment, described meta-data region also includes the 5th field and the use for disc information
In the 6th field of the service condition recording described data field, described formatting mechanism also includes: first point
Join unit, based on described 6th field, determined by the data field storing described file, point
Join the first data block;First writing unit, the block writing described file in described first data block describes
Information, described piece of description information includes the positional information of described file, and described positional information at least includes number
According to district's numbering and data block number;Second allocation unit, based on described positional information, distributes the second data
Block;Second writing unit, writes the file content of described file in described second data block;And repair
Change unit, revise described 5th field and described 6th field.
In another embodiment, described second field includes the block pointer for pointing to file, described form
Gasifying device also includes: second receives unit, receives the file for reading file and reads instruction;First reads
Take unit, read instruction based on described file, read described second field, to obtain the block of described file
Pointer;Second reads unit, and based on described block pointer, the block reading described file describes information, described
Block describe information include the positional information of described file, described positional information at least include data area number and
Data block is numbered;And third reading takes unit, based on described positional information, read described file.
The concrete configuration of each unit of described formatting mechanism and operation see figures.1.and.2 described
Formatting method in describe in detail, be not repeated at this.
The processing means of the Virtual File System of the embodiment of the present invention is described next, with reference to Fig. 5.
Fig. 5 is the frame of the main configuration of the processing means of the Virtual File System of the diagram embodiment of the present invention
Figure.As it is shown in figure 5, the processing means 500 of the embodiment of the present invention includes: the first reception unit 501,
First increases unit 502 and the first updating block 503.
Described first receives unit 501 receives for the first process order to meta-data region dilatation, wherein,
Described Virtual File System includes the described unit number for storing metadata being positioned at the first Coutinuous store space
According to district and to be positioned at least one second Coutinuous store being separated with described first Coutinuous store space empty
In between for storing the data field of file, described meta-data region include the first field and at least one second
Field, described second field is for recording the file index of described file, and described first field is used for record
Association between described file index.
Described first increases unit 502 processes order in response to first, increases one newly in described meta-data region
Second field.
Described first updating block 503, based on described the second newly-increased field, updates described first field.
In one embodiment, described meta-data region also includes the 3rd field for log, for remembering
Record the integrated information of described Virtual File System the 4th field, for disc information the 5th field,
And the 6th field of the service condition for recorded data zone;Described processing means also includes: second more
New unit, based on described the second newly-increased field, updates described 4th field.
In another embodiment, described data field includes of the integrated information for recording described data field
Seven fields, described processing means also includes: second receives unit, receives for the to data field dilatation
Two process order;3rd updating block, processes order in response to second, updates described 7th field;With
And first amendment unit, revise the length of described 6th field.
In another embodiment, described processing means also includes: the 3rd receives unit, receives and is used for increasing newly
3rd process order of data field;Second increases unit, processes order in response to the described 3rd, with the
In the 3rd continuous space that one Coutinuous store space and the second Coutinuous store space are separated, newly-increased one is used for
The data field of storage file;3rd increases unit, increases the 6th field newly in described meta-data region;With
And the 4th updating block, update described 5th field.
The concrete configuration of each unit of described processing means and operation are with reference to the process side described in Fig. 3
Method describes in detail, is not repeated at this.
In the formatting mechanism of Virtual File System and processing means of the embodiment of the present invention, by by unit
Data field and data field are stored in two Coutinuous store spaces separated from one anotherly, it is possible to by the expansion of metadata
The extension of exhibition and data is separated.And, the formatting mechanism of the Virtual File System of the embodiment of the present invention
Multiple different types of disk can be accommodated with processing means the most simultaneously.Additionally, the present invention implements
The formatting mechanism of the Virtual File System of example and processing means are by arranging use in the field of meta-data region
Designator in the attribute of performance of instruction data field, it is possible to define the property of storage according to document directory structure
Can, in other words, it is possible to select suitably according to the performance of the data disks for storage when storage file
Dish, thus greatly improve the extensibility of Virtual File System, compatibility and motility.
Above, formatting method according to embodiments of the present invention, process side are described referring to figs. 1 through Fig. 5
Method, formatting mechanism and processing means.
It should be noted that in this manual, term " include ", " comprising " or its any other
Variant is intended to comprising of nonexcludability, so that include the process of a series of key element, method, thing
Product or equipment not only include those key elements, but also include other key elements being not expressly set out, or
It is also to include the key element intrinsic for this process, method, article or equipment.There is no more restriction
In the case of, statement " including ... " key element limited, it is not excluded that including described key element
Process, method, article or equipment in there is also other identical element.
Furthermore, it is necessary to explanation, in this manual, similar " first ... unit ", " second ... single
Unit " statement distinguish only for convenient when describing, and be not meant to that it must be implemented as physical separation
Two or more unit.It is true that as required, described unit can be entirely implemented as a unit,
Multiple unit can also be embodied as.
Finally, in addition it is also necessary to explanation, above-mentioned a series of process not only include with order described here by
The process that time series performs, and include the place performed parallel or respectively rather than in chronological order
Reason.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive this
Bright can add the mode of required hardware platform by software and realize, naturally it is also possible to all be come by hardware
Implement.Based on such understanding, technical scheme background technology is contributed whole or
Part can embody with the form of software product, and this computer software product can be stored in storage and be situated between
In matter, such as ROM/RAM, magnetic disc, CD etc., instruct with so that a computer sets including some
Standby (can be personal computer, server, or the network equipment etc.) performs each embodiment of the present invention
Or the method described in some part of embodiment.
In embodiments of the present invention, units/modules can realize with software, in order to by various types of process
Device performs.For example, the executable code module of a mark can include of computer instruction
Or multiple physics or logical block, for example, it can be built as object, process or function.To the greatest extent
So, the executable code of identified module need not be physically located together pipe, but can include storage
Different instruction in not coordination, when combining in these command logics, its Component units/
Module and realize the regulation purpose of this units/modules.
When units/modules can utilize software to realize, it is contemplated that the level of existing hardware technique, so can
With units/modules implemented in software, in the case of not considering cost, those skilled in the art can
The hardware circuit building correspondence realizes the function of correspondence, and described hardware circuit includes the ultra-large of routine
Integrated (VLSI) circuit or gate array and the existing quasiconductor of such as logic chip, transistor etc
Or other discrete element.Module can also use programmable hardware device, such as field programmable gate
Array, programmable logic array, programmable logic device etc. realize.
Above the present invention is described in detail, the specific case principle to the present invention used herein
And embodiment is set forth, the method that the explanation of above example is only intended to help to understand the present invention
And core concept;Simultaneously for one of ordinary skill in the art, according to the thought of the present invention,
All will change in detailed description of the invention and range of application, in sum, this specification content should not
It is interpreted as limitation of the present invention.
Claims (20)
1. a formatting method for Virtual File System, including:
In the first Coutinuous store space, it is provided for storing the meta-data region of metadata;And
At least one second Coutinuous store space separated with described first Coutinuous store space is arranged
At least one is for storing the data field of file;
Wherein, described meta-data region includes the first field and at least one second field, described second field
Indexing for log file, described first field is for recording the association between described file index.
2. formatting method as claimed in claim 1, wherein, described meta-data region also includes for remembering
Record the 3rd field of daily record, for recording the 4th field of integrated information of described Virtual File System, use
In the 5th field of disc information and for recording the 6th field of the service condition of described data field.
3. formatting method as claimed in claim 1, also includes:
In the second field of described meta-data region, it is provided for indicating the instruction of the attribute of performance of data field
Symbol.
4. formatting method as claimed in claim 3, wherein, the quantity of described data field is multiple,
Described formatting method also includes:
Receive the file storage instruction for storage one file;And
Based on described designator, determine the data field for storing described file.
5. formatting method as claimed in claim 4, wherein, described meta-data region also includes for remembering
5th field of record dish information and for recording the 6th field of the service condition of described data field, described lattice
Formula method also includes:
Based on described 6th field, determined by the data field storing described file, distribution the
One data block;
The block writing described file in described first data block describes information, and described piece of description information includes
The positional information of described file, described positional information at least includes data area number and data block number;
Based on described positional information, distribute the second data block;
The file content of described file is write in described second data block;And
Revise described 5th field and described 6th field.
6. formatting method as claimed in claim 1, wherein, described second field includes for pointing to
The block pointer of file, described formatting method also includes:
Receive the file for reading file and read instruction;
Read instruction based on described file, read described second field, to obtain the block pointer of described file;
Based on described block pointer, the block reading described file describes information, and described piece of description information includes institute
Stating the positional information of file, described positional information at least includes data area number and data block number;And
Based on described positional information, read described file.
7. formatting method as claimed in claim 1, wherein, by the side-play amount of described file index
Represent the association between described file index.
8. for a processing method for Virtual File System, including:
Receive for the first process order to meta-data region dilatation, wherein, described Virtual File System bag
Include be positioned at the first Coutinuous store space for storing the described meta-data region of metadata and being positioned at and institute
State the first Coutinuous store space be separated at least one second Coutinuous store space in for storing file
Data field, described meta-data region includes the first field and at least one second field, described second field
For recording the file index of described file, described first field is for recording between described file index
Association;
Process order in response to first, increase second field in described meta-data region newly;And
Based on described the second newly-increased field, update described first field.
9. processing method as claimed in claim 8, wherein, described meta-data region also includes for record
3rd field of daily record, for record the integrated information of described Virtual File System the 4th field, for
5th field of disc information and the 6th field of the service condition for recorded data zone;
Described processing method also includes:
Based on described the second newly-increased field, update described 4th field.
10. processing method as claimed in claim 9, wherein, described data field includes for recording
Stating the 7th field of the integrated information of data field, described processing method also includes:
Receive for the second process order to data field dilatation;
Process order in response to second, update described 7th field;And
Revise the length of described 6th field.
11. processing methods as claimed in claim 9, also include:
Receive the 3rd process order for increasing data field newly;
In response to described 3rd process order, with the first Coutinuous store space and the second Coutinuous store space
A newly-increased data field being used for storing file in the 3rd continuous space being separated;
The 6th field is increased newly in described meta-data region;And
Update described 5th field.
The formatting mechanism of 12. 1 kinds of Virtual File Systems, including:
First arranges unit, is provided for storing the meta-data region of metadata in the first Coutinuous store space;
And
Second arranges unit, second continuous at least one being separated with described first Coutinuous store space
Memory space arranges at least one for the data field storing file;
Wherein, described meta-data region includes the first field and at least one second field, described second field
Indexing for log file, described first field is for recording the association between described file index.
13. formatting mechanism as claimed in claim 12, wherein, described meta-data region also include for
3rd field of log, for record the integrated information of described Virtual File System the 4th field,
For the 5th field of disc information and for recording the 6th word of the service condition of described data field
Section.
14. formatting mechanism as claimed in claim 12, also include:
3rd arranges unit, is provided for indicating the property of data field in the second field of described meta-data region
The designator of energy attribute;
First receives unit, receives the file storage instruction for storage one file;And
Determine unit, the quantity in described data field be multiple in the case of, based on described designator, really
The fixed data field for storing described file.
15. formatting mechanism as claimed in claim 14, wherein, described meta-data region also include for
5th field of disc information and for recording the 6th field of the service condition of described data field, described
Formatting mechanism also includes:
First allocation unit, based on described 6th field, determined by for storing the number of described file
According in district, distribute the first data block;
First writing unit, the block writing described file in described first data block describes information, described
Block describe information include the positional information of described file, described positional information at least include data area number and
Data block is numbered;
Second allocation unit, based on described positional information, distributes the second data block;
Second writing unit, writes the file content of described file in described second data block;And
Amendment unit, revises described 5th field and described 6th field.
16. formatting mechanism as claimed in claim 12, wherein, described second field includes for referring to
To the block pointer of file, described formatting mechanism also includes:
Second receives unit, receives the file for reading file and reads instruction;
First reads unit, reads instruction based on described file, reads described second field, to obtain
State the block pointer of file;
Second reads unit, based on described block pointer, reads the block of described file and describes information, described piece
Description information includes that the positional information of described file, described positional information at least include data area number sum
According to block number;And
Third reading takes unit, based on described positional information, reads described file.
17. 1 kinds of processing meanss for Virtual File System, including:
First receives unit, receives for the first process order to meta-data region dilatation, wherein, described
Virtual File System includes the described metadata for storing metadata being positioned at the first Coutinuous store space
District and be positioned at described first Coutinuous store space be separated at least one second Coutinuous store space
In for storing the data field of file, described meta-data region includes the first field and at least one second word
Section, described second field is for recording the file index of described file, and described first field is used for recording institute
State the association between file index;
First increases unit, processes order in response to first, increases second word in described meta-data region newly
Section;And
First updating block, based on described the second newly-increased field, updates described first field.
18. processing meanss as claimed in claim 17, wherein, described meta-data region also includes for remembering
Record the 3rd field of daily record, for recording the 4th field of integrated information of described Virtual File System, use
The 5th field in disc information and the 6th field of the service condition for recorded data zone;
Described processing means also includes:
Second updating block, based on described the second newly-increased field, updates described 4th field.
19. processing meanss as claimed in claim 18, wherein, described data field includes for recording
Stating the 7th field of the integrated information of data field, described processing means also includes:
Second receives unit, receives for the second process order to data field dilatation;
3rd updating block, processes order in response to second, updates described 7th field;And
First amendment unit, revises the length of described 6th field.
20. processing meanss as claimed in claim 18, also include:
3rd receives unit, receives the 3rd process order for increasing data field newly;
Second increases unit, processes order in response to the described 3rd, with the first Coutinuous store space and the
A newly-increased data field being used for storing file in the 3rd continuous space that two Coutinuous store spaces are separated;
3rd increases unit, increases the 6th field newly in described meta-data region;And
4th updating block, updates described 5th field.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510116899.8A CN106033454B (en) | 2015-03-17 | 2015-03-17 | Formatting method, processing method and device of virtual file system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510116899.8A CN106033454B (en) | 2015-03-17 | 2015-03-17 | Formatting method, processing method and device of virtual file system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106033454A true CN106033454A (en) | 2016-10-19 |
CN106033454B CN106033454B (en) | 2020-01-31 |
Family
ID=57150964
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510116899.8A Active CN106033454B (en) | 2015-03-17 | 2015-03-17 | Formatting method, processing method and device of virtual file system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106033454B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109388524A (en) * | 2018-10-09 | 2019-02-26 | 郑州云海信息技术有限公司 | The addressing method and computer readable storage medium of virtual disk format |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101382948A (en) * | 2008-10-14 | 2009-03-11 | 成都市华为赛门铁克科技有限公司 | File memory method, apparatus and system |
CN103617167A (en) * | 2013-10-22 | 2014-03-05 | 芜湖大学科技园发展有限公司 | Universal metadata/ relation mapping frame |
US20150032720A1 (en) * | 2013-07-23 | 2015-01-29 | Yahoo! Inc. | Optimizing database queries |
-
2015
- 2015-03-17 CN CN201510116899.8A patent/CN106033454B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101382948A (en) * | 2008-10-14 | 2009-03-11 | 成都市华为赛门铁克科技有限公司 | File memory method, apparatus and system |
US20150032720A1 (en) * | 2013-07-23 | 2015-01-29 | Yahoo! Inc. | Optimizing database queries |
CN103617167A (en) * | 2013-10-22 | 2014-03-05 | 芜湖大学科技园发展有限公司 | Universal metadata/ relation mapping frame |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109388524A (en) * | 2018-10-09 | 2019-02-26 | 郑州云海信息技术有限公司 | The addressing method and computer readable storage medium of virtual disk format |
Also Published As
Publication number | Publication date |
---|---|
CN106033454B (en) | 2020-01-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101719141B (en) | File processing method and system based on directory object | |
CN103902632B (en) | The method, apparatus and electronic equipment of file system are built in key assignments storage system | |
JP4669067B2 (en) | Dynamic fragment mapping | |
US20070162506A1 (en) | Method and system for performing a redistribute transparently in a multi-node system | |
CN103064639A (en) | Method and device for storing data | |
CN106095871A (en) | A kind of method and device setting up data base directory structure | |
CN105900093B (en) | A kind of update method of the tables of data of KeyValue databases and table data update apparatus | |
JP2005267600A5 (en) | ||
CN103177061A (en) | Unique value estimation in partitioned tables | |
CN102945212A (en) | Pooled partition layout and representation | |
CN102402602A (en) | B+ tree indexing method and device of real-time database | |
CN108804019A (en) | A kind of date storage method and device | |
CN103440301A (en) | Data multi-duplicate hybrid storage method and system | |
CN108021702A (en) | Classification storage method, device, OLAP database system and medium based on LSM-tree | |
CN105264488A (en) | Merging of sorted lists using array pair | |
CN103257987A (en) | Rule-based distributed log service implementation method | |
CN103246549A (en) | Method and system for data transfer | |
CN110399333A (en) | Delete method, equipment and the computer program product of snapshot | |
CN104462080B (en) | The index structure creation method and system of statistics are grouped for retrieval result | |
CN106383826A (en) | Database checking method and apparatus | |
CN106844491A (en) | A kind of write-in of ephemeral data, read method and write-in, reading device | |
CN103164172A (en) | Data flow storage method and device | |
CN106033454A (en) | Methods for formatting and processing virtual file system, and devices for formatting and processing virtual file system | |
CN101814064A (en) | Establishment method of report template, report generation method and report system | |
CN104133970A (en) | Data space management method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |