CN101882132A - Creating and reading method and device for virtual FAT file system - Google Patents

Creating and reading method and device for virtual FAT file system Download PDF

Info

Publication number
CN101882132A
CN101882132A CN200910083043XA CN200910083043A CN101882132A CN 101882132 A CN101882132 A CN 101882132A CN 200910083043X A CN200910083043X A CN 200910083043XA CN 200910083043 A CN200910083043 A CN 200910083043A CN 101882132 A CN101882132 A CN 101882132A
Authority
CN
China
Prior art keywords
virtual
file
bunch
fat
authentic document
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.)
Pending
Application number
CN200910083043XA
Other languages
Chinese (zh)
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.)
Beijing Igrs Yunshi Information Technology Co., Ltd.
Original Assignee
Shenzhen Igrs Information Technology 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 Shenzhen Igrs Information Technology Ltd filed Critical Shenzhen Igrs Information Technology Ltd
Priority to CN200910083043XA priority Critical patent/CN101882132A/en
Publication of CN101882132A publication Critical patent/CN101882132A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a creating and reading method and a device for a virtual FAT file system, wherein the creating method comprises the steps of creating a virtual directory and creating virtual files, wherein the step of creating the virtual files comprises the following processes: creating a directory item under a target directory of a target partition, modifying the directory item attribute file name into B, distributing continuous clusters in an FAT table of the target partition according to the size of a real file, and forming a cluster chain of the virtual files B. When the invention is adopted, a disk space with huge volume can be visited through the virtual FAT file system.

Description

