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

File private cache establishing method and device Download PDF

Info

Publication number
CN103544287A
CN103544287A CN201310517191.4A CN201310517191A CN103544287A CN 103544287 A CN103544287 A CN 103544287A CN 201310517191 A CN201310517191 A CN 201310517191A CN 103544287 A CN103544287 A CN 103544287A
Authority
CN
China
Prior art keywords
file
privately owned
owned buffer
irp
buffer memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310517191.4A
Other languages
Chinese (zh)
Other versions
CN103544287B (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

Images

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

The privately owned buffer memory method for building up of a kind of file and device
Technical field
The present invention relates to file cache method for building up and device, particularly the method and apparatus of the privately owned buffer memory of file, belongs to file cache field.
Background technology
Windows operating system is in order to improve the efficiency of application program access file, and for Single document provides caching mechanism, this caching mechanism only has a buffer memory to Single document.But the current different application for identical file is distinguished the product of content and is all had following defect:
The high file destroyed that causes of coupling with operating system: traditional identical file content distinguishes product and file system cache device shares Single document buffer memory, this type products can cause data and the data in file disk in file cache inconsistent to data cached operation, finally causes file destroyed.
The inconsistency of application program access identical file causes application program to work: traditional identical file content is distinguished product and non-protection application program adopted to the processing mode of refusal or deception, and this type of process mode causes different application samely operates in the inconsistent of identical file; Simultaneously content distinguish product must be according to the operation of file time the access of buffer status application programs do consistance and control, this Type Control causes same application samely operates in the inconsistent of different time access identical file; These two kinds of inconsistencies cause application program to have Different Results to the same type operation of file, finally cause application program to work.
The transparent encryption and decryption product of the terminal of take is example; traditional transparent encryption and decryption of digital computing system terminal provides a kind of data anti-method of divulging a secret; the method is divided file content to protected application program and non-protected application area, and the encrypted file data that non-protected application program reads is ciphertext all the time.But use the transparent encryption and decryption product of traditional single caching technology and file system cache device to share Single document buffer memory, the data in the file cache of transparent encryption and decryption product treatment are expressly, and data in the file cache that file system is processed are ciphertexts.Therefore use the transparent encryption and decryption product of traditional single caching technology accurate in order to guarantee the state of file in buffer memory, must carry out buffer memory frequently and switch, this frequently switching in is in particular cases easy to cause file destroyed.Further; the transparent encryption and decryption product that uses traditional single caching technology in order to ensure buffer status accurately; can forbid that protected application program and non-protected application program access same encrypt file simultaneously, this control mode probably causes a certain application program to work.
Summary of the invention
The privately owned buffer memory of file mentions that as the present invention a new concept proposes, the privately owned buffer memory of file be defined as with file system cache independently and the buffer memory with file system cache said function and attribute realize, and the privately owned buffer memory of file and file system cache allow to exist for same file simultaneously.
The new concept that the privately owned buffer of file is mentioned as the present invention simultaneously proposes, and the privately owned buffer of file is defined as the functional module of processing the privately owned buffer memory of file.
The invention provides the method that the privately owned buffer memory of a kind of file is set up, solve file content differentiation product and cause file content to destroy problem, the application program that while solving for maintenance operation, file buffer status causes simultaneously cannot work problem.
The present invention also provides a kind of file device that privately owned buffer memory is set up, and solves file content differentiation product and causes file content to destroy problem, and the application program that while solving for maintenance operation, file buffer status causes simultaneously cannot work problem.
A method for building up for the privately owned buffer memory of file, its step comprises:
1) at operating system nucleus, tackle all IRP requests, initiate the application program of IRP request without revising any function, interface, module, the privately owned buffer of file is supported all software, all types of IRP request;
2) according to IRP strategy decision condition: IRP type, process unique identification, file path sign and file content are selected the IRP request that need to use the privately owned buffer memory of file, set up privately owned buffer;
3) IRP of the privately owned buffer memory of execute file request, and result is returned to operating system nucleus.
Further, the IRP request type of the privately owned caching process of file is preferable over following one or more: File Open, closing of a file, file read-write.
Further, the filtration readjustment process information described IRP type, file path sign being associated as described IRP request.
Further, establishment and the association process of setting up described privately owned buffer respective file are:
1) from IO manager, receive IRP request, resolve filtration readjustment process information in IRP request;
2) according to IRP strategy, select the IRP request that need to use the privately owned buffer memory of file, and whether have this document in the privately owned buffer list of locating file;
3) create the privately owned buffer of file or directly that the privately owned buffer of file is associated with the file object of current I RP request, the incidence relation of file object counting, file object access rights and file object and the privately owned buffer of file in callback information is filtered in the privately owned buffer update IRP request of file.
4) the new privately owned buffer of file creating comprises system standard file unique identification head;
5) if do not need, do not use privately owned buffer memory, hand to file system cache and process, the value of filtering readjustment process information by an IRP request is set, I/O manager is automatically brought to File System Kernel and processes; If after turning and being processed by operating system nucleus, file operation process will be used file system cache.
Further, system is according to the privately owned buffer memory of described system standard file unique identification head identification file, and described system standard file unique identification head is the file identification of a standard; It is mutual that other module of system is carried out standard by this standard and the privately owned buffer memory of file.
Further, the privately owned buffer memory of described file is adopted pre-reading of the identical configuration of back-up system with the following method and delay is write:
1) system cache management is initiated to pre-read or is postponed after write request the privately owned buffer memory of file and receives file and pre-read or postpone write request; The privately owned buffer memory of described file obtains the lock of the privately owned buffer memory of file of file object association;
2) the privately owned caching process file of described file pre-reads or postpones to write process, and updating file pre-reads or postpones to write and filters readjustment parameter information, the lock of the privately owned buffer memory of file of the privately owned buffer memory releasing document of described file object association;
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 management.
Further, the privately owned buffer memory of described file and file system cache are independent mutually, and allow the privately owned buffer memory of file and file system cache to exist for identical file simultaneously.
Further, according to described IRP strategy decision condition, select the IRP request that need to use the privately owned buffer memory of file, and check according to following process:
1) check that IRP asks the filtration being associated to adjust back the process unique identification in process information, confirms whether this process unique identification needs to do the privately owned caching process of file;
2) check that IRP asks the filtration being associated to adjust back the file object in process information, confirms whether this document object has done the privately owned caching process of file;
3) check that IRP asks the filtration being associated to adjust back the file path sign in process information, confirms whether this document ID of trace route path is carrying out the privately owned caching process of file;
4) check that IRP asks the filtration being associated to adjust back the file content in process information, confirm whether this document needs to do the privately owned buffer of file and process;
5) described step 1)-4), any step checks out needs privately owned buffer memory, stops checking; Described step 1)-4) if in turn and processed by operating system nucleus after, file operation process is used file system cache.
The present invention also proposes the privately owned buffer storage of a kind of file, it is characterized in that, by tactful determination module and the privately owned buffer module of file, formed,
Described tactful determination module comprises: strategy receives storage unit, callback information resolution unit and IRP request identifying unit are filtered in IRP request;
Described strategy receives storage unit and is used for receiving strategy;
Described IRP request is filtered callback information resolution unit and is resolved the filtration callback information in IRP request;
Described IRP request identifying unit determines whether and uses the privately owned buffer of file;
The privately owned buffer module of described file, for according to the classification of IRP request, is processed the result of determination of different tactful determination modules; If use the privately owned buffer of file, process this IRP request and result state value is returned to operating system nucleus, if do not use the privately owned buffer of file, directly deliver operating system system and process; This module comprises: the privately owned buffer list of file maintenance unit, the privately owned buffer processing unit of file, file name provide unit;
The privately owned buffer list of described file maintenance unit, for file path corresponding to the privately owned buffer of All Files is stored in to a global listings, wherein list items comprises file complete trails, the privately owned buffer data message of file;
The privately owned buffer processing unit of described file, provides the privately owned buffer establishment of file function, the privately owned buffer of file and file object correlation function, the privately owned buffer back-up system of file pre-read function, the privately owned buffer back-up system of file postpones to write function;
Described title provides device unit, for other module basis of kernel file object inquiry file title associated with the privately owned buffer of file.
Further, the privately owned buffer of described file provides establishment function, when file is opened for the first time, according to IRP decision condition, creates the privately owned buffer of file; The privately owned buffer of described file provides and file object correlation function, first according to the complete trails of file object, from the privately owned buffer list of file, search and the privately owned buffer of the unique associated file of file object, then the buffer memory relevant information of updating file object, file object authority relevant information, finally add file object to file list object in the privately owned buffer of file.
Beneficial effect of the present invention:
Target of the present invention is to realize the privately owned buffer memory of a kind of file set up and use, and the privately owned buffer memory of this file can file system cache and deposited, and the privately owned buffer memory of this file and file system cache with other module reciprocal process equivalent of operating system.In the method and apparatus of the privately owned buffer memory of file of the present invention, there is the strong coupling problem that can solve between identical file different application content differentiation product and operating system file caching process in the privately owned buffer memory of file and file system cache simultaneously; Simultaneously the mode of operation of the privately owned buffer memory of file is identical with file system cache, without any change, has solved the consistency problem that application program is accessed identical file for application file mode of operation and fileinfo.If method provided by the invention is applied in (but being not limited to this kind of range of application of transparent encryption and decryption product) in transparent encryption and decryption product; do not need file cache frequently to switch, simultaneously do not force to forbid that protected application program and non-protected application program access same encrypt file simultaneously.
Accompanying drawing explanation
Fig. 1 is the relational structure schematic diagram of the privately owned buffer memory of file and file system in the privately owned buffer memory method for building up of file of the present invention;
Fig. 2 is that in privately owned buffer memory method for building up one embodiment of file of the present invention, the privately owned buffer memory of file is set up and association process process flow diagram;
Fig. 3 a is the pre-read procedure schematic diagram of the privately owned buffer supporting document of file in privately owned buffer memory method for building up one embodiment of file of the present invention;
Fig. 3 b is that in privately owned buffer memory method for building up one embodiment of file of the present invention, the privately owned buffer supporting document of file postpones to write process schematic diagram;
Fig. 4 is that in privately owned buffer memory method for building up one embodiment of file of the present invention, file name provides device process flow diagram;
Fig. 5 is the privately owned buffer data structure diagram of file in privately owned buffer memory method for building up one embodiment of file of the present invention;
Fig. 6 is the privately owned buffer module component relation of file figure in privately owned buffer storage one embodiment of file of the present invention.
Fig. 7 is the privately owned buffer memory schematic flow sheet of file in privately owned buffer memory method for building up one embodiment of file of the present invention.
Embodiment
For making objects and advantages of the present invention clearer, below in conjunction with drawings and Examples, the present invention is described in further detail.
Fig. 7 is the privately owned buffer memory schematic flow sheet of file in privately owned buffer memory method for building up one embodiment of file of the present invention.First at operating system nucleus, tackle all IRP requests; Then according to IRP strategy decision condition: IRP type, process unique identification, file path sign and file content are selected the IRP request that need to use the privately owned buffer memory of file, set up privately owned buffer memory; Finally carry out the IRP request of using the privately owned buffer memory of file, and result is returned to operating system nucleus.
Technical scheme of the present invention is to realize so as shown in Figure 7;
The method that the privately owned buffer memory of file is set up, its key is that the privately owned buffer of file and file system cache device are independent mutually, and allows the privately owned buffer memory of file and file system cache to exist for identical file simultaneously; The method also includes, but are not limited to following process:
Step 1, from operating system nucleus, tackle all IRP requests (I/O Request Packet);
Step 2, the IRP request that these are intercepted are carried out decision-making with IRP strategy decision condition and whether are used the privately owned buffer of file, and wherein IRP strategy decision condition is based on IRP type, process unique identification, file path sign, file content; If use the privately owned buffer execution step 3 of file, continue to process otherwise turn by operating system nucleus;
Step 3, on the privately owned buffer of file, carry out these IRP request, and result phase is returned to operating system nucleus.
In order to make this method clearer and more definite, here the privately owned buffer processing procedure of file is elaborated:
IRP request full name is I/O Request Packet(I/O request bag), the IRP request type that the privately owned buffer of file is processed includes but not limited to Types Below: File Open, closing of a file, file read-write etc.;
IRP strategy decision condition comprises: IRP type, process unique identification, file path sign, file content, wherein IRP type, file path sign are received as the filtration readjustment process information being associated with these IRP requests.
IRP request is carried out decision process with IRP strategy decision condition and is comprised the following steps:
A) in operating system, tackle all IRP requests;
B) check that IRP asks the filtration being associated to adjust back the process unique identification in process information, confirm whether this process unique identification needs to do the privately owned buffer of file and process; If need to do the privately owned buffer of file, process, turn by the privately owned buffer of file and process; Otherwise turn by step c), process;
C) check that IRP asks the filtration being associated to adjust back the file object in process information, confirm whether this document object has been done the privately owned buffer of file and processed; If done the privately owned buffer of file, process, turn by the privately owned buffer of file and process; Otherwise turn by step d), process;
D) check that IRP asks the filtration being associated to adjust back the file path sign in process information, confirms whether this document ID of trace route path is carrying out the privately owned caching process of file; If the privately owned buffer of WKG working file is processed, turn by the privately owned buffer of file and process; Otherwise turn by step e), process;
E) check that IRP asks the filtration being associated to adjust back the file content in process information, confirm whether this document needs to do the privately owned buffer of file and process; If done the privately owned buffer of file, process, turn by the privately owned buffer of file and process; Otherwise turn by operating system nucleus, process; If after turning and being processed by operating system nucleus, file operation process so will be used file system cache.
To all types IRP, request processes in the method, and the IRP request processing mode of every type is not quite similar, and above-mentioned decision process step is applicable to all types IRP request.
Operating system nucleus intercept process adopts standard operation system functional interface in an embodiment of the present invention.
For the IRP request of each File Open action type, can set up in an embodiment of the present invention that independently file handle is associated with the privately owned buffer of this document, the privately owned buffer of file handle and file is many-to-one relation.
On the privately owned buffer of file, carrying out in an embodiment of the present invention these IRP request process comprises the following steps:
1) check that IRP asks the filtration readjustment process information being associated to be confirmed whether to create the privately owned buffer memory of this document, wherein exists a unique privately owned buffer memory of file corresponding with it for a file; If created the privately owned buffer memory of file, turned by step 3) process; Otherwise turn by step 2) process;
2) the filtration readjustment process information that request is associated according to IRP creates the privately owned buffer memory of file of this document, sets up the one-to-one relationship of file and the privately owned buffer memory of file simultaneously;
3) on the privately owned buffer of file, carry out these IRP requests, implementation is identical with the operating process of operating system normative document, repeats no more;
The IRP request that the privately owned buffer of All Files is processed is returned to result state to operating system system kernel, and this result state is in order to illustrate whether this IRP request runs succeeded; If processed unsuccessfully, this result phase value illustrates concrete failure cause; This result phase value is corresponding with operating system standard.
The device that the privately owned buffer memory of a kind of file that the present invention also proposes is set up, its key is the privately owned buffer memory of the relatively independent file of foundation and use and file system, and allows the privately owned buffer memory of file and file system cache to exist for identical file simultaneously; This device comprises:
Strategy determination module, for receiving strategy, resolving the filtration callback information that IRP asks, then makes a determination whether use the privately owned buffer of file according to both sides relation;
The privately owned buffer module of file, for according to the classification of IRP request, processes the result of determination of different tactful determination modules; If use the privately owned buffer of file, process this IRP request and result is returned to operating system nucleus, if do not use the privately owned buffer of file, directly deliver operating system system and process.
For making this device clearer and more definite, here the various piece of the privately owned cache device of file is elaborated:
In tactful determination module, comprise: strategy receives storage unit, IRP asks filtration callback information resolution unit, IRP to ask identifying unit;
Described strategy receives storage unit, for receiving and storage IRP decision plan;
Callback information resolution unit is filtered in described IRP request, for resolving IRP, asks corresponding file path, IRP request type, IRP demand file object, IRP to ask the privately owned cache manager object of associated file, file operation information etc.;
Whether described IRP request identifying unit, use the privately owned buffer of file for decision-making, if use the privately owned buffer of file to process, has the privately owned buffer of file to process IRP request, otherwise transfer to file system cache device to process.
In the privately owned buffer module of file, comprise: the privately owned buffer list of file maintenance unit, the privately owned buffer processing unit of file, file name provide unit;
The privately owned buffer list of described file maintenance unit, corresponding file path is stored in a global listings, and wherein list items comprises file complete trails, the privately owned buffer data message of file;
The privately owned buffer processing unit of described file, comprises the privately owned buffer establishment of file function, the privately owned buffer of file and file object correlation function, the privately owned buffer back-up system of file pre-read function, the privately owned buffer back-up system of file postpones to write function.
It is the balanced binary tree that parameter is processed according to file complete trails that the privately owned buffer list of file is wherein one, in the IRP request for unique file, comprise be not limited to that file is newly-built, file polling, file rename, file are deleted, closing of a file; All need list to upgrade.
The privately owned buffer of file creates function in an embodiment of the present invention, opens for the first time or create to create the privately owned buffer of file need to create collected works independence buffer memory according to IRP decision condition time when file; First constructive process is applied for and initialization nonpagepool space, then, to the privately owned buffer of operating system cache manager register-file, is finally deposited the privately owned buffer of file and file complete trails in list.
The privately owned buffer of file and file object correlation function in an embodiment of the present invention, first according to the complete trails of file object, from the privately owned buffer list of file, search and the privately owned buffer of the unique associated file of file object, then the buffer memory relevant information of updating file object, file object authority relevant information, finally add file object to file list object in the privately owned buffer of file.
The privately owned buffer back-up system of file pre-reads function in an embodiment of the present invention, for a privately owned cache manager of file that has been registered to operating system cache manager, when operating system cache manager, adjudicate and need to pre-read the function that pre-reads that can call the privately owned buffer of file when file improves system performance, the privately owned cache management of file pre-reads functional module and processes corresponding IRP request, then result state value is returned to operating system cache manager.
The privately owned buffer back-up system of file postpones to write function in an embodiment of the present invention, for a privately owned cache manager of file that has been registered to operating system cache manager, when operating system cache manager, adjudicate the delay that need to postpone can to call when written document improves system performance the privately owned buffer of file and write function, the privately owned cache management of file pre-reads functional module and processes corresponding IRP request, then result state value is returned to operating system cache manager.
Other module of kernel that title provides device unit in an embodiment of the present invention need to provide title that device unit is provided during according to the file object inquiry file title associated with the privately owned buffer of file; Title provides inquiry file privately owned buffer list in device unit to obtain file complete trails information, and then backspace file complete trails information is to other module of kernel.
Execution environment of the present invention is at operating system nucleus, explanation unless necessary, the following stated with the mutual module of the privately owned buffer memory of file be all in operating system nucleus.
The present invention and application program are irrelevant, and application program is without revising any function, interface, module.
In the following detailed description, a lot of details have been provided, for example specific method order, structure, element connector.Yet should be understood that, this and other detail such as: public general knowledge, system environments element etc. does not elaborate one by one.
Fig. 1 is the relational structure schematic diagram of the privately owned buffer memory of file and file system in the privately owned buffer memory method for building up of file of the present invention; In this relation structure diagram, represent that the privately owned buffer memory 101 of file is separate with file system cache 105, and both can coexist; This graph of a relation represents that the privately owned buffer memory 101 of file and file system cache 105 are all to receive IRP request from IRP manager 100; The privately owned buffer memory 101 of file and file system cache 105 are all that dependent file system 102 realizes file operation; The privately owned buffer memory 101 of file and file system cache 105 directly do not depend on physical disk, therefore the privately owned buffer memory 101 of file and physical disk 103 are without any direct relation.
If also expressing, Fig. 1 need fetch data by the privately owned cache read of file, need so successively by IRP manager 100, the privately owned buffer memory 101 of file, file system 102 and physical disk 103, if do not need to fetch data by the privately owned cache read of file, need so successively by IRP manager 100, file system cache 105, file system 102 and physical disk 103; Identical by the privately owned buffering write data process of file; Article two, path application programs equates completely, and application program is without revising any function, interface, module.
Fig. 2 is that in privately owned buffer memory method for building up one embodiment of file of the present invention, the privately owned buffer memory of file is set up and association process process flow diagram;
The privately owned buffer of step 201 file receives IRP request from IO manager;
Step 202 is resolved IRP and is filtered readjustment process information;
Step 203 judges that according to strategy whether IRP request needs to use privately owned buffer memory, if perform step 204, otherwise performs step 205;
In the privately owned buffer list of step 204 locating file, whether there is this document, if there is execution step 206, otherwise perform step 207;
Step 205 is handed to file system cache device and is processed;
In this step, the privately owned buffer of file does not need to process this IRP request, an IRP request is set and filters after the value of readjustment process information, and IO manager can be automatically brought to file system cache device and process;
Step 206 is associated with current I RP request object by the privately owned buffer of file;
In this step, the privately owned buffer of file can upgrade IRP request and filter the information such as cache object in callback information, file unique identification object, file read-write authority; In this process after file object association file independence buffer, file object in the IRP request of follow-up other type can, with the file cache device having upgraded, can directly be processed other IRP by the privately owned buffer of file subsidiary in file object and ask;
Step 207 creates the privately owned buffer of file, then performs step 206 the privately owned buffer of newly-built file is associated with file object;
In this step, the new privately owned buffer of file creating comprises system standard file unique identification head, and concrete data structure is referring to the privately owned buffer data structure of Fig. 5 file;
Fig. 5 is the privately owned buffer data structure diagram of file in privately owned buffer memory method for building up one embodiment of file of the present invention; In this data structure, first comprise a system standard file unique identification head, according to this marking head, it is the file identification of a standard that other module of system can be identified the privately owned buffer of file; Thus other module of operating system by this standard and the privately owned buffer of file, to carry out some standards mutual, reach thus the privately owned buffer memory of file and file system cache equivalent;
Step 208 finishes IRP request and IRP request treatment state value is set;
Step 209 returns to operating system and processes.
Fig. 3 a is the pre-read procedure schematic diagram of the privately owned buffer supporting document of file in privately owned buffer memory method for building up one embodiment of file of the present invention; Fig. 3 b is that in privately owned buffer memory method for building up one embodiment of file of the present invention, the privately owned buffer supporting document of file postpones to write process schematic diagram.Whether function is write in the delay of the identical configuration of the privately owned buffer back-up system of privately owned file of setting up, by the decision-making of system cache manager, needed to postpone to write; The identical configuration of the privately owned buffer back-up system of privately owned file of wherein setting up pre-read function, by the decision-making of system cache manager, whether needed to pre-read.
In the present invention, pre-reading with buffer memory of the identical configuration of the privately owned buffer back-up system of file write, and Fig. 3 a is the pre-read procedure of the privately owned buffer supporting document of file, and Fig. 3 b is that the privately owned buffer supporting document of file postpones to write process;
The privately owned buffer supporting document of above-mentioned file pre-reads process steps and comprises:
Step 301: system cache manager is initiated pre-read request;
Step 302: the privately owned buffer memory of file receives the pre-read request of file;
Step 303: the privately owned buffer memory 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 updating file pre-reads filtration readjustment parameter information;
Step 305: the lock of the privately owned buffer of file of the privately owned buffer memory releasing document of file object association;
Step 306: finish pre-read procedure and will pre-read status of processes value to return to system cache manager;
The privately owned buffer supporting document of above-mentioned file postpones to write process steps and comprises:
Step 301 ': system cache manager initiates to postpone write request;
Step 302 ': the privately owned buffer memory of file receives file and postpones write request;
Step 303 ': the privately owned buffer memory of file obtains the lock of the privately owned buffer of file of file object association;
Step 304 ': the privately owned caching process file of file postpones to write process, and updating file postpones to write filtration readjustment parameter information;
Step 305 ': the lock of the privately owned buffer of file of the privately owned buffer memory releasing document of file object association;
Step 306 ': finish to postpone the process of writing and the privately owned buffer status value of file that postpones the process of writing is returned to system cache manager.
Fig. 4 is that in privately owned buffer memory method for building up one embodiment of file of the present invention, file name provides device process flow diagram;
Step 401 is obtained file object correlation parameter from callback interface;
Step 402 judges whether file object parameter has used the privately owned buffer of file; If perform step 403, otherwise perform step 404;
Step 403 judges that the privately owned buffer of the file of file object association whether in the privately owned buffer list of file, if there is execution step 405, otherwise performs step 406;
Step 404 is handed to file system processing and is obtained filename processing procedure;
Step 405 is obtained file name from the privately owned buffer list of file, and updating file object correlation parameter;
Step 406 is from being initiated to obtain file name from file system by the privately owned buffer of file, then updating file image parameter; This step and step 404 are had any different, and step 404 directly returns to file system and processes, not any information in updating file object;
Step 407 file cache device arranges file name request results state value after processing file name;
Step 408 returns to file system.
For realizing the method for the privately owned buffer memory of file in the present invention, the present invention also provides a kind of file device that privately owned buffer memory is set up, Fig. 6 is the privately owned buffer module component relation of file figure in privately owned buffer memory method for building up one embodiment of file of the present invention, and this device comprises: the privately owned buffer processing module 608 of tactful determination module 607 and file;
Above-mentioned tactful determination module 607, for receiving strategy, resolving the filtration callback information that IRP asks, then makes a determination whether use the privately owned buffer of file according to both sides relation;
The privately owned buffer processing module 608 of above-mentioned file, for according to the classification of IRP request, processes the result of determination of different tactful determination modules; If use the privately owned buffer of file, process this IRP request and result state value is returned to operating system nucleus, if do not use the privately owned buffer of file, directly deliver operating system system and process.
Based on method above flow process and the privately owned buffer structure of file of by the agency of, above-mentioned tactful determination module 607 comprises: strategy receives that storage unit 601, IRP request are filtered callback information resolution unit 602, IRP asks identifying unit 603;
Above-mentioned strategy receives storage unit 601, for receiving and storage IRP decision plan;
Callback information resolution unit 602 is filtered in above-mentioned IRP request, and user resolves or IRP asks corresponding file path, IRP request type, IRP demand file object, IRP to ask the privately owned cache manager object of associated file, file operation information etc.;
Above-mentioned IRP request identifying unit 603, for decision-making, whether use the privately owned buffer of file, if IRP asks corresponding file path or IRP demand file object and the privately owned buffer of file to have unique corresponding relation, use the privately owned buffer of file to process IRP request, otherwise transfer to file system cache device to process.
Based on method above flow process and the privately owned buffer structure of file of by the agency of, the privately owned buffer processing module 608 of above-mentioned file comprises: the privately owned buffer list of file maintenance unit 604, the privately owned buffer processing unit 605 of file, file name provide unit 606;
The privately owned buffer list of above-mentioned file maintenance unit 604, the file path that the privately owned buffer of All Files is corresponding is stored in a global listings, and list items comprises file complete trails, the privately owned buffer data message of file;
The privately owned buffer processing unit 605 of above-mentioned file, comprises the privately owned buffer establishment of file function, the privately owned buffer of file and file object correlation function, the privately owned buffer back-up system of file pre-read function, the privately owned buffer back-up system of file postpones to write function;
Above-mentioned title provides device unit 606, and other module of kernel need to provide title that device unit is provided during according to the file object inquiry file title associated with the privately owned buffer of file; Title provides inquiry file privately owned buffer list in device unit to obtain file complete trails information, and then backspace file complete trails information is to other module of kernel.
Provide a specific embodiment an of the inventive method below, not only can use in the present embodiment the privately owned buffer of file, can do the file content that the identical file of file-level need not answer simultaneously and process.Here the privately owned buffer associated with object process of only take is embodiment, and other process thus process derivation draws;
If do not do additional description, operation file can executive software name be called WORD.EXE, the complete trails of operation file is D: TEMP TEST.DOC;
Privately owned file association file object implementation Process example:
A1, IO manager are set up file object example _ FILE_OBJECT_TEST_DOC to operation file, then initiate File Open or newly-built IRP request;
After B1, the privately owned buffer intercepting of file IRP request, what from IRP readjustment filtering information, parse current accessed can executive software and operation file path, and with the decision-making of IRP strategy decision condition, if in this embodiment application program be WORD.EXE and file be D: TEMP TEST.DOC; carry out C1, otherwise turn by operating system, process;
C1, the privately owned buffer of associated be to file object example _ FILE_OBJECT_TEST_DOC, and the element in updating file object comprises singly and is not limited to { FsContext, FsContext2, PrivateCacheMap, SectionObjectPointer};
D1, the treatment state value that IO_STATUS_BLOCK region in callback information is filtered in IRP request is set; Then to IO manager, return to IRP request and processed sign.
In sum, these are only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention, all within the spirit and principle of this law, any modification of making, be equal to replacement, improvement etc., within being all included in protection scope of the present invention.

