CN103544287B - File private cache establishing method and device - Google Patents

File private cache establishing method and device Download PDF

Info

Publication number
CN103544287B
CN103544287B CN201310517191.4A CN201310517191A CN103544287B CN 103544287 B CN103544287 B CN 103544287B CN 201310517191 A CN201310517191 A CN 201310517191A CN 103544287 B CN103544287 B CN 103544287B
Authority
CN
China
Prior art keywords
file
privately owned
irp
buffer
caching
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
CN201310517191.4A
Other languages
Chinese (zh)
Other versions
CN103544287A (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.)
CHINA SOFTWARE AND TECHNOLOGY SERVICE Co Ltd
Original Assignee
CHINA SOFTWARE AND TECHNOLOGY SERVICE Co 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 CHINA SOFTWARE AND TECHNOLOGY SERVICE Co Ltd filed Critical CHINA SOFTWARE AND TECHNOLOGY SERVICE Co Ltd
Priority to CN201310517191.4A priority Critical patent/CN103544287B/en
Publication of CN103544287A publication Critical patent/CN103544287A/en
Application granted granted Critical
Publication of CN103544287B publication Critical patent/CN103544287B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a file private cache establishing method and device. The device mainly comprises a strategy determining module and a file private cache unit module. The method specifically comprises 1) intercepting all IRP (I/O (input/output) request package) requests in an operating system kernel; 2) according to IRP strategy determining conditions including IRP types, process unique identities, file path identities and file content, selecting the IRP requests which require file private caches and establishing private cache units; 3) executing the IRP requests of the file private caches and feeding the result back to the operating system kernel. According to the file private cache establishing method and device, the file private caches and file system caches can exist simultaneously, so that the problem of strong coupling between various application content differentiating products and operating system file cache processing of the same file can be solved; meanwhile, the operating mode of the file private caches is identical to that of the file system caches, and no changes of the file operating mode and the file information of application software occur, so that the problem of uniformity of various applications access to the same file can be solved.

Description