The establishment of virtual FAT file system and read method and device
Technical field
The present invention relates to field of computer technology, relate in particular to establishment and the read method and the device of a kind of virtual FAT (File AllocationTable, file allocation table) file system.
Background technology
The FAT file system is that Microsoft is in issue at late 1970s to the beginning of the eighties, by the MS-DOS operation system support of Microsoft.In the process of FAT file system development, three versions of FAT12, FAT16 and FAT32 have appearred, wherein, the FAT12 file system is owing to have some fatal shortcomings, replaced by FAT16 very early, and FAT16 and FAT32 also are being extensive use of at present, particularly at the memory device of low capacity, and for example USB dish, SD card etc.
The principle of FAT file system can be described as a storage space piecemeal simply and be mapped in the table, thereby realizes the flexible domination to storage space.Each piece in the storage space is called as bunch, and the mapping table of storage space is known as the FAT table.An obvious difference of three kinds of FAT file system is exactly bunch of used figure place difference of expression in the FAT table, be respectively that the storage of 12,16 and 32 files needn't be continuous, but the form of available chained list links together file in the FAT table.
Because the FAT16 file system sharply descends in the efficient aspect the high capacity partition management, and the FAT32 file system has solved this file well, so at the bigdos management aspect, FAT32 is desirable file system.
Referring to Fig. 1, be FAT32 file system basic structure synoptic diagram.As seen, the FAT32 file system has structurally continued the basic structure of FAT file system, mainly is made up of following three parts:
DBR (Dos Boot Record, booting operating system recording areas) comprises jump instruction, manufacturer sign, os release number, BPB (Bios Parameter Block), expansion BPB, boot and end mark;
The FAT table, the mapping table in actual data storage space, FAT1 and FAT2 are in full accord, and FAT2 is the backup of FAT1;
The data field, i.e. the storage space of real data than FAT16, no longer includes special root directory space from bunches 2, handles but root directory also is used as a special file, and starting cluster is 2.
In addition, the FAT32 file system also comprises FDT (directory entry), and is not shown among Fig. 1.
Introduce of the management of FAT32 file system below to file.
Describe as file except all corresponding one group of data of All Files (sub-directory also exists as a kind of special file) of root directory, be called as the file directory item.The All Files in each file directory item and the file directory item of sub-directory all are stored in this catalogue corresponding memory space, each file directory item has 32 bytes, mainly comprises filename, file attribute, file size, file storage location and the description of a series of time etc.File path, file directory item and FAT are shown to link together just to hold the storage condition of a file at hard disk fully, can orient all the elements of file by following step:
(1) by the path find file place catalogue bunch;
(2) in the space of catalogue correspondence, compare filename, find file corresponding file directory entry;
(3) determine the starting cluster and the file size of file by the file directory item;
(4) determine file storing space according to bunch chain in the FAT table.
Summary of the invention
The present invention provides a kind of establishment and read method and device of virtual FAT file system based on standard FAT file system, thereby can realize visiting by virtual FAT file system the disk space of huge capacity.
For this reason, the embodiment of the invention adopts following technical scheme:
A kind of creation method of virtual FAT file system, for authentic document is created its corresponding virtual file under the target directory of target partition, this method comprises the step of creating virtual directory and creating virtual file, wherein, the step of described establishment virtual file comprises: the item that under the target directory of target partition, creaties directory, revise the title that the directory entry property file is called virtual file; In the FAT of target partition table, distribute continuous bunch according to the size of authentic document, constitute bunch chain of virtual file.
Before creating virtual directory, also comprise: after virtual FAT file system place device format is turned to the FAT32 system, only save contents in the data field of FAT32 system.
Describedly virtual FAT file system place device format is turned to the FAT32 system also comprise: the FAT table number of revised file system boot sector is 1.
Before virtual FAT file system place device format is turned to the FAT32 system, also comprise: revise the registration parameter of the driver of virtual FAT file system place equipment to the equipment of accesses virtual FAT file system.
Preferably, this method also comprises: the virtual cluster chain number and the authentic document table of comparisons of creating the corresponding relation comprise bunch chain number, bunch chain size and authentic document comspec.
Wherein, the step of described establishment virtual directory is carried out at preassigned disk space.
A kind of read method of virtual FAT file system, by reading the virtual file visit authentic document in the virtual FAT file system, this method comprises: receive the read operation request of virtual file, comprise sector number and size in this request; According to described sector number and search the parameter that described virtual FAT system obtains, calculate bunch chain number of virtual file; Search the virtual file bunch chain and the authentic document table of comparisons that generates in advance according to the size in described bunch of chain number and the described read operation request, obtain the comspec and the positional information of authentic document; According to the size in authentic document comspec and positional information and the described read operation request, determine the access path information of authentic document; According to described access path message reference authentic document.
Wherein, described according to described sector number and search the parameter that described virtual FAT system obtains, the detailed process that calculates bunch chain number of virtual file is: search the DBR of virtual FAT system, obtain reserve sector number, FAT table sector number and the every number of clusters in sector; Utilize described sector number, described reserve sector number, FAT table sector number and the every number of clusters in sector to calculate bunch chain number of virtual file.
Calculate bunch chain number of virtual file by following formula: bunch chain number=(sector number-reserve sector number-FAT shows the sector number)/every number of clusters in sector+2.
Wherein, describedly search the virtual file bunch chain and the authentic document table of comparisons that generates in advance according to described bunch of chain number and described size, the detailed process that obtains authentic document comspec and positional information is: search the virtual file bunch chain and the authentic document table of comparisons according to described bunch of chain number and size, determine that described bunch of chain number and size in starting cluster chain number and the determined space of bunch chain size, match the comspec of authentic document; Number calculate the sector number of starting cluster chain correspondence according to described reserve sector number, FAT table sector number, the every number of clusters in sector and starting cluster chain, calculate the positional information of authentic document according to the sector number of the sector number in the described read operation request, starting cluster chain correspondence.
A kind of creation apparatus of virtual FAT file system, for authentic document is created its corresponding virtual file under the target directory of target partition, this device comprises virtual directory creating unit and virtual file creating unit, wherein, described virtual file creating unit comprises: directory entry is created subelement, be used for the item that under the target directory of target partition, creaties directory, and revise the title of directory entry property file virtual file by name; Bunch chain creation subelement is used for distributing continuous bunch according to the size of authentic document at the FAT of target partition table, constitutes bunch chain of virtual file.
A kind of reading device of virtual FAT file system, read authentic document by the virtual file in the virtual FAT file system, this device comprises: read operation request receiving element, be used to receive the read operation request of virtual file, and comprise sector number and size in this request; Bunch chain determining unit is used for according to described sector number and searches the parameter that described virtual FAT system obtains, and calculates bunch chain number of virtual file; Authentic document path determining unit, be used for searching the virtual file bunch chain and the authentic document table of comparisons that generates in advance according to described bunch of chain number and described size, obtain the comspec and the positional information of authentic document, and, determine the access path information of authentic document according to the size in authentic document comspec and positional information and the described read operation request; The authentic document addressed location is used for according to described access path message reference authentic document.
By some network technologies, for example network storage agreement (ISCSI) can realize that certain or some disk partition of a machine A are mapped as certain subregion of machine B, and the file system of machine A is the complete file system normally, the metadata of include file system, catalogue and file data.The virtual FAT file system (FictFAT32) that the present invention realizes is the metadata and the catalogue of include file system only, and file data storing is in other subregion.FictFAT32 needs very little disk space, just can shine upon the file on the 32G physical disk usually in the space of 16M capacity.Be mapped completely to it in the memory headroom of certain embedded device by procotol, and the memory headroom of embedded device can be visited as the USB memory device by other main frame so long.By scheme provided by the invention, realized on some equipment (for example on the embedded device), visit huge capacity disk space by less memory headroom.
Description of drawings
Fig. 1 is a prior art FAT32 file system basic structure synoptic diagram;
Fig. 2 creates the method flow diagram of virtual FAT file system for the present invention;
Fig. 3 is virtual FAT file system of the present invention and standard FAT file system contrast synoptic diagram;
Fig. 4 reads the method flow diagram of virtual FAT file system for the present invention;
Fig. 5 reads the virtual FAT file system synoptic diagram for the present invention;
Fig. 6 is the application scenarios synoptic diagram of the embodiment of the invention;
Fig. 7 creates the apparatus structure synoptic diagram of virtual FAT file system for the present invention;
Fig. 8 reads the apparatus structure synoptic diagram of virtual FAT file system for the present invention.
Embodiment
At present to the use of FAT file system, all be the parsing from document cluster chain number to file sectors number, in application, certain the subregion P that requires map machines is to subregion Q, and subregion P and subregion Q adopt the FAT file system.Suppose that subregion Q only comprises FAT32 file system metadata and catalogue, do not comprise concrete file data, but write down the information (file comspec, side-play amount and size) of certain file on other subregions, this moment, subregion P just needed to support sector number to be converted to the operation of document misregistration amount.Because document misregistration and document cluster chain number also are one to one, promptly require on the FAT file system, to realize file sectors number parsing to document cluster chain number.The present invention proposes a file sectors number virtual FAT file system to the reverse visit of file data, and on this file system, only comprise catalogue (being used for constituent act), but the data of include file not, thus, by visiting this virtual FAT file system, can realize reading to data in the large capacity disc space.
The FAT32 file system of standard consists of the following components: DBR, FAT1, FAT2, FDT (catalogue listing) and data field, and the virtual FAT file system based on the FAT32 file system (FictFAT32) of the present invention structure does not comprise that the storage of file True Data, the True Data of file are to leave on other the Physical Extents.
For the ease of understanding the present invention, at first define following term:
Virtual partition (FictPart32): self-defining memory partitioning, only preserve DBR, catalogue listing, FAT1 and part disk space, wherein, so-called part disk space is meant and only is used for the shared disk space of storing directory;
Virtual FAT file system (FictFAT32): the file system that on FictPart32, realizes, the file system correspondence has increased the virtual file bunch chain and the authentic document table of comparisons newly therewith, thereby supports the file read operation;
Virtual file: the file in that virtual FAT file system FictFAT32 preserves, only distribute directory entry and disk allocation bunch chain for it in FictFAT32;
Virtual directory: the catalogue that virtual FAT file system FictFAT32 preserves, in FictFAT32, distribute directory entry, bunch chain and disk space for it.
Referring to Fig. 2, the method flow diagram for the present invention creates virtual FAT file system may further comprise the steps:
S201: the driver of revising FictFAT32 to be created place equipment to the equipment of visit FictFAT32 (for example: Digital Television) registration parameter, the equipment of feasible visit FictFAT32 (for example: Digital Television) see the dummy block will equipment of fixed size, for example 32G one by one;
Above-mentioned S201 step fundamental purpose is that the equipment of " deception " visit FictFAT32 (for example: Digital Television), make this access means think that FictFAT32 place equipment is the memory storage of similar USB.In fact, FictFAT32 place equipment is the computer system with CPU, for example ordinary PC or embedded device etc.
Need to prove that the S201 step is omissible.
S202: this FictFAT32 to be created place equipment of definition initialization according to the FirtFat32 file system becomes the FAT32 form, and, only comprise catalogue in the data field of FAT32 system, and do not comprise file;
Preferably, in formatting procedure, the FAT table number of revised file system boot sector is 1 (address offset 0 * 10), because the FAT2 table is generally used for the recovery of file system data, because FictFAT32 is a read-only file system, so in FictFAT32, dispense the FAT2 table to save disk space.
The process that establishment source file A (authentic document A) corresponding virtual file B is described below is (because source file is arranged in different devices with virtual file, therefore, these two file names can repeat), wherein, suppose that source file A is present under the M catalogue of subregion P, virtual file B is present under the N catalogue of FictFAT32 subregion Q.
S203: create virtual directory;
The FAT32 directory management is identical with ordinary file, and a sub-catalogue file also occupies the directory entry of 32 bytes in the FDT table.Because bibliographic structure need distribute disk space at FictFAT32 subregion Q, therefore, after File Directory Table FDT, for it reserves corresponding bunch of chain space (CS) and corresponding disk space (DS).FictFAT32 is when being the catalogue allocation space:
A, only search idle bunch chain number in the pre-bunch chain space (CS) that keeps, distribute to virtual directory and use;
B, each virtual directory all use different bunches, and the size of supposing each bunch is that (be generally 4K, 8K 16K), stores m virtual directory to nk, then needs the disk space of space m nk.The shared disk space (DD) of virtual directory need be on virtual partition FictPart32 actual allocated.
S204: create virtual file;
A, the item that creaties directory under the N catalogue of FictFAT32 subregion Q are revised directory entry attribute (byte offset 0 * 0 and 0 * 8), and file is called B;
B, according to the size of source file A, in the FAT1 of FictFAT32 subregion Q table for its distribution continuous bunch, constitute bunch chain of this file data correspondence.Number only distribution in document cluster chain space (FS) of bunch chain of file B.Number do not distribute concrete disk sector for bunch chain in document cluster chain space (FS), promptly do not have corresponding disk space.
The read operation of c, modification subregion.During certain sector on reading this subregion, according to the newly-increased virtual file bunch chain and the authentic document table of comparisons (follow-up introduction), the read operation of this file is redirected to the data reading operation of certain file on other subregion according to a tlv triple [authentic document comspec, position, size], other subregion can adopt file system such as FAT32 or NTFS.
As seen, catalogue bunch chain allocation scheme is different with document cluster chain allocation scheme, and the former need distribute actual disk space, and the latter does not need.
The so-called virtual file bunch chain and the authentic document table of comparisons, FictFAT32 generates simultaneously in establishment, comprise: the corresponding relation of virtual file bunch chain number, bunch chain size and authentic document comspec, can match [authentic document comspec] by [virtual file bunch chain number, bunch chain size], can realize visit then authentic document.
Referring to Fig. 3, for virtual FAT file system of the present invention and standard FAT file system contrast synoptic diagram, as seen, compare with standard FAT file system, virtual FAT file system has omitted FAT2, and, FAT1 is divided into two parts, part 1 is used for storage directory, part 2 is used for store file data, in addition, the data field of virtual FAT file system is storing directory only, and does not deposit file.
Thus, the equipment by visit FictFAT32 (for example: Digital Television) to FAT file system standard file access method, can determine the authentic document comspec on virtual partition, thereby realize visiting authentic document by virtual FAT file system.
Referring to Fig. 4, for the present invention reads the method flow diagram of virtual FAT file system, and please in conjunction with read virtual FAT file system synoptic diagram 5 referring to the present invention.
Fig. 4 comprises:
S401: receive the read operation request of virtual file, comprise sector number and size in this request;
S402: search FictFAT32, the DBR by FictFAT32 obtains parameter, utilizes the calculation of parameter of sector number and acquisition to obtain bunch chain number (formula 1 that concrete face is as follows introduced) of virtual file;
For standard FAT32 file system, bunch chain number is as follows to the computing formula of sector:
Sector number=reserve sector number+FAT sector number+(bunch chain number-2) every number of clusters in * sector
Thus, reverse sector number to bunch computing formula be:
Bunch chain number=(sector number-reserve sector number-FAT sector number)/every number of clusters in sector+2........ formula 1
That is, can try to achieve bunch chain number of this sector correspondence by certain sector number.
S403: utilize bunch chain number and bunch chain size to be key word, search the virtual file bunch chain and the authentic document table of comparisons, obtain authentic document comspec and positional information;
Referring to table 1, be an example of the virtual file bunch chain and the authentic document table of comparisons.
Table 1
Figure B200910083043XD0000081
In the virtual file bunch chain and the authentic document table of comparisons, defined certain virtual cluster chain number pairing file.Because when being file allocation bunch chain, bunch chain is normally continuous, so preferably, adopt two tuples [bunch chain number, bunch chain size] to represent one section bunch of chain of a file, can save the space.This virtual file bunch chain and the authentic document table of comparisons are preserved as the configuration file of FictPart32.For virtual file, its data are kept on other subregion, FictFAT32 only comprises bunch chained list of corresponding document, so, can regularly upgrade the virtual file bunch chain and the authentic document table of comparisons according to the authentic document comspec, take a plurality of discontinuous bunch situations to reduce by a file, this mode can reduce the size of the virtual file bunch chain and the authentic document table of comparisons effectively.
S404: by the size in authentic document comspec, positional information and the read operation, can determine the accessing operation of file, that is, know the routing information of authentic document;
S405: utilize the routing information of authentic document, read the information that is positioned at this authentic document on other subregions.
The present invention will be described with an instantiation below.
Referring to Fig. 6, be the application scenarios synoptic diagram of the embodiment of the invention.
Fig. 6 shows the concrete application scenarios of FictFAT32 provided by the invention.
Among Fig. 6, USB device (USB Dongle) promptly is to realize the equipment of FictFAT32, this equipment has been realized interconnected based between the Digital Television of WIFI and the computing machine, in the Digital Television angle, USB Dongle equipment class is similar to common USB, and in fact, this equipment is the embedded device with CPU.By the USB Gadget driver on the USB device, Digital Television is identified as USB flash disk to the internal memory of USB device, and reads certain authentic document according to the FictFAT32 on the USB flash disk and play.Because the memory size of USB device limited (16Mbytes usually), the size of storage file and quantity are all less, therefore need a kind of mode, make Digital Television can visit a large amount of files.Support that this requirement designs in order to satisfy just to the FictFAT32 of the reverse visit of file data for file sectors number.
Below in conjunction with Fig. 6, introduce Digital Television by the process that FictFAT32 reads authentic document on the computing machine, comprising:
A), Digital Television sends virtual file read operation request to USB Dongle, this read operation request drives by USB Gadget and obtains, and comprises sector number Q, the size N of input in this request;
B), USB Dongle searches FictFAT32, and calculates a bunch chain C according to the sector number Q in information that finds and the read operation request;
Suppose that searching FictFAT32 obtains: the reserve sector number is R (the FAT32 boot sector by FictFAT32 obtains), FAT1 table sector number F (only uses the FAT1 table here, FAT1 by FictFAT32 obtains), the every number of clusters S in sector then calculates a bunch chain C according to formula 1 and is:
Bunch chain C=(input sector number-reserve sector number-FAT shows the sector number)/every number of clusters in sector+2
=(Q-R-F)/S+2
C), search the virtual file bunch chain and the authentic document table of comparisons according to (bunch chain C, size N), check (bunch chain C, size N) whether in (starting cluster chain U, bunch chain size W) determined space, thereby obtain authentic document comspec T;
And,
The sector number Y=reserve sector of starting cluster chain correspondence is counted Q+FAT sector number F*1+ (starting cluster chain
Number U-2) the every number of clusters S in * sector;
Document location P=(the sector number Y of the starting cluster chain correspondence of sector number Q-file) * 512;
Wherein, the unit of document location P is Byte.
D), give network communication unit (the network communication unit has write down host side IP address) (authentic document comspec T, document location P, size N), the network communication unit of network communication unit and computing machine carries out communication.At computer terminal,, utilize the normative document access interface of windows can obtain the data of some authentic documents according to (authentic document comspec T, document location P, size N).Thus, realized the USB Dongle device access jumbo computing machine of Digital Television by low capacity.
In addition, in specific implementation, the present invention also can carry out the synchronous operation of virtual file and authentic document.
Deleted or when revising or removing operation, its result will have influence on virtual file when authentic document.Change in order to monitor these, can in the system at authentic document place, set up monitoring thread.This thread is generally sleep (sleep) state.Operating system adds file system call back function or Hook Function for this reason in addition, is used to wake up monitoring thread.The monitoring thread of authentic document place system passes to USB Dongle to these information further by the network communication unit.After information was received in the network communication unit of USB Dongle side, notice FictFat32 monitoring thread was revised the relevant information of virtual file.
The synchronous operation of virtual file and authentic document specifically comprises following several situation:
1, authentic document is deleted, and then this corresponding virtual file is also deleted.Deletion action comprises: delete the directory entry in the Virtual File System, empty bunch chain of this file; Relevant item in the deletion virtual file bunch chain and the authentic document table of comparisons;
2, the size of authentic document changes.When the size of authentic document changes, the attribute of immediate updating respective virtual file directory item, bunch chained list of file (add new bunch or revise bunch end mark).It is as follows to visit the corresponding FAT list item of certain bunch position formula, and list item skew=reserve sector is counted * 512+ (bunch number-2) * 4.Can revise bunch number by this formula.When file size increases, for new bunch distribution, bunch allocation strategy and the function that still use operating system to carry.When file size reduces, calculate bunch chain length that file directory needs, set FAT32 end-of-file mark (0 * 0FFFFFFF) at new end position.If the length of file does not change, and only is content change, then only upgrade in the virtual file directory item attribute and the part of time correlation.
3, the move operation of authentic document is broken down into the deletion action and the newly-built operation of virtual file of authentic document, and promptly the corresponding virtual file is also deleted, the contrast relationship of the authentic document after rebuliding virtual file then and moving.
Corresponding with the method for above-mentioned establishment virtual FAT file system, the invention provides a kind of creation apparatus of virtual FAT file system, for authentic document is created its corresponding virtual file under the target directory of target partition, referring to Fig. 7, this device comprises virtual directory creating unit 701 and virtual file creating unit 702, wherein, the specific implementation of virtual directory creating unit 701 establishment virtual directories and the process of standard FAT32 system creation catalogue are similar, do not make emphasis herein and describe; Virtual file creating unit 702 comprises directory entry establishment subelement 7021 and bunch chain creation subelement 7022, wherein:
Directory entry is created subelement 7021, is used for the item that creaties directory under the target directory of target partition, and it is by name to property file to revise catalogue;
Bunch chain creation subelement 7022 is used for distributing continuous bunch according to the size of authentic document at the FAT of target partition table, constitutes bunch chain of virtual file.
Corresponding with the above-mentioned method that reads virtual FAT file system, the invention provides a kind of reading device of virtual FAT file system, by reading the virtual file visit authentic document in the virtual FAT file system, referring to Fig. 8, this device comprises:
Read operation request receiving element 801 is used to receive the read operation request of virtual file, comprises sector number and size in this request;
Bunch chain determining unit 802 is used for the sector number of the read operation request that receives according to read operation request receiving element 801 and searches the parameter that described virtual FAT system obtains, and calculates bunch chain number of virtual file;
Authentic document path determining unit 803, be used for bunch chain that obtains according to bunch chain determining unit 802 number, and the size in the read operation request of read operation request receiving element 801 receptions, search the virtual file bunch chain and the authentic document table of comparisons that generate in advance, obtain the comspec and the positional information of authentic document, and, determine the access path information of authentic document according to the size in authentic document comspec and positional information and the read operation request;
Authentic document addressed location 804 is used for the access path information of the authentic document determined according to authentic document path determining unit 803, visit authentic document.
For some specific implementations of above-mentioned two devices, can not give unnecessary details at this referring to method embodiment.
By some network technologies, for example network storage agreement (ISCSI) can realize that certain or some disk partition of a machine A are mapped as certain subregion of machine B, and the file system of machine A is the complete file system normally, the metadata of include file system, catalogue and file data.The virtual FAT file system FictFAT32 that the present invention realizes is the metadata and the catalogue of include file system only, and file data storing is in other subregion.FictFAT32 needs very little disk space, just can shine upon the file on the 32G physical disk usually in the space of 16M capacity.Be mapped completely to it in the memory headroom of certain embedded device by procotol, and the memory headroom of embedded device can be visited as the USB memory device by other main frame so long.By scheme provided by the invention, realized on some equipment (for example on the embedded device), visit huge capacity disk space (for example among Fig. 6, Digital Television is by the USB device access computer) by less memory headroom.
One of ordinary skill in the art will appreciate that, the process of the method for realization the foregoing description can be finished by the relevant hardware of programmed instruction, described program can be stored in the read/write memory medium, and this program is carried out the corresponding step in the said method when carrying out.Described storage medium can be as ROM/RAM, magnetic disc, CD etc.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (12)