Claims (10)

1. a method for building up for the privately owned buffer memory of file, its step comprises:
1) at operating system nucleus, tackle all IRP requests;
2) according to IRP strategy decision condition: IRP type, process unique identification, file path sign and file content are selected the IRP request that need to use the privately owned buffer memory of file, set up privately owned buffer;
3) IRP of the privately owned buffer memory of execute file request, and result is returned to operating system nucleus.
2. the method that the privately owned buffer memory of file as claimed in claim 1 is set up, is characterized in that, the IRP request type of the privately owned caching process of file is preferable over following one or more: File Open, closing of a file, file read-write.
3. the method that the privately owned buffer memory of file as claimed in claim 1 is set up, is characterized in that, the filtration readjustment process information that described IRP type, file path sign are associated as described IRP request.
4. the method that the privately owned buffer memory of file as claimed in claim 1 is set up, is characterized in that, establishment and the association process of setting up described privately owned buffer respective file are:
1) from IO manager, receive IRP request, resolve filtration readjustment process information in IRP request;
2) according to IRP strategy, select the IRP request that need to use the privately owned buffer memory of file, and whether have this document in the privately owned buffer list of locating file;
3) create the privately owned buffer of file or directly that the privately owned buffer of file is associated with the file object of current I RP request, the incidence relation of file object counting, file object access rights and file object and the privately owned buffer of file in callback information is filtered in the privately owned buffer update IRP request of file.
4) the new privately owned buffer of file creating comprises system standard file unique identification head;
5) if do not need, do not use privately owned buffer memory, hand to file system cache and process, the value of filtering readjustment process information by an IRP request is set, I/O manager is automatically brought to File System Kernel and processes; If after turning and being processed by operating system nucleus, file operation process will be used file system cache.
5. the method that the privately owned buffer memory of file as claimed in claim 4 is set up, is characterized in that, system is according to the privately owned buffer memory of described system standard file unique identification head identification file, and described system standard file unique identification head is the file identification of a standard; It is mutual that other module of system is carried out standard by this standard and the privately owned buffer memory of file.
6. the method that the privately owned buffer memory of file as claimed in claim 1 is set up, is characterized in that, the privately owned buffer memory of described file adopts pre-reading of the identical configuration of back-up system with the following method and delay is write:
1) system cache management is initiated to pre-read or is postponed after write request the privately owned buffer memory of file and receives file and pre-read or postpone write request; The privately owned buffer memory of described file obtains the lock of the privately owned buffer memory of file of file object association;
2) the privately owned caching process file of described file pre-reads or postpones to write process, and updating file pre-reads or postpones to write and filters readjustment parameter information, the lock of the privately owned buffer memory of file of the privately owned buffer memory releasing document of described file object association;
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 management.
7. the method that the privately owned buffer memory of file as claimed in claim 1 is set up, is characterized in that, the privately owned buffer memory of described file and file system cache are independent mutually, and allows the privately owned buffer memory of file and file system cache to exist for identical file simultaneously.
8. the method that the privately owned buffer memory of file as claimed in claim 1 is set up, is characterized in that, selects the IRP request that need to use the privately owned buffer memory of file, and check according to following process according to described IRP strategy decision condition:
1) check that IRP asks the filtration being associated to adjust back the process unique identification in process information, confirms whether this process unique identification needs to do the privately owned caching process of file;
2) check that IRP asks the filtration being associated to adjust back the file object in process information, confirms whether this document object has done the privately owned caching process of file;
3) check that IRP asks the filtration being associated to adjust back the file path sign in process information, confirms whether this document ID of trace route path is carrying out the privately owned caching process of file;
4) check that IRP asks the filtration being associated to adjust back the file content in process information, confirm whether this document needs to do the privately owned buffer of file and process;
5) described step 1)-4), any step checks out needs privately owned buffer memory, stops checking; Described step 1)-4) if in turn and processed by operating system nucleus after, file operation process is used file system cache.
9. the privately owned buffer storage of file, is characterized in that, by tactful determination module and the privately owned buffer module of file, formed,
Described tactful determination module comprises: strategy receives storage unit, callback information resolution unit and IRP request identifying unit are filtered in IRP request;
Described strategy receives storage unit and is used for receiving strategy;
Described IRP request is filtered callback information resolution unit and is resolved the filtration callback information in IRP request;
Described IRP request identifying unit determines whether and uses the privately owned buffer of file;
The privately owned buffer module of described file, for according to the classification of IRP request, is processed the result of determination of different tactful determination modules; If use the privately owned buffer of file, process this IRP request and result state value is returned to operating system nucleus, if do not use the privately owned buffer of file, directly deliver operating system system and process; Comprise: the privately owned buffer list of file maintenance unit, the privately owned buffer processing unit of file, file name provide unit;
The privately owned buffer list of described file maintenance unit, for file path corresponding to the privately owned buffer of All Files is stored in to a global listings, wherein list items comprises file complete trails, the privately owned buffer data message of file;
The privately owned buffer processing unit of described file, provides the privately owned buffer establishment of file function, the privately owned buffer of file and file object correlation function, the privately owned buffer back-up system of file pre-read function, the privately owned buffer back-up system of file postpones to write function;
Described title provides device unit, for other module basis of kernel file object inquiry file title associated with the privately owned buffer of file.
10. the device that the privately owned buffer memory of file as claimed in claim 9 is set up, is characterized in that, the privately owned buffer of described file provides establishment function, when file is opened for the first time, according to IRP decision condition, creates the privately owned buffer of file; The privately owned buffer of described file provides and file object correlation function, first according to the complete trails of file object, from the privately owned buffer list of file, search and the privately owned buffer of the unique associated file of file object, then the buffer memory relevant information of updating file object, file object authority relevant information, finally add file object to file list object in the privately owned buffer of file.
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 true CN103544287A (en) 2014-01-29
CN103544287B 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 (4)