A kind of privately owned caching method for building up of file and device
Technical field
The present invention relates to the method and apparatus of the privately owned caching of file cache method for building up and device, particularly file, belongs to File cache field.
Background technology
Windows operating system accesses the efficiency of file to improve application program, provides caching machine for single file System, this caching mechanism only have a caching to single file.But at present for the different application of identical file distinguishes content Product all there is following defect:
Cause file destroyed with the coupling height of operating system:Traditional identical file content distinguishes product and file system Buffer shares single file caching, and this type products can cause data and file in file cache to data cached operation Data in disk are inconsistent, ultimately result in file destroyed.
Application program accesses the discordance of identical file causes application program work:Traditional identical file content Product is distinguished to non-protected application program using refusal or the processing mode cheated, this type processing mode causes different application The same operation of program is in the inconsistent of identical file;The product of content differentiation simultaneously must be according to buffer status during the operation of file Concordance control is done in access to application program, and this Type Control causes the same operation of same application to be visited in different time Ask the inconsistent of identical file;Both discordances cause same type operation of the application program to file to have Different Results, Ultimately result in application program to work.
By taking the transparent encryption and decryption product of terminal as an example, traditional transparent encryption and decryption of digital computing system terminal provides one kind Data prevent the method divulged a secret, and the method is to protected application program and non-protected application area point file content, non-to be protected The encrypted file data that shield application program reads is ciphertext all the time.But produced using the transparent encryption and decryption of tradition list caching technology Product share single file caching with file system cache device, and the data in the file cache of transparent encryption and decryption product treatment are bright Text, and the data in the file cache that file system is processed are ciphertexts.Therefore using the transparent encryption and decryption of tradition list caching technology Product is accurate in order to ensure file state in the buffer, it is necessary to frequently cached switching, this frequent switching is special In the case of easily lead to file destroyed.Further, using the transparent encryption and decryption product of traditional list caching technology in order to ensure Buffer status it is accurate, protected application program and non-protected application program can be forbidden while accessing same encryption file, this Kind control mode likely results in a certain application program cannot normal work.
The content of the invention
As the present invention, the privately owned caching of file refers to that a new concept proposes that the privately owned caching of file is defined as and file system System caching is independent and the caching with file system cache said function and attribute is realized, and the privately owned caching of file and text Part system cache allows presence simultaneously for same file.
As the new concept that the present invention is referred to, the privately owned buffer of file proposes that the privately owned buffer of file is defined simultaneously To process the functional module of the privately owned caching of file.
The invention provides the method that a kind of privately owned caching of file is set up, solve file content and distinguish product to cause in file Hold destruction problem, while solving in order to application program caused by file buffer status during maintenance operation cannot work problem.
Present invention also offers the device that a kind of privately owned caching of file is set up, solve file content and distinguish product to cause file Content disruptions problem, while solving in order to application program caused by file buffer status during maintenance operation cannot work problem.
A kind of method for building up of the privately owned caching of file, its step include:
1)All IRP requests are intercepted in operating system nucleus, the application program for initiating IRP requests need not change any work( Energy, interface, module, the privately owned buffer of file support all softwares, all types of IRP requests;
2)According to IRP strategy decision conditions:IRP types, process unique mark, file path mark and file content choosing Selecting out needs to ask using the IRP of the privately owned caching of file, sets up privately owned buffer;
3)The IRP requests of the privately owned caching of file are performed, and result is returned into operating system nucleus.
Further, the IRP request types of the privately owned caching process of file are preferable over one or more following:File is beaten Open, closing of a file, file read-write.
Further, using the IRP types, file path mark as at the associated filtration readjustment of IRP requests Reason information.
Further, the establishment for setting up the privately owned buffer respective file with association process is:
1)IRP requests are received from I/O Manager, in parsing IRP requests, readjustment processing information is filtered;
2)Being selected according to IRP strategies needs to ask using the IRP of the privately owned caching of file, and the privately owned buffer row of locating file Whether there is this document in table;
3)The file object that file privately owned buffer is asked with current IRP is directly closed by the privately owned buffer of establishment file Connection, the file object counting, file object access rights and text in the privately owned buffer update IRP requests filtration callback information of file The incidence relation of part object and the privately owned buffer of file.
4)The new privately owned buffer of file for creating includes system standard document unique mark head;
5)If privately owned caching need not be used, file system cache process is handed to, it is requested by arranging an IRP The value of filter readjustment processing information, I/O managers are automatically brought to File System Kernel process;If turned by operating system nucleus process Afterwards, then file operation process will be using file system cache.
Further, system recognizes the privately owned caching of file, the system according to the system standard document unique mark head Normative document unique mark head is the file identification of a standard;System other modules by the standard it is privately owned with file cache into The quasi- interaction of rower.
Further, the privately owned caching of the file is adopted:
1)After system cache management initiation pre-reads or postpone write request, the privately owned caching reception file of file pre-reads or postpones to write Request;The privately owned caching of the file obtains the lock of the privately owned caching of file of file object association;
2)The privately owned caching process file of the file pre-reads or postpones to write process, and more new file pre-reads or postpones to write Filter readjustment parameter information, the lock of the privately owned caching of file of the privately owned caching releasing document object association of the file;
3)End pre-reads or postpones to write process and will pre-read or postpone to write status of processes value and returns to system cache pipe Reason.
Further, the privately owned caching of the file is independent mutually with file system cache, and for identical file allows text The privately owned caching of part is present simultaneously with file system cache.
Further, being selected according to IRP strategy decision conditions needs to ask using the IRP of the privately owned caching of file, And checked according to following process:
1)The process unique mark that the associated filtration of IRP requests is adjusted back in processing information is checked, confirms that the process is unique Identify whether to need to do the privately owned caching process of file;
2)The file object that the associated filtration of IRP requests is adjusted back in processing information is checked, whether this document object is confirmed The privately owned caching process of file is done;
3)Check that the file path mark in processing information is adjusted back in the associated filtration of IRP requests, confirm this document path Identify whether to carry out the privately owned caching process of file;
4)The file content that the associated filtration of IRP requests is adjusted back in processing information is checked, confirms whether this document needs Do the privately owned buffer of file to process;
5)The step 1)-4)In any one step check the privately owned caching of needs, then stop checking;The step 1)-4) In if turn by operating system nucleus process after, file operation process uses file system cache.
The present invention also proposes a kind of privately owned buffer storage of file, it is characterised in that privately owned by tactful determination module and file Buffer module is constituted,
The tactful determination module includes:Policy receipt memory element, IRP request filter callback information resolution unit and IRP asks identifying unit;
The Policy receipt memory element is used to receive strategy;
The filtration callback information in the parsing IRP requests of callback information resolution unit is filtered in the IRP requests;
The IRP requests identifying unit is determined whether using the privately owned buffer of file;
The privately owned buffer module of the file for the classification asked according to IRP, to sentencing for different tactful determination modules Determine result to be processed;The IRP is processed if using the privately owned buffer of file to ask and return result state value To operating system nucleus, if the privately owned buffer of file is not used, direct handoff operations service system is processed;This module includes: The privately owned buffer list maintenance unit of file, the privately owned buffer processing unit of file, file name provide unit;
The privately owned buffer list maintenance unit of the file, for by All Files privately owned buffer corresponding file path It is stored in a global listings, wherein list items include the privately owned buffer data information in file full path footpath, file;
The privately owned buffer processing unit of the file, there is provided the privately owned buffer of file creates function, the privately owned buffer of file Support that system pre-reads the privately owned buffer of function, file and supports system delay with file object correlation function, the privately owned buffer of file Write function;
The title provider unit, for other modules of kernel according to the file object associated with the privately owned buffer of file Inquiry file name.
Further, the privately owned buffer of the file is provided and creates function, is judged according to IRP when file is first switched on The privately owned buffer of condition establishment file;The privately owned buffer of the file is provided and file object correlation function, first according to file The complete trails of object searches the privately owned buffer of file with file object unique association from the privately owned buffer list of file, then Caching relevant information, the file object right related information of file object are updated, file object is added to into file finally privately owned File list object in buffer.
Beneficial effects of the present invention:
It is an object of the present invention to realize that a kind of privately owned caching of file is set up and used, the privately owned caching of this file can be with file System cache is simultaneously deposited, and the privately owned caching of this file is complete in other module interactions with operating system with file system cache Congruent valency.In the method and apparatus of the privately owned caching of file of the present invention, the privately owned caching of file is present simultaneously with file system cache Can solve the problem that identical file different application content distinguishes the strong coupling problem between product and operating system file caching process; The mode of operation of the privately owned caching of file is identical with file system cache simultaneously, for application file mode of operation and text Part information does not have any change, solves the consistency problem that application program accesses identical file.The method that the present invention is provided is such as Fruit is applied in transparent encryption and decryption product(But it is not limited to a kind of transparent encryption and decryption product this range of application), it is not necessary to it is slow to file Row frequent switching is deposited into, while not forcing to forbid protected application program and non-protected application program while accessing same encryption File.
Description of the drawings
Fig. 1 is that the positionality of the privately owned caching of file and file system in the privately owned caching method for building up of file of the present invention is illustrated Figure;
Fig. 2 is the privately owned caching foundation of file and association process stream in privately owned one embodiment of caching method for building up of file of the present invention Cheng Tu;
Fig. 3 a are that the privately owned buffer of file supports that file is pre- in privately owned one embodiment of caching method for building up of file of the present invention Read procedure schematic diagram;
Fig. 3 b are that the privately owned buffer of file supports that file prolongs in privately owned one embodiment of caching method for building up of file of the present invention Process schematic is write late;
Fig. 4 is file name provider flow chart in privately owned one embodiment of caching method for building up of file of the present invention;
Fig. 5 is the privately owned buffer data structure chart of file in privately owned one embodiment of caching method for building up of file of the present invention;
Fig. 6 is the privately owned buffer module component relation figure of file in privately owned one embodiment of buffer storage of file of the present invention.
Fig. 7 is the privately owned caching schematic flow sheet of file in privately owned one embodiment of caching method for building up of file of the present invention.
Specific embodiment
To make objects and advantages of the present invention clearer, further is made to the present invention with reference to the accompanying drawings and examples Describe in detail.
Fig. 7 is the privately owned caching schematic flow sheet of file in privately owned one embodiment of caching method for building up of file of the present invention.It is first First all IRP requests are intercepted in operating system nucleus;Then according to IRP strategy decision conditions:IRP types, process unique mark, File path is identified and file content is selected and needs to be asked using the IRP of the privately owned caching of file, sets up privately owned caching;Finally Perform and asked using the IRP of the privately owned caching of file, and result is returned into operating system nucleus.
The technical scheme is that what is be achieved in that as shown in Figure 7;
The method that a kind of privately owned caching of file is set up, which it is critical only that the privately owned buffer of file is mutual with file system cache device It is mutually independent, and for identical file allows the privately owned caching of file to exist with file system cache simultaneously;The method also include but It is not limited to procedure below:
Step 1, all IRP request is intercepted from operating system nucleus(I/O Request Packet);
Step 2, whether IRP requests for intercepting these carry out decision-making with IRP strategy decision conditions privately owned using file Buffer, wherein IRP strategy decision condition is based on IRP types, process unique mark, file path mark, file content;If Using the privately owned buffer execution step 3 of file, otherwise turn to be continued with by operating system nucleus;
Step 3, these IRP are performed on the privately owned buffer of file ask, and result phase is returned to into operating system Kernel.
In order that this method is definitely, here the privately owned buffer processing procedure of file is elaborated:
IRP request full name are I/O Request Packet(I/O request bags), the IRP that the privately owned buffer of file is processed please Type is asked to include but is not limited to Types Below:File Open, closing of a file, file read-write etc.;
IRP strategy decision conditions include:IRP types, process unique mark, file path mark, file content, wherein IRP types, file path mark are received as the filtration readjustment processing information being associated with these IRP requests.
IRP requests carry out decision making process with IRP strategy decision conditions and comprise the following steps:
A) all IRP requests are intercepted in operating system;
B) the process unique mark that the associated filtration of IRP requests is adjusted back in processing information is checked, confirms that the process is unique Identify whether to need to do the privately owned buffer process of file;The privately owned buffer of file is done if desired to process, and turns privately owned slow by file Storage process;Otherwise turn by step c)Process;
C) file object that the associated filtration of IRP requests is adjusted back in processing information is checked, whether this document object is confirmed Do the privately owned buffer of file to process;If having done the privately owned buffer of file to process, turn to be processed by the privately owned buffer of file; Otherwise turn by step d)Process;
D) check that the file path mark in processing information is adjusted back in the associated filtration of IRP requests, confirm this document path Identify whether to carry out the privately owned caching process of file;If doing the privately owned buffer of file to process, turn privately owned slow by file Storage process;Otherwise turn by step e)Process;
E) file content that the associated filtration of IRP requests is adjusted back in processing information is checked, confirms whether this document needs Do the privately owned buffer of file to process;If having done the privately owned buffer of file to process, turn to be processed by the privately owned buffer of file;Otherwise Turn by operating system nucleus process;If after turning by operating system nucleus process, then file operation process will be using file system System caching.
In the method all types IRP requests are processed, each type of IRP requests processing mode is not quite similar, Above-mentioned decision making process step is asked suitable for all types IRP.
Operating system nucleus intercepts process and adopts standard operation system functional interface in an embodiment of the present invention.
In an embodiment of the present invention for the IRP requests of each file open operation type can set up independent text Part handle is associated with the privately owned buffer of this document, and file handle and the privately owned buffer of file are many-to-one relations.
These IRP request process are performed on the privately owned buffer of file in an embodiment of the present invention to comprise the following steps:
1)Check the associated filtration readjustment processing information of IRP requests to be confirmed whether to have created the privately owned slow of this document Deposit, wherein for the privately owned caching of one file of a file existence anduniquess is corresponded to therewith;If the privately owned caching of establishment file, Then turn by step 3) process;Otherwise turn by step 2) process;
2)The privately owned caching of file of this document is created according to the associated filtration readjustment processing information of IRP requests, while building The one-to-one relationship of vertical file and the privately owned caching of file;
3)These IRP are performed on the privately owned buffer of file to ask, implementation procedure was operated with operating system normative document Cheng Xiangtong, repeats no more;
The IRP requests that the privately owned buffer of All Files is processed return result state and give operating system system kernel, should Result state is to illustrate whether this IRP request runs succeeded;If processing failure, the result phase value explanation is concrete Failure cause;The result phase value is corresponding with operating system standard.
The device that the privately owned caching of a kind of file that the present invention is also proposed is set up, which it is critical only that foundation and uses and file system Unite the privately owned caching of relatively independent file, and for identical file allows the privately owned caching of file with file system cache while depositing ;The device includes:
Tactful determination module, for the filtration callback information in receiving strategy, parsing IRP requests, then closes according to both System determines whether use the privately owned buffer of file;
The privately owned buffer module of file, for the classification asked according to IRP, the judgement to different tactful determination modules is tied Fruit is processed;The IRP is processed if using the privately owned buffer of file to ask and result is returned to operating system Kernel, if the privately owned buffer of file is not used, direct handoff operations service system is processed.
To make this device definitely, here the various pieces of the privately owned cache device of file are elaborated:
Include in tactful determination module:Callback information resolution unit, IRP are filtered in Policy receipt memory element, IRP requests Request identifying unit;
The Policy receipt memory element, for receiving and storing IRP decision plans;
Callback information resolution unit is filtered in the IRP requests, asks corresponding file path, IRP requests for parsing IRP Type, IRP demand file objects, the privately owned cache manager object of file of IRP request associations, file operation information etc.;
The IRP asks identifying unit, whether uses the privately owned buffer of file for decision-making, if privately owned slow using file Storage process, then have the privately owned buffer of file to process IRP requests, otherwise transfer to file system cache device to process.
Include in the privately owned buffer module of file:The privately owned buffer list maintenance unit of file, the privately owned buffer of file Processing unit, file name provide unit;
The privately owned buffer list maintenance unit of the file, corresponding file path are stored in a global listings, its Middle list items include the privately owned buffer data information in file full path footpath, file;
The privately owned buffer processing unit of the file, including the privately owned buffer of file creates function, the privately owned buffer of file Support that system pre-reads the privately owned buffer of function, file and supports system delay with file object correlation function, the privately owned buffer of file Write function.
The privately owned buffer list of file therein be one according to file full path footpath for parameter processing balanced binary tree, For the IRP of unique document is asked, including being not limited to, newly-built file, file polling, file renaming, file are deleted, file is closed Close;It is required for being updated list.
The privately owned buffer of file creates function in an embodiment of the present invention, when file is first switched on or creates basis IRP decision conditions need to create establishment file privately owned buffer when collected works are independently cached;Establishment process is applied first and is initialized Nonpagepool space, then to the privately owned buffer of operating system cache manager registration file, finally by file privately owned caching Device is stored in list with file full path footpath.
The privately owned buffer of file and file object correlation function in an embodiment of the present invention, first according to file object Complete trails searches the privately owned buffer of file with file object unique association from the privately owned buffer list of file, then updates text File object is finally added to the privately owned buffer of file by the caching relevant information of part object, file object right related information Middle file list object.
The privately owned buffer of file supports that system pre-reads function in an embodiment of the present invention, has already registered with behaviour for one Make the privately owned cache manager of file of system cache manager, adjudicate to needing to pre-read file when operating system cache manager and carry The function that pre-reads of the privately owned buffer of file, the privately owned cache management of file can be called during high systematic function to pre-read functional module and process right Answer IRP to ask, result state value is returned to into operating system cache manager then.
The privately owned buffer of file supports that system delay writes function in an embodiment of the present invention, has already registered with for one The privately owned cache manager of file of operating system cache manager, when operating system cache manager is adjudicated to needing delay to write text Part can call the delay of the privately owned buffer of file to write function when improving systematic function, and the privately owned cache management of file pre-reads functional module Correspondence IRP requests are processed, result state value is returned to into operating system cache manager then.
Other modules of the kernel of title provider unit are according to closing with the privately owned buffer of file in an embodiment of the present invention Need to provide title provider unit during the file object inquiry file name of connection;Title provider unit inquiry file is privately owned slow Storage list obtains file full path footpath information, is then back to file full path footpath information and gives kernel other modules.
The performing environment of the present invention is, in operating system nucleus, to illustrate unless necessary, and the privately owned with file of described below is delayed It is all in operating system nucleus to deposit interactive module.
The present invention is unrelated with application program, and application program need not change any function, interface, module.
In the following detailed description, many details are had been presented for, such as specific method order, structure, unit Part connector.It should be understood, however, that this and other details are for example:Public general knowledge, system environmentss element Deng not elaborating one by one.
Fig. 1 is that the positionality of the privately owned caching of file and file system in the privately owned caching method for building up of file of the present invention is illustrated Figure;Represent in this relation structure diagram that the privately owned caching 101 of file is separate with file system cache 105, and both can be total to Deposit;This graph of a relation represents that the privately owned caching 101 of file and file system cache 105 are all to receive IRP requests from IRP managers 100; The privately owned caching 101 of file and file system cache 105 are all that dependent file system 102 realizes file operation;The privately owned caching of file 101 and file system cache 105 be not directly dependent on physical disk, therefore the privately owned caching 101 of file with physical disk 103 without any Direct relation.
If Fig. 1 is also illustrated with to read data by the privately owned caching of file, then need to pass sequentially through IRP managers 100th, the privately owned caching 101 of file, file system 102 and physical disk 103, if the privately owned caching receive data of file need not be passed through According to, then need to pass sequentially through IRP managers 100, file system cache 105, file system 102 and physical disk 103;Pass through The privately owned buffering write data process of file is identical;Two path is essentially equal to application program, and application program is without the need for modification Any function, interface, module.
Fig. 2 is the privately owned caching foundation of file and association process stream in privately owned one embodiment of caching method for building up of file of the present invention Cheng Tu;
The privately owned buffer of step 201 file receives IRP requests from I/O Manager;
Step 202 parsing IRP filters readjustment processing information;
According to strategy, step 203 judges whether IRP requests are needed using privately owned caching, if execution step 204, otherwise Execution step 205;
Whether there is this document in the privately owned buffer list of step 204 locating file, it is if there is execution step 206, no Then execution step 207;
Step 205 hands to the process of file system cache device;
In this step, the privately owned buffer of file need not process this IRP and ask, and arrange an IRP request and filter readjustment After the value of processing information, I/O Manager can be automatically brought to the process of file system cache device;
File privately owned buffer is associated by step 206 with current IRP request objects;
In this step, the privately owned buffer of file can update IRP request filter callback information in cache object, file it is unique The information such as mark object, file read-write authority;In the process after file object associated with independence buffer, follow-up other classes File object in the IRP requests of type can be with updated file buffer, can directly by attached in file object The privately owned buffer of file of band processes other IRP and asks;
The privately owned buffer of step 207 establishment file, then execution step 206 is by the newly-built privately owned buffer of file and file Object is associated;
In this step, the new privately owned buffer of file for creating includes system standard document unique mark head, concrete data knot Structure is referring to the privately owned buffer data structure of Fig. 5 files;
Fig. 5 is the privately owned buffer data structure chart of file in privately owned one embodiment of caching method for building up of file of the present invention; Include a system standard document unique mark head in the data structure first, according to this marking head, system other modules can be with The privately owned buffer of identification file is the file identification of a standard;I.e. thus other modules of operating system pass through this standard and file Privately owned buffer carries out some standard interactions, thus reaches the privately owned caching of file and file system cache equivalent;
Step 208 terminates IRP asks and arranges IRP requests to process state value;
Step 209 returns to operating system process.
Fig. 3 a are that the privately owned buffer of file supports that file is pre- in privately owned one embodiment of caching method for building up of file of the present invention Read procedure schematic diagram;Fig. 3 b are the privately owned buffer support texts of file in privately owned one embodiment of caching method for building up of file of the present invention Part postpones to write process schematic.The privately owned buffer of privately owned file set up supports that function is write in the delay that system is similarly configured, by being Whether system cache manager decision-making needs delay to write;The privately owned buffer of privately owned file wherein set up supports what system was similarly configured Function is pre-read, whether needs to pre-read by the decision-making of system cache manager.
What in the present invention, the privately owned buffer of file supported that system similarly configures pre-read and caching is write, and Fig. 3 a are that file is privately owned slow Storage supports the pre- read procedure of file, and Fig. 3 b are that the privately owned buffer of file supports that file stall writes process;
The privately owned buffer of above-mentioned file supports that file pre-reads process steps and includes:
Step 301:System cache manager initiates pre- read request;
Step 302:The privately owned caching of file receives the pre- read request of file;
Step 303:The privately owned caching of file obtains the lock of the privately owned buffer of file of file object association;
Step 304:The pre- read procedure of the privately owned caching process file of file, and more new file pre-reads filtration readjustment parameter letter Breath;
Step 305:The lock of the privately owned buffer of file of the privately owned caching releasing document object association of file;
Step 306:Terminate pre- read procedure and status of processes value will be pre-read to return to system cache manager;
The privately owned buffer of above-mentioned file supports that file stall is write process steps and included:
Step 301 ':System cache manager initiates to postpone write request;
Step 302 ':The privately owned caching of file receives file stall write request;
Step 303 ':The privately owned caching of file obtains the lock of the privately owned buffer of file of file object association;
Step 304 ':The privately owned caching process file stall of file writes process, and updates file stall and write filtration readjustment ginseng Number information;
Step 305 ':The lock of the privately owned buffer of file of the privately owned caching releasing document object association of file;
Step 306 ':Terminate to postpone to write process and return to the privately owned buffer status value of file that process is write in delay and be System cache manager.
Fig. 4 is file name provider flow chart in privately owned one embodiment of caching method for building up of file of the present invention;
Step 401 obtains file object relevant parameter from callback interface;
Step 402 judges whether file object parameter has used the privately owned buffer of file;If execution step 403, no Then execution step 404;
Step 403 judges the privately owned buffer of file of file object association whether in the privately owned buffer list of file, such as Fruit has execution step 405, otherwise execution step 406;
Step 404 is handed to file system and processes acquisition filename processing procedure;
Step 405 obtains file name from the privately owned buffer list of file, and updates file object relevant parameter;
Step 406 is initiated to obtain file name from file system from by the privately owned buffer of file, then updates file object Parameter;This step is had any different with step 404, and step 404 is directly returned to file system process, appoints in not updating file object What information;
Step 407 file buffer arranges file name request results state value after processing file name;
Step 408 returns to file system.
Method to realize the privately owned caching of file in the present invention, present invention also offers a kind of privately owned caching of file is set up Device, Fig. 6 is the privately owned buffer module component relation of file in privately owned one embodiment of caching method for building up of file of the present invention Figure, the device include:Tactful determination module 607 and the privately owned buffer processing module of file 608;
Above-mentioned tactful determination module 607, for the filtration callback information in receiving strategy, parsing IRP requests, then basis Both sides relation determines whether use the privately owned buffer of file;
The privately owned buffer processing module 608 of above-mentioned file, for the classification asked according to IRP, judges to different strategies The result of determination of module is processed;The IRP is processed if using the privately owned buffer of file to ask and by result shape State value returns to operating system nucleus, and if the privately owned buffer of file is not used, direct handoff operations service system is processed.
Based on the privately owned buffer architecture of flow process and file of the by the agency of of method above, above-mentioned tactful determination module 607 is wrapped Include:Callback information resolution unit 602, IRP request identifying unit 603 is filtered in the request of Policy receipt memory element 601, IRP;
Above-mentioned Policy receipt memory element 601, for receiving and storing IRP decision plans;
Above-mentioned IRP requests filtration callback information resolution unit 602, user's parsing or the corresponding file path of IRP requests, IRP request types, IRP demand file objects, the privately owned cache manager object of file of IRP request associations, file operation information Deng;
Above-mentioned IRP asks identifying unit 603, whether uses the privately owned buffer of file for decision-making, if IRP request correspondences File path or IRP demand files object and the privately owned buffer of file have unique corresponding relation, then it is privately owned slow using file Storage processes IRP requests, otherwise transfers to file system cache device to process.
Based on the privately owned buffer architecture of flow process and file of the by the agency of of method above, at the privately owned buffer of above-mentioned file Reason module 608 is included:The privately owned buffer processing unit 605, filename of the privately owned buffer list maintenance unit 604, file of file Claim to provide unit 606;
The privately owned buffer list maintenance unit 604 of above-mentioned file, the corresponding file path of the privately owned buffer of All Files are deposited In a global listings, list items include the privately owned buffer data information in file full path footpath, file for storage;
The privately owned buffer processing unit 605 of above-mentioned file, creates function, the privately owned caching of file including the privately owned buffer of file With file object correlation function, the privately owned buffer of file, device supports that system pre-reads the privately owned buffer of function, file and supports that system is prolonged Function is write late;
Above-mentioned title provider unit 606, other modules of kernel are according to the file object associated with the privately owned buffer of file Need to provide title provider unit during inquiry file name;The privately owned buffer list of title provider unit inquiry file is obtained File full path footpath information, is then back to file full path footpath information and gives kernel other modules.
A specific embodiment an of the inventive method is given below, in the present embodiment not only can be private using file There is buffer, while file content of the identical file of file-level without answering can be done processing.Here only with privately owned buffer Associated with Object Process is embodiment, and thus other processes process can be derived from;
If not doing additional description, the executable dbase of operation file is WORD.EXE, the complete trails of operation file For D:\TEMP\TEST.DOC;
Privately owned file association file object process embodiments:
A1, I/O Manager set up file object example _ FILE_OBJECT_TEST_DOC to operation file, then initiate text Part is opened or newly-built IRP requests;
After the privately owned buffer of B1, file intercepts IRP requests, adjust back from IRP parse current accessed in filtration information can Perform software and operation file path, and with IRP strategy decision condition decision-makings, if application program is in this embodiment WORD.EXE and file is D:TEMP TEST.DOC then perform C1, otherwise turn by operating system process;
The privately owned buffer of C1, associated with updates file object to file object example _ FILE_OBJECT_TEST_DOC In element include singly being not limited to FsContext, FsContext2, PrivateCacheMap, SectionObjectPointer};
D1, the process state value that IO_STATUS_BLOCK regions in IRP request filtration callback informations are set;Then to IO Manager returns IRP requests and has processed mark.
In sum, presently preferred embodiments of the present invention is these are only, is not intended to limit protection scope of the present invention, It is all within the spirit and principle of this law, any modification, equivalent substitution and improvements done etc., be all contained in the present invention protection Within the scope of.