1. the creation method of a virtual FAT file system, it is characterized in that for authentic document is created its corresponding virtual file under the target directory of target partition, this method comprises the step of creating virtual directory and creating virtual file, wherein, the step of described establishment virtual file comprises:
The item that creaties directory under the target directory of target partition is revised the title of directory entry property file virtual file by name;
In the FAT of target partition table, distribute continuous bunch according to the size of authentic document, constitute bunch chain of virtual file.
2. according to the described method of claim 1, it is characterized in that, before creating virtual directory, also comprise:
After virtual FAT file system place device format turned to the FAT32 system, only save contents in the data field of FAT32 system.
3. according to the described method of claim 2, it is characterized in that, describedly virtual FAT file system place device format is turned to the FAT32 system also comprise: the FAT table number of revised file system boot sector is 1.
4. according to the described method of claim 2, it is characterized in that, before virtual FAT file system place device format is turned to the FAT32 system, also comprise:
Revise the registration parameter of the driver of virtual FAT file system place equipment to the equipment of accesses virtual FAT file system.
5. according to the described method of claim 1, it is characterized in that, also comprise:
Establishment comprises the virtual cluster chain number and the authentic document table of comparisons of the corresponding relation of bunch chain number, bunch chain size and authentic document comspec.
6. according to each described method of claim 1 to 5, it is characterized in that the step of described establishment virtual directory is carried out at preassigned disk space.
7. the read method of a virtual FAT file system is characterized in that, by reading the virtual file visit authentic document in the virtual FAT file system, this method comprises:
Receive the read operation request of virtual file, comprise sector number and size in this request;
According to described sector number and search the parameter that described virtual FAT system obtains, calculate bunch chain number of virtual file;
Search the virtual file bunch chain and the authentic document table of comparisons that generates in advance according to the size in described bunch of chain number and the described read operation request, obtain the comspec and the positional information of authentic document;
According to the size in authentic document comspec and positional information and the described read operation request, determine the access path information of authentic document;
According to described access path message reference authentic document.
8. according to the described method of claim 7, it is characterized in that described according to described sector number and search the parameter that described virtual FAT system obtains, the detailed process that calculates bunch chain number of virtual file is:
Search the booting operating system recording areas DBR of virtual FAT system, obtain reserve sector number, FAT table sector number and the every number of clusters in sector;
Utilize described sector number, described reserve sector number, FAT table sector number and the every number of clusters in sector to calculate bunch chain number of virtual file.
9. described according to Claim 8 method is characterized in that, calculates bunch chain number of virtual file by following formula:
Bunch chain number=(sector number-reserve sector number-FAT shows the sector number)/every number of clusters in sector+2.
10. described according to Claim 8 method is characterized in that, describedly searches the virtual file bunch chain and the authentic document table of comparisons that generates in advance according to described bunch of chain number and described size, and the detailed process that obtains authentic document comspec and positional information is:
Search the virtual file bunch chain and the authentic document table of comparisons according to described bunch of chain number and size, determine that described bunch of chain number and size in starting cluster chain number and the determined space of bunch chain size, match the comspec of authentic document;
Number calculate the sector number of starting cluster chain correspondence according to described reserve sector number, FAT table sector number, the every number of clusters in sector and starting cluster chain, calculate the positional information of authentic document according to the sector number of the sector number in the described read operation request, starting cluster chain correspondence.
11. the creation apparatus of a virtual FAT file system, it is characterized in that create its corresponding virtual file for authentic document under the target directory of target partition, this device comprises virtual directory creating unit and virtual file creating unit, wherein, described virtual file creating unit comprises:
Directory entry is created subelement, is used for the item that creaties directory under the target directory of target partition, and revises the title of directory entry property file virtual file by name;
Bunch chain creation subelement is used for distributing continuous bunch according to the size of authentic document at the FAT of target partition table, constitutes bunch chain of virtual file.
12. the reading device of a virtual FAT file system is characterized in that, reads authentic document by the virtual file in the virtual FAT file system, this device comprises:
Read operation request receiving element is used to receive the read operation request of virtual file, comprises sector number and size in this request;
Bunch chain determining unit is used for according to described sector number and searches the parameter that described virtual FAT system obtains, and calculates bunch chain number of virtual file;
Authentic document path determining unit, be used for searching the virtual file bunch chain and the authentic document table of comparisons that generates in advance according to described bunch of chain number and described size, obtain the comspec and the positional information of authentic document, and, determine the access path information of authentic document according to the size in authentic document comspec and positional information and the described read operation request;
The authentic document addressed location is used for according to described access path message reference authentic document.
CN200910083043XA 2009-04-27 2009-04-27 Creating and reading method and device for virtual FAT file system Pending CN101882132A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910083043XA CN101882132A (en) 2009-04-27 2009-04-27 Creating and reading method and device for virtual FAT file system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910083043XA CN101882132A (en) 2009-04-27 2009-04-27 Creating and reading method and device for virtual FAT file system