* 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
US20120278295A1 (en) * 2011-04-29 2012-11-01 International Business Machines Corporation Disk image introspection for storage systems
CN103077243A (en) * 2013-01-16 2013-05-01 北京数码视讯科技股份有限公司 Processing method and system for file system access

Patent Citations (4)

* 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
US20120278295A1 (en) * 2011-04-29 2012-11-01 International Business Machines Corporation Disk image introspection for storage systems
CN103077243A (en) * 2013-01-16 2013-05-01 北京数码视讯科技股份有限公司 Processing method and system for file system access

Also Published As

Publication number Publication date
CN103544287B (en) 2017-04-19

Similar Documents

Publication Publication Date Title
TWI798547B (en) Restore from a cloud-based data protection service
EP3529737B1 (en) Data reduction with end-to-end security
KR101869156B1 (en) Method and device for updating object data in object storage system
US11695806B2 (en) Intercepting calls for encryption handling in persistent access multi-key systems
US8805951B1 (en) Virtual machines and cloud storage caching for cloud computing applications
US9015417B2 (en) Deduplication-aware page cache
US10210085B2 (en) Leveraging non-volatile memory for persisting data
US9785378B2 (en) Tracking transformed memory pages in virtual machine chain migration
US8700570B1 (en) Online storage migration of replicated storage arrays
US9792186B2 (en) Kernel state and user state data exchange method for disaster recovery of virtual container system
US9563569B2 (en) Memory transformation in virtual machine live migration
US20190238560A1 (en) Systems and methods to provide secure storage
US9418232B1 (en) Providing data loss prevention for copying data to unauthorized media
US20110061110A1 (en) Viewing Content Under Enterprise Digital Rights Management without a Client Side Access Component
US11997132B2 (en) System and method for protecting network resources
CN108229190B (en) Transparent encryption and decryption control method, device, program, storage medium and electronic equipment
US20210034760A1 (en) Caching for high-performance web applications
US11899542B2 (en) File data access method, apparatus, and computer-readable storage medium
US8935751B1 (en) Method for extending the fragment mapping protocol to prevent malicious access to virtualized storage
US9251020B1 (en) Systems and methods for file-level replication
US10713211B2 (en) Pre-registering memory regions for remote direct memory access in a distributed file system
US9135116B1 (en) Cloud enabled filesystems provided by an agent which interfaces with a file system on a data source device
US10678754B1 (en) Per-tenant deduplication for shared storage
CN113966590B (en) Site session termination method, device, terminal equipment and medium
US20210064576A1 (en) Indexing splitter for any pit replication

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