CN106033454B - Formatting method, processing method and device of virtual file system - Google Patents

Formatting method, processing method and device of virtual file system Download PDF

Info

Publication number
CN106033454B
CN106033454B CN201510116899.8A CN201510116899A CN106033454B CN 106033454 B CN106033454 B CN 106033454B CN 201510116899 A CN201510116899 A CN 201510116899A CN 106033454 B CN106033454 B CN 106033454B
Authority
CN
China
Prior art keywords
field
file
recording
data
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510116899.8A
Other languages
Chinese (zh)
Other versions
CN106033454A (en
Inventor
刘军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201510116899.8A priority Critical patent/CN106033454B/en
Publication of CN106033454A publication Critical patent/CN106033454A/en
Application granted granted Critical
Publication of CN106033454B publication Critical patent/CN106033454B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention provides formatting method and processing method of a virtual file system, and a formatting device and processing device of the virtual file system, wherein the formatting method comprises the steps of setting a metadata area for storing metadata in a th continuous storage space, and setting at least data areas for storing files in at least second continuous storage spaces separated from a th continuous storage space, wherein the metadata area comprises a th field and at least second fields, the second fields are used for recording file indexes, and the field is used for recording the association between the file indexes.

Description

Formatting method, processing method and device of virtual file system
Technical Field
The present invention relates to the field of virtual file systems, and more particularly, to a formatting method, a processing method and an apparatus for kinds of virtual file systems.
Background
Currently, a technique called cloud computing is becoming popular. In the context of cloud computing, typically, virtual machines still employ traditional file system formats such as ext3, ext4, NTFS, and the like. However, the conventional file system is designed based on a disk and the disk is in a fixed and unchangeable design mode, and the characteristics of the virtual disk cannot be utilized.
Specifically, in creating a virtual machine, it is necessary to first specify the kind of disk, such as an SSD disk or a SATA disk, and then format it into a system of ext3, ext4, and the like. The above method has a problem in that, first, the method requires the user to manually specify the kind of the disk. Secondly, since metadata and data are stored in a mixed manner in the conventional file system format, frequent changes are required correspondingly as the data size changes. In addition, when the disk is expanded, the currently ongoing service needs to be suspended.
Disclosure of Invention
In view of the above, the present invention provides formatting method, processing method and apparatus for a virtual file system, which can separate metadata extension and data extension, and which can accommodate a plurality of different types of disks in the system at the same time and can define storage performance according to a file directory structure.
According to an embodiment of the invention, a formatting method of a virtual file system is provided, which comprises the steps of setting a metadata area for storing metadata in a th continuous storage space, and setting at least data areas for storing files in at least second continuous storage spaces separated from the th continuous storage space, wherein the metadata area comprises fields and at least second fields, the second fields are used for recording file indexes, and the fields are used for recording the association between the file indexes.
The metadata area further includes a third field for logging, a fourth field for recording integrated information of the virtual file system, a fifth field for recording disc information, and a sixth field for recording usage of the data area.
The formatting method further comprises: an indicator for indicating a performance attribute of the data area is set in a second field of the metadata area.
The number of the data areas is multiple, the formatting method further comprises receiving a file storage instruction for storing the file, and determining the data areas for storing the file based on the indicator.
The metadata area further includes a fifth field for recording disc information and a sixth field for recording usage of the data area, and the formatting method further includes allocating th data blocks in the determined data area for storing the file based on the sixth field, writing block description information of the file in the th data block, the block description information including location information of the file, the location information including at least a data area number and a data block number, allocating a second data block based on the location information, writing file contents of the file in the second data block, and modifying the fifth field and the sixth field.
The second field includes a block pointer for pointing to a file, the formatting method further including: receiving a file reading instruction for reading a file; reading the second field based on the file reading instruction to obtain a block pointer of the file; reading block description information of the file based on the block pointer, wherein the block description information comprises position information of the file, and the position information at least comprises a data area number and a data block number; and reading the file based on the position information.
The association between the file indexes is represented by an offset of the file indexes.
According to another embodiment of the invention, there are provided processing methods for a virtual file system, including receiving a 0 th process command for expanding a metadata area, wherein the virtual file system includes the metadata area located in a 1 th contiguous storage space for storing metadata and a data area located in at least second contiguous storage spaces separate from the 38 th contiguous storage space for storing files, the metadata area includes -th fields and at least -th second fields for recording file indexes of the files, the -th fields are used for recording associations between the file indexes, responding to an th process command, adding second fields to the metadata area, and updating the -th field based on the added second fields.
The metadata area further includes a third field for logging, a fourth field for recording integrated information of the virtual file system, a fifth field for recording disc information, and a sixth field for recording usage of the data area; the processing method further comprises the following steps: updating the fourth field based on the newly added second field.
The data area includes a seventh field for recording integrated information of the data area, and the processing method further includes: receiving a second processing command for expanding the data area; updating the seventh field in response to a second process command; and modifying the length of the sixth field.
The processing method further includes receiving a third process command for newly adding a data area, newly adding data areas for storing files in a third contiguous space separate from the th contiguous storage space and the second contiguous storage space in response to the third process command, newly adding sixth fields in the metadata area, and updating the fifth fields.
According to another embodiment of the present invention, there is provided a formatting apparatus of virtual file system, including a setting unit that sets a metadata area for storing metadata in a th contiguous storage space, and a second setting unit that sets at least data areas for storing files in at least second contiguous storage spaces separate from the th contiguous storage space, wherein the metadata area includes a th field and at least second fields, the second fields are used for recording file indexes, and the th field is used for recording associations between the file indexes.
The metadata area further includes a third field for logging, a fourth field for recording integrated information of the virtual file system, a fifth field for recording disc information, and a sixth field for recording usage of the data area.
The formatting device further comprises: a third setting unit that sets an indicator indicating a performance attribute of the data area in a second field of the metadata area.
The formatting apparatus further includes a receiving unit that receives a file storage instruction for storing the file, and a determining unit that determines a data area for storing the file based on the indicator in a case where the number of the data areas is plural.
The meta data area further includes a fifth field for recording disc information and a sixth field for recording usage of the data area, the formatting device further includes an th allocation unit that allocates th data blocks in the determined data area for storing the file based on the sixth field, a th writing unit that writes block description information of the file in the th data blocks, the block description information including location information of the file, the location information including at least a data area number and a data block number, a second allocation unit that allocates second data blocks based on the location information, a second writing unit that writes file contents of the file in the second data blocks, and a modification unit that modifies the fifth field and the sixth field.
The second field comprises a block pointer for pointing to a file, the formatting device further comprises a second receiving unit for receiving a file reading instruction for reading the file, an th reading unit for reading the second field based on the file reading instruction to obtain the block pointer of the file, a second reading unit for reading block description information of the file based on the block pointer, the block description information comprising location information of the file, the location information comprising at least a data area number and a data block number, and a third reading unit for reading the file based on the location information.
According to another embodiment of the present invention, there is provided a processing apparatus for a virtual file system, including a 0 th receiving unit that receives a 1 th processing command for expanding a metadata area, wherein the virtual file system includes the metadata area for storing metadata located in a 2 th continuous storage space and a data area for storing a file located in at least 4 second continuous storage spaces separate from the 3 th continuous storage space, the metadata area includes -th fields and at least -th second fields, the second fields are used for recording file indexes of the file, the -th fields are used for recording associations between the file indexes, a -th adding unit that adds second fields to the metadata area in response to the th processing command, and a -th updating unit that updates the -th fields based on the added second fields.
The metadata area further includes a third field for logging, a fourth field for recording integrated information of the virtual file system, a fifth field for recording disc information, and a sixth field for recording usage of the data area; the processing apparatus further comprises: and the second updating unit is used for updating the fourth field based on the newly added second field.
The data area includes a seventh field for recording the integrated information of the data area, the processing apparatus further includes a second receiving unit that receives a second processing command for expanding the data area, a third updating unit that updates the seventh field in response to the second processing command, and an th modifying unit that modifies a length of the sixth field.
The processing apparatus further includes a third receiving unit receiving a third process command for newly adding a data area, a second adding unit newly adding data areas for storing files in a third contiguous space separate from the th contiguous storage space and the second contiguous storage space in response to the third process command, a third adding unit newly adding sixth fields in the metadata area, and a fourth updating unit updating the fifth fields.
According to another embodiment of the present invention, there are provided virtual file systems, including a metadata area for storing metadata and disposed in a th contiguous storage space, and at least data areas for storing files and disposed in at least second contiguous storage spaces separate from the th contiguous storage space, wherein the metadata area includes a th field and at least second fields for recording file indexes, and the th field is for recording associations between the file indexes.
In the formatting method, processing method and apparatus of a virtual file system according to an embodiment of the present invention, by storing the metadata area and the data area in two continuous storage spaces separately from each other, the extension of metadata and the extension of data can be separated. Moreover, the formatting method, the processing method and the device of the virtual file system in the embodiment of the invention can accommodate a plurality of different types of disks in the system at the same time. In addition, the formatting method, the processing method and the apparatus of the virtual file system according to the embodiments of the present invention can define the storage performance according to the file directory structure by setting the indicator for indicating the performance attribute of the data area in the field of the metadata area, in other words, can select an appropriate disk according to the performance of the data disk for storage when storing the file, thereby greatly improving the scalability, compatibility and flexibility of the virtual file system.
Drawings
FIG. 1 is a flowchart illustrating a formatting method of a virtual file system according to an embodiment of the present invention;
fig. 2 is a diagram illustrating a structure of a metadata area to which a formatting method of an embodiment of the present invention is applied;
FIG. 3 is a flow chart illustrating a method of processing a virtual file system of an embodiment of the present invention;
fig. 4 is a block diagram illustrating a main configuration of a formatting device of the virtual file system of the embodiment of the present invention; and
fig. 5 is a block diagram illustrating a main configuration of a processing device of the virtual file system of the embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
First, a formatting method of a virtual file system according to an embodiment of the present invention will be described with reference to fig. 1.
As shown in FIG. 1, the formatting method of the virtual file system of the embodiment of the present invention includes two steps, in step S101 of , the formatting method sets a metadata area for storing metadata in contiguous storage space As known to those skilled in the art, the metadata (metadata) is basic information for describing files and folders in the virtual file system, unlike the way that metadata is often stored in a mixed manner with data, the metadata is stored through blocks of contiguous storage space (i.e., the contiguous storage space).
In another aspect, in a second step S102, the formatting method sets at least data areas for storing files in at least second contiguous storage spaces separate from the th contiguous storage space.
The metadata area can contain or more second fields for recording the indexes of different files respectively, the number of the second fields has no corresponding relation with the number of disks, and independent second fields can be added according to needs (such as when the metadata area is insufficient).
Specifically, in the embodiment, the association is represented by an offset of the file index, namely, the offset of the file index is recorded in the th field, in the present invention, the th field is defined as directory entry path information (DirPath).
More specifically, the th field can record the distribution information of the index nodes, taking the case that there are two second fields currently as an example, if there are two indexnodes currently, and the indexNode number is 0-10000, the second indexNode number is 10000-250000, then there are two records contained in the DirPath, the th record number is 0-10000, the offset information (pos) is 1024, the second record number is 25010000-000, the offset information pos is 3324, when a file with a number greater than 10000 needs to be searched, it needs to search from the record beginning with the offset 3324 of the second record.
It should be noted that, although the above example is described by taking the offset as an example, it can be understood by those skilled in the art that the present invention is not limited thereto, and any other suitable information of the file indexes may be recorded as long as it can be used for representing the association between the file indexes.
Thus, in the formatting method of an embodiment of the present invention, the second field and the th field, i.e., the file index, and the association and offset between the file indexes are stored by two consecutive logical storage spaces separated from each other, whereby the extension of metadata and the extension of data can be separated.
In another embodiment, the metadata region may include fields in addition to the and second fields as described above, a schematic diagram of the structure of a metadata region formatted by the formatting method of an embodiment of the present invention is shown in FIG. 2.
As shown in fig. 2, the metadata area includes st fields 204 and a plurality of second fields 206-1 to 206-n. in addition, the metadata area may further include, for example, a third field 201 for recording a log, a fourth field 202 for recording integrated information of the virtual file system, a fifth field 203 for recording disc information, and sixth fields 205-1 to 205-n for recording use cases of the data area.
Specifically, the third field may be a Journal (Journal) field, which records operations of a file system for securing data.
The fourth field may be a Super Block (SB) field, and is used to record comprehensive information of the entire file system, such as space size, usage, and the like.
The fifth field may be a disk information (DiskInfo) field, which is used to describe information of the disk concerned, and may include, for example, a disk size, a disk type, a position of a BitMap (BitMap) as described below, and the like.
The sixth field may be a BitMap (BitMap) field as described above for recording the use of the data area. In particular, the sixth field is used to mark the value to which the data element corresponds by a bit. More specifically, in the sixth field, whether the corresponding block is in a use state or an idle state is described by using a BitMap.
In addition, in another embodiment, in the case that the number of the data areas is plural, an indicator for indicating a performance attribute of the data area may be further provided in the second field (i.e., IndexNode) of the metadata area, whereby an appropriate data disk may be selected by considering the indicator at the time of data storage.
More specifically, in the example, the performance attribute of the directory closest to the current file may be the priority in the entire path of a file.
In another example, the performance attributes of a root directory may be used as the criteria in the entire path of a file, and three performance attributes such as high, medium, and low may be set.
It is to be noted that the determination criteria of the performance attributes of the file and the number and values of the performance attributes described above are examples. Those skilled in the art will be able to employ various other criteria for determining the performance attributes than those described above, as well as different numbers and values of the performance attributes, all of which are within the scope of the present invention.
More specifically, when a write operation of a file is performed, the formatting method may allocate th data blocks in a data area for storing the file determined based on the above-described manner based on the BitMap field, the formatting method may allocate th data blocks according to various principles, which are known to those skilled in the art and will not be described in detail herein, after that, the formatting method may write block description information of the file in the th data block, the block description information including location information of the file.
In another aspect , in a file read operation, the IndexNode field includes a block pointer for pointing to a file, so the formatting method may read the second field based on a file read instruction after receiving the file read instruction to obtain the block pointer of the file.
In the above, the formatting method for the virtual file system according to the embodiment of the present invention is described with reference to fig. 1 and 2. In the formatting method of an embodiment of the present invention, by storing the metadata area and the data area in two continuous storage spaces separately from each other, the extension of metadata and the extension of data can be separated. Moreover, the formatting method, the processing method and the device of the virtual file system in the embodiment of the invention can accommodate a plurality of different types of disks in the system at the same time.
In addition, the formatting method, the processing method and the apparatus of the virtual file system according to the embodiments of the present invention can define the storage performance according to the file directory structure by setting the indicator for indicating the performance attribute of the data area in the field of the metadata area, in other words, can select an appropriate disk according to the performance of the data disk for storage when storing the file, thereby greatly improving the scalability, compatibility and flexibility of the virtual file system.
Next, a processing method for a virtual file system according to an embodiment of the present invention will be described with reference to fig. 3.
In the virtual file system of the processing method shown in fig. 3, the virtual file system includes the metadata area for storing metadata located in th contiguous storage space and a data area for storing files located in at least second contiguous storage spaces separate from the th contiguous storage space, the metadata area includes a th field and at least second fields, the second fields are used for recording file indexes of the files, and the th field is used for recording associations between the file indexes.
The specific meanings and settings of the metadata and data areas, and the respective fields of the virtual file system have been described in detail in the formatting method described with reference to fig. 1 and 2, and will not be repeated here.
As shown in fig. 3, first, in step S301, the processing method receives an th processing command for expanding a metadata area.
Next, in step S302, the processing method responds to the processing command by adding second fields, i.e., the file index or inode fields as described above, to the metadata region.
Then, in step S303, the processing method updates the th field based on the added second field, specifically, since the th field in the embodiment of the present invention records the distribution information of the index node, in the case of adding a new index node, the processing method can update the th field by, for example, adding the distribution information of the new index node, for example, in the case of two second fields currently existing as described above, if a third index node is added, the processing method will update the th field by adding records (third: index number 250000 and 500000, offset information: 8192) in DirPath.
In yet another embodiment , the metadata region further includes a third field for logging, a fourth field for recording aggregate information for the virtual file system, a fifth field for recording disk information, and a sixth field for recording usage of the data region, as described above with reference to FIGS. 1 and 2.
step, in another embodiment, the processing method may perform capacity expansion processing not only on the metadata area but also on the data area, the data area includes a seventh field for recording integrated information of the data area, i.e., the seventh field is a SuperBlock field of the data area, which defines integrated information of capacity and the like of the data area, for example.
Further , in the processing method of the embodiment of the invention, not only the capacity of the existing data area can be expanded, but also the data area can be added, specifically, in this case, the processing method can receive a third processing command for adding the data area, then, the processing method responds to the third processing command, and adds data areas for storing files in a third continuous space separate from the continuous storage space and the second continuous storage space.
Then, the processing method of the embodiment of the present invention adds new fields, i.e., the BitMap field as described above, to the metadata area according to the capacity and usage of the new data area, and the added sixth fields may be located after the original sixth fields.
In the above, the formatting method and the processing method of the virtual file system according to the embodiment of the present invention are described with reference to fig. 1 to 3.
In the formatting method and processing method of a virtual file system according to an embodiment of the present invention, by storing the metadata area and the data area in two continuous storage spaces separately from each other, the extension of metadata and the extension of data can be separated. Moreover, the formatting method and the processing method of the virtual file system in the embodiment of the invention can accommodate a plurality of different types of disks in the system at the same time. In addition, the formatting method and the processing method of the virtual file system according to the embodiments of the present invention can define the storage performance according to the file directory structure by setting the indicator for indicating the performance attribute of the data area in the field of the metadata area, in other words, can select an appropriate disk according to the performance of the data disk for storage when storing the file, thereby greatly improving the extensibility, compatibility, and flexibility of the virtual file system.
Next, a formatting apparatus of a virtual file system of an embodiment of the present invention will be described with reference to fig. 4.
Fig. 4 is a block diagram illustrating a main configuration of a formatting device of a virtual file system according to an embodiment of the present invention, as shown in fig. 4, the formatting device 400 according to an embodiment of the present invention includes an th setting unit 401 and a second setting unit 402.
The -th setting unit 401 sets a metadata area for storing metadata in the -th contiguous storage space.
The second setting unit 402 sets at least data areas for storing files in at least second continuous storage spaces separate from the th continuous storage space;
the metadata area comprises th field and at least second fields, the second fields are used for recording file indexes, and the th field is used for recording the association between the file indexes.
In the embodiment, the metadata area further includes a third field for logging, a fourth field for recording integrated information of the virtual file system, a fifth field for recording disc information, and a sixth field for recording usage of the data area.
In another embodiment, the formatting apparatus further includes a third setting unit that sets an indicator indicating a performance attribute of the data area in a second field of the metadata area.
In another embodiment, the formatting apparatus further includes a receiving unit receiving a file storage instruction for storing files, and a determining unit determining a data area for storing the files based on the indicator in a case that the number of the data areas is plural.
In another embodiment, the metadata area further includes a fifth field for recording disc information and a sixth field for recording usage of the data area, the formatting device further includes a allocation unit that allocates a th data block in the determined data area for storing the file based on the sixth field, a writing unit that writes block description information of the file in the th data block, the block description information including location information of the file, the location information including at least a data area number and a data block number, a second allocation unit that allocates a second data block based on the location information, a second writing unit that writes file content of the file in the second data block, and a modification unit that modifies the fifth field and the sixth field.
In another embodiment, the second field includes a block pointer for pointing to a file, the formatting device further includes a second receiving unit that receives a file read instruction for reading the file, a th reading unit that reads the second field based on the file read instruction to obtain a block pointer for the file, a second reading unit that reads block description information for the file based on the block pointer, the block description information including location information of the file, the location information including at least a data area number and a data block number, and a third reading unit that reads the file based on the location information.
The specific configuration and operation of each unit of the formatting device have been described in detail in the formatting method described with reference to fig. 1 and 2, and will not be repeated here.
Next, a processing apparatus of a virtual file system of an embodiment of the present invention will be described with reference to fig. 5.
Fig. 5 is a block diagram illustrating a main configuration of a processing device of a virtual file system of an embodiment of the present invention, as shown in fig. 5, the processing device 500 of an embodiment of the present invention includes an th receiving unit 501, a th adding unit 502, and a th updating unit 503.
The th receiving unit 501 receives a th processing command for expanding a metadata area, wherein the virtual file system includes the metadata area for storing metadata located in a th contiguous storage space and a data area for storing files located in at least second contiguous storage spaces separate from the th contiguous storage space, the metadata area includes th fields and at least second fields, the second fields are used for recording file indexes of the files, and the th field is used for recording associations between the file indexes.
The st add unit 502 adds second fields in the metadata area in response to the th process command.
The th updating unit 503 updates the th field based on the added second field.
In the embodiment, the metadata area further includes a third field for logging, a fourth field for recording synthetic information of the virtual file system, a fifth field for recording disk information, and a sixth field for recording usage of the data area, and the processing apparatus further includes a second updating unit that updates the fourth field based on the newly added second field.
In another embodiment, the data area includes a seventh field for recording the integrated information of the data area, and the processing apparatus further includes a second receiving unit receiving a second processing command for expanding the data area, a third updating unit updating the seventh field in response to the second processing command, and a th modifying unit modifying a length of the sixth field.
In another embodiment, the processing apparatus further includes a third receiving unit receiving a third process command for newly adding a data area, a second adding unit newly adding data areas for storing files in a third contiguous space separate from the contiguous storage space and the second contiguous storage space in response to the third process command, a third adding unit newly adding sixth fields to the metadata area, and a fourth updating unit updating the fifth fields.
The specific configuration and operation of the units of the processing apparatus have been described in detail in the processing method described with reference to fig. 3, and will not be repeated here.
In the formatting apparatus and the processing apparatus of the virtual file system of the embodiments of the present invention, by storing the metadata area and the data area in two continuous storage spaces separately from each other, the extension of metadata and the extension of data can be separated. Moreover, the formatting device and the processing device of the virtual file system of the embodiment of the invention can accommodate a plurality of different types of disks in the system at the same time. In addition, the formatting device and the processing device of the virtual file system according to the embodiments of the present invention can define the storage performance according to the file directory structure by setting the indicator for indicating the performance attribute of the data area in the field of the metadata area, in other words, can select an appropriate disk according to the performance of the data disk for storage when storing the file, thereby greatly improving the scalability, compatibility, and flexibility of the virtual file system.
The formatting method, the processing method, the formatting device and the processing device according to the embodiments of the present invention are described above with reference to fig. 1 to 5.
It should be noted that in this specification, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises an series of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
In addition, it should be noted that expressions like " … unit" and "second.
Finally, it should be noted that the -series processing described above includes not only processing performed in time series in the order described herein, but also processing performed in parallel or separately, rather than in time series.
Based on the understanding that the present invention will contribute to the background art, all or part of which may be embodied in the form of a software product that may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and that includes instructions for causing computer devices (which may be personal computers, servers, or network devices, etc.) to perform the methods described in the various embodiments or parts of the embodiments of the present invention.
identified modules of executable code may, for instance, comprise or more physical or logical blocks of computer instructions which may, for instance, be structured as objects, procedures, or functions, although, nevertheless, the executable code of the identified module need not be physically located at , but may comprise different instructions stored in different bits which, when logically combined at , constitute the unit/module and achieve the stated purpose for the unit/module.
Where elements/modules may be implemented in software, those skilled in the art can implement the corresponding functions by constructing corresponding hardware circuits comprising custom Very Large Scale Integration (VLSI) circuits or arrays and existing semiconductors such as logic chips, transistors, or other discrete components, without considering the cost, in view of the level of existing hardware technology, where elements/modules may be implemented in software, modules may also be implemented in programmable hardware devices such as field programmable arrays, programmable array logic, programmable logic devices, etc.
While the present invention has been described in detail, the principle and embodiments of the present invention have been illustrated by the specific examples and the description is only for the purpose of understanding the method and the core concept of the present invention, and meanwhile, the invention will not be limited by the content of the present description since the modifications of the specific embodiments and the application scope will occur to those skilled in the art based on the concept of the present invention.

Claims (19)

1, A formatting method of a virtual file system, comprising:
a metadata area for storing metadata is provided in the th contiguous storage space, and
at least data areas for storing files are provided in at least second continuous storage spaces separate from the th continuous storage space;
wherein the metadata area includes a th field for recording file indexes and at least th fields for recording associations between the file indexes, wherein the associations between the file indexes are represented by offsets of the file indexes, and the second fields and the th fields are stored by two blocks of contiguous logical storage spaces separated from each other.
2. The formatting method of claim 1, wherein the metadata area further comprises a third field for logging, a fourth field for recording integrated information of the virtual file system, a fifth field for recording disc information, and a sixth field for recording usage of the data area.
3. The formatting method of claim 1, further comprising:
an indicator for indicating a performance attribute of the data area is set in a second field of the metadata area.
4. The formatting method of claim 3, wherein the number of the data areas is plural, the formatting method further comprising:
receiving a file storage instruction for storing files, and
based on the indicator, a data area for storing the file is determined.
5. The formatting method of claim 4, wherein the metadata area further includes a fifth field for recording disc information and a sixth field for recording usage of the data area, the formatting method further comprising:
allocating th data block in the determined data area for storing the file based on the sixth field;
writing data block description information of the file, the block description information including location information of the file, the location information including at least a data area number and a data block number;
allocating a second data block based on the location information;
writing the file content of the file in the second data block; and
modifying the fifth field and the sixth field.
6. The formatting method of claim 1, wherein the second field includes a block pointer for pointing to a file, the formatting method further comprising:
receiving a file reading instruction for reading a file;
reading the second field based on the file reading instruction to obtain a block pointer of the file;
reading block description information of the file based on the block pointer, wherein the block description information comprises position information of the file, and the position information at least comprises a data area number and a data block number; and
and reading the file based on the position information.
7, A processing method for a virtual file system, comprising:
receiving a th process command for expanding a metadata area, wherein the virtual file system includes the metadata area for storing metadata located in a th contiguous storage space and a data area for storing a file located in at least second contiguous storage spaces separate from the th contiguous storage space, the metadata area including a th field for recording a file index of the file and at least second fields for recording an association between the file indexes, wherein the association between the file indexes is represented by an offset of the file index, and the second field and the th field are stored by two contiguous logical storage spaces separate from each other;
second fields are newly added to the metadata area in response to the th process command, and
updating the th field based on the newly added second field.
8. The processing method of claim 7, wherein the metadata area further comprises a third field for logging, a fourth field for recording integrated information of the virtual file system, a fifth field for recording disc information, and a sixth field for recording usage of the data area;
the processing method further comprises the following steps:
updating the fourth field based on the newly added second field.
9. The processing method of claim 8, wherein the data area includes a seventh field for recording integrated information of the data area, the processing method further comprising:
receiving a second processing command for expanding the data area;
updating the seventh field in response to a second process command; and
modifying a length of the sixth field.
10. The processing method of claim 8, further comprising:
receiving a third processing command for the newly added data area;
in response to the third process command, newly adding data areas for storing files in a third continuous space separate from the th continuous storage space and the second continuous storage space;
sixth fields are newly added in the metadata area, and
updating the fifth field.
A formatting apparatus of a virtual file system of , comprising:
an th setting unit that sets a metadata area for storing metadata in the th contiguous storage space, and
a second setting unit that sets at least data areas for storing files in at least second continuous storage spaces separate from the th continuous storage space;
wherein the metadata area includes a th field for recording file indexes and at least th fields for recording associations between the file indexes, wherein the associations between the file indexes are represented by offsets of the file indexes, and the second fields and the th fields are stored by two blocks of contiguous logical storage spaces separated from each other.
12. The formatting apparatus of claim 11, wherein the metadata area further comprises a third field for logging, a fourth field for recording integrated information of the virtual file system, a fifth field for recording disc information, and a sixth field for recording usage of the data area.
13. The formatting apparatus of claim 11, further comprising:
a third setting unit that sets an indicator indicating a performance attribute of the data area in a second field of the metadata area;
a th receiving unit receiving a file storage instruction for storing files, and
a determination unit that determines a data area for storing the file based on the indicator, in a case where the number of the data areas is plural.
14. The formatting apparatus of claim 13, wherein the metadata area further comprises a fifth field for recording disc information and a sixth field for recording usage of the data area, the formatting apparatus further comprising:
an allocation unit allocating, based on the sixth field, a th data block in the determined data area for storing the file;
an write unit writing block description information of the file in the data block, the block description information including location information of the file, the location information including at least a data area number and a data block number;
a second allocation unit that allocates a second data block based on the location information;
a second writing unit that writes the file content of the file in the second data block; and
a modification unit that modifies the fifth field and the sixth field.
15. The formatting apparatus of claim 11, wherein the second field comprises a block pointer for pointing to a file, the formatting apparatus further comprising:
a second receiving unit that receives a file reading instruction for reading a file;
an reading unit, reading the second field to obtain a block pointer of the file based on the file reading instruction;
a second reading unit configured to read block description information of the file based on the block pointer, where the block description information includes location information of the file, and the location information includes at least a data area number and a data block number; and
and a third reading unit that reads the file based on the position information.
16, a processing device for a virtual file system, comprising:
, a receiving unit, which receives processing command for expanding a metadata area, wherein the virtual file system includes the metadata area for storing metadata located in th contiguous storage space and a data area for storing files located in at least second contiguous storage spaces separate from the th contiguous storage space, the metadata area includes th field and at least second fields for recording file indexes of the files, the th field is for recording associations between the file indexes, wherein the associations between the file indexes are represented by offsets of the file indexes, and the second fields and the th field are stored by two contiguous logical storage spaces separate from each other;
an th addition unit for adding second fields in the metadata area in response to the th process command, and
an th updating unit for updating the th field based on the added second field.
17. The processing apparatus of claim 16, wherein the metadata area further comprises a third field for logging, a fourth field for recording integrated information of the virtual file system, a fifth field for recording disc information, and a sixth field for recording usage of the data area;
the processing apparatus further comprises:
and the second updating unit is used for updating the fourth field based on the newly added second field.
18. The processing apparatus as claimed in claim 17, wherein the data area includes a seventh field for recording integrated information of the data area, the processing apparatus further comprising:
a second receiving unit that receives a second processing command for expanding the data area;
a third updating unit that updates the seventh field in response to a second processing command; and
, a modification unit for modifying the length of the sixth field.
19. The processing apparatus of claim 17, further comprising:
a third receiving unit that receives a third processing command for newly adding a data area;
a second adding unit which adds new data areas for storing files in a third continuous space separate from the th continuous storage space and the second continuous storage space in response to the third processing command;
a third adding unit for adding sixth fields in the metadata area, and
and the fourth updating unit is used for updating the fifth field.
CN201510116899.8A 2015-03-17 2015-03-17 Formatting method, processing method and device of virtual file system Active CN106033454B (en)

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 CN106033454A (en) 2016-10-19
CN106033454B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109388524B (en) * 2018-10-09 2021-10-01 郑州云海信息技术有限公司 Virtual disk format addressing method and computer readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150032720A1 (en) * 2013-07-23 2015-01-29 Yahoo! Inc. Optimizing database queries

Patent Citations (2)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN106033454A (en) 2016-10-19

Similar Documents

Publication Publication Date Title
CN103064639B (en) Date storage method and device
US20200012646A1 (en) Pluggable storage system for distributed file systems
US10430398B2 (en) Data storage system having mutable objects incorporating time
EP2069979B1 (en) Dynamic fragment mapping
US7933938B2 (en) File storage system, file storing method and file searching method therein
US8682874B2 (en) Information processing system
CN102843403A (en) File processing method based on distributed file system, system, and client
CN107766374B (en) Optimization method and system for storage and reading of massive small files
JP2005267600A5 (en)
CN110147203B (en) File management method and device, electronic equipment and storage medium
CN107729558A (en) Method, system, device and the computer-readable storage medium that file system fragmentation arranges
CN107451138A (en) A kind of distributed file system storage method and system
WO2017090071A1 (en) Method and computer system for managing blocks
CN102253985B (en) File system data management method and system
CN106709014B (en) File system conversion method and device
US10698865B2 (en) Management of B-tree leaf nodes with variable size values
JP5517224B2 (en) Storage device
US10311026B2 (en) Compressed data layout for optimizing data transactions
CN106033454B (en) Formatting method, processing method and device of virtual file system
JP6634886B2 (en) Data storage device, data storage device control program, and data storage device control method
CN114297196B (en) Metadata storage method and device, electronic equipment and storage medium
CN115562595A (en) Volume creating method and device, volume reading and writing method and device, and electronic equipment
US8195696B2 (en) File format converting method
CN112988696B (en) File sorting method and device and related equipment
CN106980616A (en) A kind of mass small documents merge storage method and system

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