Publications (1)

Publication Number Publication Date
CN101882132A true CN101882132A (en) 2010-11-10

Family

ID=43054148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910083043XA Pending CN101882132A (en) 2009-04-27 2009-04-27 Creating and reading method and device for virtual FAT file system

Country Status (1)

Country Link
CN (1) CN101882132A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102591861A (en) * 2011-01-05 2012-07-18 深圳市闪联信息技术有限公司 Method and system for mapping and accessing remote distributed files
CN102622352A (en) * 2011-01-26 2012-08-01 深圳市闪联信息技术有限公司 Method, server and system for achieving shared file
CN102651226A (en) * 2011-02-28 2012-08-29 联发科技(新加坡)私人有限公司 CD-ROM player and CD reading method
CN102799691A (en) * 2012-08-15 2012-11-28 深圳市宏电技术股份有限公司 File system conversion access method and file system conversion access equipment
CN103106049A (en) * 2013-02-06 2013-05-15 清华大学 Portable storage device and access method thereof
CN103150402A (en) * 2013-03-27 2013-06-12 网宿科技股份有限公司 Index-code-based virtual file system, establishment method and access method
CN104571950A (en) * 2014-12-24 2015-04-29 中国科学院信息工程研究所 Command identifying method for external storage medium
CN105579977A (en) * 2014-09-01 2016-05-11 华为技术有限公司 File access method, device and storage system
CN106557684A (en) * 2016-10-14 2017-04-05 北京金山安全软件有限公司 File scanning method and device and terminal equipment
US10157143B2 (en) 2014-09-01 2018-12-18 Huawei Technologies Co., Ltd. File access method and apparatus, and storage system
CN109697019A (en) * 2017-10-20 2019-04-30 北京京东尚科信息技术有限公司 The method and system of data write-in based on FAT file system
CN112069130A (en) * 2020-08-31 2020-12-11 四川效率源信息安全技术股份有限公司 Data recombination and restoration method for Microsoft EXCEL file
CN112181918A (en) * 2020-09-30 2021-01-05 上海商米科技集团股份有限公司 Quick pre-allocation method for video file of camera for embedded system
CN113220953A (en) * 2021-05-24 2021-08-06 北京安盟信息技术股份有限公司 Data filtering method and device
CN114124301A (en) * 2021-11-17 2022-03-01 中国地质大学(武汉) Virtual media transmission system with data check and error retransmission mechanism

Cited By (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102591861A (en) * 2011-01-05 2012-07-18 深圳市闪联信息技术有限公司 Method and system for mapping and accessing remote distributed files
CN102622352B (en) * 2011-01-26 2015-02-25 北京闪联云视信息技术有限公司 Method, server and system for achieving shared file
CN102622352A (en) * 2011-01-26 2012-08-01 深圳市闪联信息技术有限公司 Method, server and system for achieving shared file
CN102651226A (en) * 2011-02-28 2012-08-29 联发科技(新加坡)私人有限公司 CD-ROM player and CD reading method
CN102651226B (en) * 2011-02-28 2013-08-28 联发科技(新加坡)私人有限公司 CD-ROM player and CD reading method
US8743669B2 (en) 2011-02-28 2014-06-03 Mediatek Singapore Pte. Ltd. Optical disc drive and method of accessing optical disc
CN102799691A (en) * 2012-08-15 2012-11-28 深圳市宏电技术股份有限公司 File system conversion access method and file system conversion access equipment
CN102799691B (en) * 2012-08-15 2016-05-04 深圳市宏电技术股份有限公司 Filesystem conversion access method and filesystem conversion access means
CN103106049A (en) * 2013-02-06 2013-05-15 清华大学 Portable storage device and access method thereof
CN103106049B (en) * 2013-02-06 2016-08-03 清华大学 A kind of movable storage device and access method thereof
CN103150402A (en) * 2013-03-27 2013-06-12 网宿科技股份有限公司 Index-code-based virtual file system, establishment method and access method
CN103150402B (en) * 2013-03-27 2016-09-21 网宿科技股份有限公司 Virtual File System based on index coding and method for building up, access method
CN105579977A (en) * 2014-09-01 2016-05-11 华为技术有限公司 File access method, device and storage system
CN105579977B (en) * 2014-09-01 2020-04-14 华为技术有限公司 File access method, device and storage system
US10061711B2 (en) 2014-09-01 2018-08-28 Huawei Technologies Co., Ltd. File access method and apparatus, and storage system
US10157143B2 (en) 2014-09-01 2018-12-18 Huawei Technologies Co., Ltd. File access method and apparatus, and storage system
CN104571950A (en) * 2014-12-24 2015-04-29 中国科学院信息工程研究所 Command identifying method for external storage medium
CN104571950B (en) * 2014-12-24 2018-03-23 中国科学院信息工程研究所 A kind of password authentication method of peripheral hardware storage medium
CN106557684A (en) * 2016-10-14 2017-04-05 北京金山安全软件有限公司 File scanning method and device and terminal equipment
CN106557684B (en) * 2016-10-14 2019-09-27 北京金山安全软件有限公司 File scanning method and device and terminal equipment
CN109697019A (en) * 2017-10-20 2019-04-30 北京京东尚科信息技术有限公司 The method and system of data write-in based on FAT file system
CN109697019B (en) * 2017-10-20 2022-12-27 北京京东尚科信息技术有限公司 Data writing method and system based on FAT file system
CN112069130A (en) * 2020-08-31 2020-12-11 四川效率源信息安全技术股份有限公司 Data recombination and restoration method for Microsoft EXCEL file
CN112069130B (en) * 2020-08-31 2023-05-02 四川效率源信息安全技术股份有限公司 Data reorganization and repair method for Microsoft EXCEL file
CN112181918A (en) * 2020-09-30 2021-01-05 上海商米科技集团股份有限公司 Quick pre-allocation method for video file of camera for embedded system
CN112181918B (en) * 2020-09-30 2023-03-03 上海商米科技集团股份有限公司 Quick pre-allocation method for video file of camera for embedded system
CN113220953A (en) * 2021-05-24 2021-08-06 北京安盟信息技术股份有限公司 Data filtering method and device
CN113220953B (en) * 2021-05-24 2022-08-23 北京安盟信息技术股份有限公司 Data filtering method and device
CN114124301A (en) * 2021-11-17 2022-03-01 中国地质大学(武汉) Virtual media transmission system with data check and error retransmission mechanism
CN114124301B (en) * 2021-11-17 2023-04-07 中国地质大学(武汉) Virtual media transmission system with data check and error retransmission mechanism

Similar Documents

Publication Publication Date Title
CN101882132A (en) Creating and reading method and device for virtual FAT file system
JP6664218B2 (en) Efficient data object storage and retrieval
US8612488B1 (en) Efficient method for relocating shared memory
US10635643B2 (en) Tiering data blocks to cloud storage systems
US9348842B2 (en) Virtualized data storage system optimizations
CN102667772B (en) File level hierarchical storage management system, method, and apparatus
US20180004764A1 (en) Efficient data synchronization for storage containers
EP2754027B1 (en) Method for creating clone file, and file system adopting the same
JP4124331B2 (en) Virtual volume creation and management method for DBMS
US9342528B2 (en) Method and apparatus for tiered storage
US8458234B2 (en) Data management method
US11157445B2 (en) Indexing implementing method and system in file storage
US20060047926A1 (en) Managing multiple snapshot copies of data
US20040078704A1 (en) Transaction-safe FAT file system
US11513996B2 (en) Non-disruptive and efficient migration of data across cloud providers
EP3092556B1 (en) Systems and methods for fail-safe operations of storage devices
CN102426586A (en) FAT (file allocation table) file storage method in embedded system
CN102253985B (en) File system data management method and system
CN102622352B (en) Method, server and system for achieving shared file
CN115774703A (en) Information processing method and device
CN101303667B (en) Method and device for establishing magnetic disk null cluster table and seeking magnetic disk null cluster
WO2023130946A1 (en) Operating system upgrade method, electronic device, storage medium, and chip system
CN113806803A (en) Data storage method, system, terminal equipment and storage medium
CN115480692A (en) Data compression method and device
CN105354294A (en) Nested file management system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: BEIJING IGRS YUNSHI INFORMATION TECHNOLOGY CO., LT

Free format text: FORMER OWNER: SHENZHEN IGRS INFORMATION TECHNOLOGY LTD.

Effective date: 20120807

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 518057 SHENZHEN, GUANGDONG PROVINCE TO: 100080 HAIDIAN, BEIJING

TA01 Transfer of patent application right

Effective date of registration: 20120807

Address after: 100080, room 10, two North 0811 street, Haidian District, Beijing, Haidian

Applicant after: Beijing Igrs Yunshi Information Technology Co., Ltd.

Address before: 518057 Guangdong city of Shenzhen province Nanshan District science and Technology Park South seven Digital Technology Park A3 building 6 floor

Applicant before: Shenzhen Igrs Information Technology Ltd.

C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20101110