Claims (9)

1. the method for building up of the privately owned caching of a kind of file, its step include:
1) all IRP requests are intercepted in operating system nucleus, in parsing IRP requests, filters readjustment processing information;
2) according to IRP strategy decision conditions:IRP types, process unique mark, file path mark and file content are selected Need to ask using the IRP of the privately owned caching of file, set up privately owned buffer;
3) if privately owned caching need not be used, file system cache process is handed to, filtered back by arranging an IRP request The value of processing information, I/O managers is adjusted to be automatically brought to File System Kernel process;If after turning by operating system nucleus process, Then file operation process will be using file system cache;
4) being selected according to IRP strategies needs to ask using the IRP of the privately owned caching of file, and in the privately owned buffer list of locating file With the presence or absence of this document;
5) the privately owned buffer of establishment file or directly the file object that file privately owned buffer is asked with current IRP is associated, text File object counting, file object access rights and file pair in the privately owned buffer update IRP requests filtration callback information of part As the incidence relation with the privately owned buffer of file;
6) the new privately owned buffer of file for creating includes system standard document unique mark head;
7) the IRP requests of the privately owned caching of file are performed, and result is returned into operating system nucleus.
2. the method for building up of the privately owned caching of file as claimed in claim 1, it is characterised in that the privately owned caching process of file IRP request types are selected from one or more following:File Open, closing of a file, file read-write.
3. the method for building up of the privately owned caching of file as claimed in claim 1, it is characterised in that by the IRP types, file road Footpath mark is used as the associated filtration readjustment processing information of IRP requests.
4. the method for building up of the privately owned caching of file as claimed in claim 1, it is characterised in that system is according to the system standard The privately owned caching of file unique mark head identification file, the system standard document unique mark head is the files-designated of a standard Know;Other modules of system carry out standard by the privately owned caching of the standard and file and interact.
5. the method for building up of the privately owned caching of file as claimed in claim 1, it is characterised in that the privately owned caching of the file is adopted What following method supported that system similarly configures pre-read and delay is write:
1) after system cache management initiation pre-reads or postpone write request, the privately owned caching of file receives file and pre-reads or postpone write request; The privately owned caching of the file obtains the lock of the privately owned caching of file of file object association;
2) the privately owned caching process file of the file pre-reads or postpones to write process, and more new file pre-reads or postpones to write and filters back Adjust parameter information, the lock of the privately owned caching of file of the privately owned caching releasing document object association of the file;
3) terminate to pre-read or postpones to write process and will pre-read or postpone to write status of processes value and return to system cache and manage.
6. the method for building up of the privately owned caching of file as claimed in claim 1, it is characterised in that the privately owned caching of the file and text Part system cache is independent mutually, and for identical file allows the privately owned caching of file to exist with file system cache simultaneously.
7. the method for building up of the privately owned caching of file as claimed in claim 1, it is characterised in that judged according to IRP strategies Condition is selected to be needed to ask using the IRP of the privately owned caching of file, and is checked according to following process:
1) the process unique mark that the associated filtration of IRP requests is adjusted back in processing information is checked, the process unique mark is confirmed Whether need to do the privately owned caching process of file;
2) file object that the associated filtration of IRP requests is adjusted back in processing information is checked, whether this document object is confirmed Do the privately owned caching process of file;
3) check that the file path mark in processing information is adjusted back in the associated filtration of IRP requests, confirm this document ID of trace route path Whether the privately owned caching process of file is being carried out;
4) file content that the associated filtration of IRP requests is adjusted back in processing information is checked, confirms whether this document needs to do text The privately owned buffer of part is processed;
5) step 1) -4) in any one step check the privately owned caching of needs, then stop checking;The step 1) -4) in such as After fruit turns by operating system nucleus process, file operation process uses file system cache.
8. the privately owned buffer storage of a kind of file, it is characterised in that be made up of tactful determination module and the privately owned buffer module of file,
The tactful determination module includes:Callback information resolution unit and IRP are filtered in Policy receipt memory element, IRP requests Request identifying unit;
The Policy receipt memory element is used to receive strategy;
The filtration callback information in the parsing IRP requests of callback information resolution unit is filtered in the IRP requests;
The IRP requests identifying unit is determined whether using the privately owned buffer of file;
The privately owned buffer module of the file is tied for the classification asked according to IRP, the judgement to different tactful determination modules Fruit is processed;The IRP is processed if using the privately owned buffer of file to ask and result state value is returned to behaviour Make system kernel, direct handoff operations service system is processed if the privately owned buffer of file is not used;Including:File is privately owned slow The privately owned buffer processing unit of storage list maintenance unit, file, file name provide unit;
The privately owned buffer list maintenance unit of the file, for All Files privately owned buffer corresponding file path is stored In a global listings, wherein list items include the privately owned buffer data information in file full path footpath, file;
The privately owned buffer processing unit of the file, there is provided the privately owned buffer of file creates function, the privately owned buffer of file with text The privately owned buffer of part object correlation function, file supports that system pre-reads the privately owned buffer of function, file and supports that system delay writes work( Energy;
The title provider unit, for other modules of kernel according to the file object inquiry associated with the privately owned buffer of file File name.
9. the privately owned buffer storage of file as claimed in claim 8, it is characterised in that the privately owned buffer of the file provides establishment Function, when file is first switched on according to the privately owned buffer of IRP decision condition establishment files;The privately owned buffer of the file is carried For with file object correlation function, searched and file from the privately owned buffer list of file according to the complete trails of file object first The privately owned buffer of file of object unique association, caching relevant information, the file object authority for then updating file object are related File object is finally added to file list object in the privately owned buffer of file by information.
CN201310517191.4A 2013-10-28 2013-10-28 File private cache establishing method and device Active CN103544287B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310517191.4A CN103544287B (en) 2013-10-28 2013-10-28 File private cache establishing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310517191.4A CN103544287B (en) 2013-10-28 2013-10-28 File private cache establishing method and device

Publications (2)

Publication Number Publication Date
CN103544287A CN103544287A (en) 2014-01-29
CN103544287B true CN103544287B (en) 2017-04-19

Family

ID=49967739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310517191.4A Active CN103544287B (en) 2013-10-28 2013-10-28 File private cache establishing method and device

Country Status (1)

Country Link
CN (1) CN103544287B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833557A (en) * 2009-05-25 2010-09-15 深圳市朗科科技股份有限公司 File caching method and device based on application program
CN102696020A (en) * 2009-11-16 2012-09-26 赛门铁克公司 Selective file system caching based upon a configurable cache map
CN103077243A (en) * 2013-01-16 2013-05-01 北京数码视讯科技股份有限公司 Processing method and system for file system access

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9244933B2 (en) * 2011-04-29 2016-01-26 International Business Machines Corporation Disk image introspection for storage systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833557A (en) * 2009-05-25 2010-09-15 深圳市朗科科技股份有限公司 File caching method and device based on application program
CN102696020A (en) * 2009-11-16 2012-09-26 赛门铁克公司 Selective file system caching based upon a configurable cache map
CN103077243A (en) * 2013-01-16 2013-05-01 北京数码视讯科技股份有限公司 Processing method and system for file system access

Also Published As

Publication number Publication date
CN103544287A (en) 2014-01-29

Similar Documents

Publication Publication Date Title
US8290994B2 (en) Obtaining file system view in block-level data storage systems
US7792301B2 (en) Access control and encryption in multi-user systems
US9851918B2 (en) Copy-on-write by origin host in virtual machine live migration
CN104767834B (en) System and method for the transmission for accelerating to calculate environment to remote user
US7925751B1 (en) Mechanism for controlled sharing of files in a clustered application environment
CN109791594A (en) Data are segmented in order to persistently be stored in multiple immutable data structures
US9785378B2 (en) Tracking transformed memory pages in virtual machine chain migration
US20020157016A1 (en) Data security for distributed file systems
CN104268484B (en) Data leakage prevention method under a kind of cloud environment based on virtual isolation mech isolation test
Jujjuri et al. VirtFS–a virtualization aware file system passthrough
CN104301289B (en) Equipment for safety information interaction
CN107180102A (en) The storage method and system of a kind of target characteristic data
US8635361B2 (en) Transaction acceleration using application-specific locking
CN109684231A (en) The system and method for dsc data in solid-state disk and stream for identification
CN106406986A (en) Resource sharing method and device
US8387127B1 (en) Storage security appliance with out-of-band management capabilities
US10922272B2 (en) Providing data across multiple clusters in a single namespace
US20210149759A1 (en) Application crash analysis techniques when memory dump and debug symbols are not co-located
WO2013174195A1 (en) Document authority control method, device and system
US8935751B1 (en) Method for extending the fragment mapping protocol to prevent malicious access to virtualized storage
CN110008197A (en) A kind of data processing method, system and electronic equipment and storage medium
CN108319849A (en) Equipment strategy management system based on Android twin containers system and management domain implementation method
CN108229190A (en) Control method, device, program, storage medium and the electronic equipment of transparent encryption and decryption
CN104123371B (en) The method of the transparent filtering of Windows kernel files based on hierarchical file system
US8543700B1 (en) Asynchronous content transfer

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant