CN104021137A - Method and system for opening and closing file locally through client side based on catalogue authorization - Google Patents

Method and system for opening and closing file locally through client side based on catalogue authorization Download PDF

Info

Publication number
CN104021137A
CN104021137A CN201410160168.9A CN201410160168A CN104021137A CN 104021137 A CN104021137 A CN 104021137A CN 201410160168 A CN201410160168 A CN 201410160168A CN 104021137 A CN104021137 A CN 104021137A
Authority
CN
China
Prior art keywords
catalogue
file
document
client
read authority
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
CN201410160168.9A
Other languages
Chinese (zh)
Other versions
CN104021137B (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.)
Tianjin Zhongke Bluewhale Information Technology Co ltd
Institute of Computing Technology of CAS
Original Assignee
Tianjin Zhongke Bluewhale Information Technology Co ltd
Institute of Computing Technology of CAS
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 Tianjin Zhongke Bluewhale Information Technology Co ltd, Institute of Computing Technology of CAS filed Critical Tianjin Zhongke Bluewhale Information Technology Co ltd
Priority to CN201410160168.9A priority Critical patent/CN104021137B/en
Publication of CN104021137A publication Critical patent/CN104021137A/en
Application granted granted Critical
Publication of CN104021137B publication Critical patent/CN104021137B/en
Expired - Fee Related 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources

Abstract

The invention discloses a method and system for opening and closing a file locally through a client side based on catalogue authorization and relates to the technology for optimizing the access performance of small files in a cluster file system. The method comprises the steps of conducting authorization, wherein a server gives the expanding and reading authority to the client side based on the catalogue expanding and reading authority mechanism and sends catalogue information and the expanding and reading authority to the client side, and the client side stores the catalogue information in a local reading cache; opening the file, wherein the client side establishes the catalogue item structure of the file and the index node structure of the file according to the catalogue information, makes the catalogue item structure and the index node structure be associated with the opening structure of the file, and adds the opening structure of the file to the course opened-file table; closing the file, wherein the opening structure of the file in the course opened-file table is removed and released. By the adoption of the method for opening and closing the file locally through the client side based on catalogue authorization, the access efficiency of small files can be optimized, and the access load of metadata of the server can be reduced.

Description

A kind of client terminal local based on catalogue mandate opens and closes the method and system of file
Technical field
The present invention relates to the optimisation technique of the medium and small file access performance of cluster file system, particularly a kind of client terminal local based on catalogue mandate opens and closes the method for file.
Background technology
Current mass small documents access performance has become focus and the difficult point of the research in cluster file system field, the principal element that affects mass small documents access performance is high concurrent metadata synchronization access at high proportion, it is excessive that the network interaction expense that metadata synchronization access brings postpones small documents accessing operation, seriously affected system performance.
In existing system, in order to ensure correct shared semanteme, need to safeguard respectively at client and server the state of metadata, the distributed file system of current main-stream (comprises pNFS, CEPH etc.) all status of support services, in the cluster file system of status of support service, client is opened file at every turn, all to send request to server, thereby at server, set up the open mode of file, obtain the access attribute of file, equally, the shutoff operation of client to file, also need to carry out alternately with server, with announcement server, remove the open mode of this document, but single client needs Remote Open operation (open) and once long-range shutoff operation (close) at least one times to the read and write access of each small documents, increased the network interaction expense of twice to the data access of each small documents, affect greatly the read-write efficiency of small documents, at client-access, conflict fewer in the situation that, frequent and server carries out network interaction to set up and removing state, cause unnecessary system resource waste, when high Concurrency Access large amount of small documents, the metadata load of server will be increased greatly, the band of typical distributed file system pNFS (parallel network file system) is read flow process outward as shown in Figure 1.
Patent of invention " file creating method and system thereof in a kind of distributed type file system client side buffer memory " discloses file creating method and system thereof in a kind of distributed type file system client side buffer memory, wherein the method comprises: step 1, and client is obtained catalogue from meta data server and is write mandate; Step 2, client creates file in local cache; Step 3, client file that asynchronous submission creates is to meta data server.The inventive method has solved in mass small documents application scenarios when distributed file system prior art cannot effectively reduce document creation and the problem of the mutual expense of meta data server synchronizing network.But this invention is for distributed file system, a kind of method and system that creates file in client-cache has been proposed, do not relate to the method that opens and closes file at client terminal local.
Patent of invention " implementation method and the system of the distributed deployment application program based on IO decoupling zero " discloses a kind of implementation method and system of the distributed deployment application program based on IO decoupling zero, relate to virtual machine, this is realized system and comprises client software, separated dynamic link library and virtual program administrative unit, separated dynamic link library is between the executable program and system dynamic link library of server end, separated dynamic link library will be about showing by RPC, the function call of IO part is transferred to local side and is carried out, show, the function of IO part comprises that all to relate to man-machine interface mutual, figure shows, the function of file I/O and network I/O.The present invention is separated by the logical gate of application program and demonstration, IO part, do not change other parts of application program, make application program virtual, virtual Relative Size is less, virtual program implementation effect is the same with local program, relatively good with local other program interactions, reduce the consumption of VME operating system resource.But this invention is for the problem of application deployment, a kind of distributed deployment method and system based on IO decoupling zero has been proposed, the function call of demonstration, IO part is transferred to client terminal local and carry out, do not relate to the method that in distributed file system, file opens and closes.
Summary of the invention
Not enough for prior art, the present invention proposes that the client terminal local based on catalogue mandate in a kind of cluster file system is opened, the method for close file, to avoid the opening of each file, shutoff operation to need access services device, thereby improve the efficiency to small documents accessing operation, reduce server metadata load.
For overcoming the above problems, the invention provides a kind of method that client terminal local based on catalogue mandate opens and closes file, it is characterized in that, comprise the steps:
Authorisation step, this user end to server sends reads this catalog request, this server is authorized this client this expansion read authority to this catalogue according to directory-extension read authority mechanism, and directory information, this expansion read authority are sent to this client, this client deposits this directory information in this locality and reads buffer memory;
Step opens file, this directory information that this client is read in buffer memory according to this this locality is set up the directory entry structure of this document and the inode structures of this document, and this directory entry structure, this inode structures is associated with the Unclosing structure of this document, increase the reference count of this expansion read authority, this directory entry structure, this inode structures simultaneously, this document Unclosing structure process of adding to is opened file in table, to complete this client terminal local, open this document under this catalogue;
Close file step, this step is the inverse process of this step that opens file.
The described client terminal local based on catalogue mandate opens and closes the method for file, in this authorisation step, the step of this directory-extension read authority mechanism is as follows: whether the client of judgement except this client authorized the mandate of writing of writing file under mandate or this catalogue of this catalogue by this server, if, to this client Returning catalogue of this expansion read authority of application, expand read authority failure signal, otherwise this server end is authorized this expansion read authority of this this catalogue of client of this expansion read authority of application.
The described client terminal local based on catalogue mandate opens and closes the method for file, and in this authorisation step, this directory information comprises: the directory entry information of All Files and the attribute information of the All Files under this catalogue under this catalogue.
The described client terminal local based on catalogue mandate opens and closes the method for file, and the territory in this step that opens file in this document inode structures comprises: the creation-time of this document, the modification time of this document, the size of this document, the inode number of the founder of this document, this document, the access rights of the type of this document, this document, the equipment that this document is corresponding; Territory in this directory entry structure of this document comprises: the filename of this document and the inode number of this document.
The described client terminal local based on catalogue mandate opens and closes the method for file, also comprise and authorize readjustment, comprise the steps: when the client except this client is sent write request to this document under this catalogue or this catalogue to this server, this server sends " readjustment " request to this client of holding this expansion read authority, this this expansion read authority of this client mark of holding this expansion read authority is " recalling ", when the reference count of this expansion read authority is kept to 0, this expansion read authority is returned to this server.
The present invention also comprises that a kind of client terminal local based on catalogue mandate opens and closes the system of file, it is characterized in that, comprising:
Authorization module, for this user end to server, send and read this catalog request, this server is authorized this client this expansion read authority to this catalogue according to directory-extension read authority mechanism, and directory information, this expansion read authority are sent to this client, this client deposits this directory information in this locality and reads buffer memory;
Module opens file, this directory information of reading buffer memory according to this this locality for this client is set up the directory entry structure of this document and the inode structures of this document, and this directory entry structure, this inode structures is associated with the Unclosing structure of this document, increase the reference count of this expansion read authority, this directory entry structure, this inode structures simultaneously, this document Unclosing structure process of adding to is opened file in table;
Close file module, for reducing the reference count of this expansion read authority, this directory entry structure, this inode structures, and this document Unclosing structure under this catalogue that this process is opened file in table is removed and discharges.
The described client terminal local based on catalogue mandate opens and closes the system of file, in this authorisation step, the step of this directory-extension read authority mechanism is as follows: whether the client of judgement except this client authorized the mandate of writing of writing file under mandate or this catalogue of this catalogue by this server, if, to this client Returning catalogue of this expansion read authority of application, expand read authority failure signal, otherwise this server end is authorized this expansion read authority of this this catalogue of client of this expansion read authority of application.
The described client terminal local based on catalogue mandate opens and closes the system of file, and this directory information comprises: the directory entry information of All Files and the attribute information of the All Files under this catalogue under this catalogue.
The described client terminal local based on catalogue mandate opens and closes the system of file, and the territory in this inode structures comprises: the creation-time of this document, the modification time of this document, the size of this document, the inode number of the founder of this document, this document, the access rights of the type of this document, this document, the equipment that this document is corresponding; This document directory entry structure comprises: the filename of this document and the inode number of this document.
The described client terminal local based on catalogue mandate opens and closes the system of file, also comprise mandate callback module, this module reclaims this expansion read authority for this server, when the client except this client is sent write request to this document under this catalogue or this catalogue to this server, this server sends " readjustment " request to this client of holding this expansion read authority, this this expansion read authority of this client mark of holding this expansion read authority is " recalling ", when the reference count of this expansion read authority is kept to 0, this expansion read authority is returned to this server.
From above scheme, the invention has the advantages that:
The present invention not only guarantees that the data of client this catalogue when having directory-extension read authority can not be modified, and guarantee that the file under this catalogue can not be modified, if when obtaining the directory entry information of file under catalogue and attribute information by reading directory operation, can obtain the expansion read authority of catalogue, file just can be opened in this locality, be closed so, do not need to carry out alternately with server, thereby the present invention can optimize the access efficiency of small documents, and can reduce the metadata access load of server.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of reading of typical parallel network system;
Fig. 2 is that client is obtained directory information and directory-extension read authority process flow diagram;
Fig. 3 is the client terminal local process flow diagram that opens file;
Fig. 4 is client terminal local close file process flow diagram;
Fig. 5 is client according to the expansion read authority of whether holding catalogue, and judgement is from the Local or Remote process flow diagram that opens file;
Fig. 6 is the expansion read authority whether client basis holds catalogue, and judgement is from Local or Remote close file process flow diagram;
Fig. 7 is overall flow figure of the present invention;
Wherein Reference numeral is:
Step 100, for to obtain directory information and directory-extension read authority step by reading directory operation, comprising:
Step 101/102/103/104/105/106/107;
Step 200 is the concrete steps that client terminal local opens file, and comprising:
Step 201/201/202/203/204/205/206;
Step 300 is the concrete steps of client terminal local close file, comprising:
Step 301/302/303/304/305/306;
Step 400 is for client is according to the expansion read authority of whether holding catalogue, and judgement, from the Local or Remote step that opens file, comprising:
Step 401/402/200;
Step 500 is the expansion read authority whether client basis holds catalogue, and judgement, from Local or Remote close file step, comprising:
Step 501/502/300;
Embodiment
The object of the invention is to solve in existing cluster file system, the opening and closing of each file need and server interaction, cause small documents read-write to postpone problem large and that server metadata load is heavy.The present invention proposes that a kind of client terminal local based on catalogue mandate is opened, the method for close file.Described method is when user end to server transmission is obtained the directory entry information and the file attribute under all catalogues of this catalogue to the directory operation request of reading (READDIR PLUS) of assigned catalogue, ask the expansion read authority of this catalogue, during guaranteeing that client is held this catalogue read authority, under the data of this catalogue and this catalogue, the data of each file can not be modified.
Licensing scheme is in the situation that between client, access conflict is fewer, a kind of Optimization Mechanism of condition managing.While there is no access conflict between client, licensing scheme can avoid repetition send request and improve system performance to server.Authorised representative's server end is authorized certain specified permission of client, server is licensed to client to the right of file (comprising catalogue), make the many decision-makings that should be made by server, can in this locality, be carried out by client decision-making, when another client participates in sharing one during authority, server can send to client " readjustment " and ask to recall mandate.
The concrete steps of below opening, closing for client terminal local:
As shown in Figure 2, step 100 is for obtaining directory information (directory information comprises the directory entry information of All Files under catalogue by reading directory operation (READDIR PLUS), the attribute information of All Files under catalogue) and the step of directory-extension read authority, perform step 101 clients transmissions and read catalog request to server, perform step 102 servers and judge whether to authorize client directory expansion read authority according to directory-extension read authority mechanism, directory-extension read authority mechanism is: if server authorized other this catalogue of client write authorize or this catalogue under file write mandate, there is conflict in the expansion read authority of catalogue, perform step 106 clients and can not obtain expansion read authority, perform step 107 client Remote Acquisitioning directory informations, if the expansion read authority of catalogue does not conflict, perform step 103 servers transmission directory informations and (comprise directory entry information, the attribute information of the All Files under catalogue), the expansion read authority of catalogue is to client, perform step 104 clients and obtain the expansion read authority of directory information and catalogue, performing step 105 clients deposits directory information to read in buffer memory in, continue the execution step 200 client terminal locals step that opens file.
As shown in Figure 3, the concrete steps that step 200 opens file for client terminal local, performing step 201 clients increases the expansion read authority reference count of catalogue, execution step 202 is searched directory information in reading buffer memory, execution step 203 is set up directory entry structure and inode structures according to directory information at virtual file system, at virtual file system, each corresponding inode structures that opens file, in order to preserve the various attribute informations of file, as the creation-time of file, the modification time of file, the size of file, the founder of file, the inode number of file, the type of file, the access rights of file, the equipment that file is corresponding etc., the file of inode number in can unique identification file system, directory entry structure is used for preserving the corresponding relation of filename and inode number, execution step 204 is by directory entry structure and inode structures and File Open structure connection, execution step 205 increases the reference count of directory entry structure and inode structures, execution step 206 is by the File Open structure process of adding to the table that opens file, return to application file descriptor.
As shown in Figure 4, step 300 is the concrete steps of client terminal local close file, perform step 301 clients minimizing directory entry structures and inode structures and quote number of times, execution step 302 is removed File Open structure discharge from process opens file table, the expansion read authority that execution step 303 reduces catalogue is quoted number of times, execution step 304 is when other clients are sent write request to the file under this catalogue or catalogue, server sends " readjustment " request to the client of holding the expansion read authority of this catalogue and recalls expansion read authority, whether the expansion read authority that judges catalogue receives the request of server readjustment, if do not receive readjustment request, perform step the expansion read authority that 305 clients continue to hold catalogue, if receive readjustment request, perform step 306 clients the expansion read authority of this catalogue is returned to server.
Below for client basis, whether hold the expansion read authority of catalogue, the step that judgement opens file from Local or Remote:
As shown in Figure 5, step 401 client judges whether to hold the expansion read authority of the parent directory that will open file, if hold, perform step 200 client terminal locals and open this document step, otherwise, execution step 402 client Remote Open this document.
Below for client basis, whether hold the expansion read authority of catalogue, judge the step from Local or Remote close file:
As shown in Figure 6, step 501 client judges whether to hold the expansion read authority of the parent directory of the file that will close, if hold, perform step 300 client terminal locals and close this document step, otherwise, the long-range this document of closing of execution step 502 clients.
It is below overall flow of the present invention, as shown in Figure 7, user end to server sends reads catalog request, and server is authorized client directory expansion read authority according to directory-extension read authority mechanism, and directory information is sent to client, client deposits directory information in this locality and reads buffer memory; When client opens or closes file, first check whether client holds the expansion read authority of the parent directory of this catalogue, to determine that Local or Remote opens this document; If there are other clients to participate in sharing while having authorized a file under parent directory or this catalogue in the mode of monopolizing, server can send to client " readjustment " and ask to recall mandate.
Be below the concrete implementation step of the present invention in pNFS (parallel network file system):
Parallel network file system represents a mandate in client with data structure nfs_delegation, the type (read/write) that wherein type representative is authorized, for identifying the state of mandate, (NFS_DELEGATION_EXTENT represents Extended in Authorization type to flags, NFS_DELEGATION_RECALL representative is authorized and has been received readjustment request, and the number of times being cited is authorized in ref representative.In client, the corresponding inode structures of a catalogue (comprising file), the authorization structure that the pointer field delegation oriented towards client in inode structures is held this catalogue (file).
Server end represents a mandate with data structure nfs4_delegation, the type that wherein dl_type representative is authorized, and whether extent is used for identifying mandate is expansion type, affiliated client is authorized in clp representative.At server end, the corresponding File Open structure (nfs4_file) of catalogue or file, territory fi_delegations in File Open structure is a linked list head, representation file mandate chained list, this chained list is that the authorization structure link of this catalogue or file being held by all clients forms.At server end, all File Open structures are kept in the Hash table of a file_hashtbl by name, and this Hash table is usingd the inode number of virtual file layer index node structure as index.
User end to server sends RPC (remote procedure call protocol), read directory operation request, server is authorized the expansion read authority that judges whether to authorize client directory according to catalogue licensing scheme, it is the index node of server by utilizing catalogue virtual file system inode structures, index file_hashtbl Hash table, search corresponding File Open structure, if do not find the File Open structure of file in file_hashtbl Hash table, create a File Open structure, initialization and adding in file_hashtbl Hash table, and authorize the expansion read authority of client directory.The step that server is authorized client-side extensions read authority is, expansion read authority structure creaties directory, distribute nfs4_delegation (authorization structure), dl_type (authorization type) is set for reading, extent (expansion) is 1, clp (client under authorizing) is active client, by newly assigned nfs4_delegation (authorization structure), adds in the fi_delegations (file authorizing chained list) of File Open structure.If find the File Open structure of file in file_hashtbl Hash table, travel through item by item the fi_delegations (file authorizing chained list) of File Open structure, check in the fi_delegations (file authorizing chained list) of each file under this catalogue and whether write mandate, if all do not write mandate in the fi_delegations of the file under all catalogues (mandate chained list), authorize the expansion read authority of client directory, otherwise (extent is 0 to authorize the common catalogue read authority of client, client can only be carried out Remote Open or the shutoff operation of catalogue), server reads directory entry information and the attribute information of the file under catalogue, the vfs_readdir of server calls virtual file system (function reading) reads directory entry information in buffer memory, server by utilizing directory entry information, file under catalogue is carried out to lookup (searching), set up the inode structures of the file under catalogue, directory entry structure etc., and the vfs_getattr (getattr function) that calls virtual file system obtains the attribute information of the file under catalogue, the attribute information of each file under server directory passes to client after being attached to directory entry information, the catalogue authorization message that client decoding server end is beamed back, if server has been authorized client read authority, set up nfs_delegation (authorization structure), read authority arranges type (type) for reading, expansion is authorized and flags (sign) is set for NFS_DELEGATION_EXTENT (expansion is authorized), this structure is recorded in the delegation (Authorized Domain) of the nfs that client directory is corresponding (network file system(NFS) layer) inode structures, client is kept at reading in buffer memory of client by the attribute information of the file under the directory entry information of acquisition and catalogue.
Client terminal local is opened catalogue or file, virtual file system allocate file Unclosing structure, it is File Open structure, the method of opening file that virtual file system calls network file system(NFS) layer opens file, first judge whether the parent directory of file to be opened holds the expansion read authority of catalogue, the type (type field) that judges the delegation (Authorized Domain) that nfs_inode (inode structures) points to reads and whether the flags (identification field) of the delegation (Authorized Domain) that nfs_inode (inode structures) points to is NFS_DELEGATION_EXTENT (expansion is authorized), if there is no parent directory expansion read authority, send Remote Open request, carry out Remote Open file step, if hold parent directory expansion read authority, increase the reference count of the expansion read authority of catalogue, viewing files virtual file system directory entry structure, whether inode structures is in buffer memory, if in buffer memory, set up the associated of File Open structure and inode structures and directory entry structure, increase the reference count of inode structures and directory entry structure, if not in buffer memory, according to filename, go to retrieve item by item and read buffer memory, the directory entry information of locating file and the attribute information of the file under catalogue, if do not find the directory entry information of file and the attribute information of the file under catalogue, finish opening operation, releasing document Unclosing structure, return to-ENOENT (catalogue or the file that there is no appointment), representing opens file does not exist, if find the directory entry information of file and the attribute information of the file under catalogue, according to the attribute information of the file under directory entry information and catalogue, directory entry structure and the inode structures of foundation or refreshing file virtual file system, add File Open structure to process opening file in table.
Client terminal local is closed catalogue or file, first judgement treats whether the parent directory of close file holds directory-extension read authority, the type (type field) that judges the delegation (Authorized Domain) that nfs_inode (inode structures) points to reads and whether the flags (identification field) of the delegation (Authorized Domain) that nfs_inode (inode structures) points to is NFS_DELEGATION_EXTENT (expansion is authorized), if there is no parent directory expansion read authority, send long-range CLOSE request, carry out long-range close file step, if hold the expansion read authority of parent directory, reduce the reference count of directory-extension read authority, from the table that opens file of process, remove and discharge the File Open structure of this document, when the reference count of parent directory expansion read authority is kept to 0, judge and in the flags (identification field) of this directory-extension read authority, whether have NFS_DELEGATION_RECALL (authorizing readjustment) sign, if, this mandate is returned to server, otherwise continue to hold the expansion read authority of this catalogue.
The readjustment process of the expansion read authority of catalogue is, when other clients are sent write request to the file under described catalogue or catalogue, server checks in the fi_delegations (mandate chained list) of this catalogue nfs4_file (File Open structure) whether have directory-extension read authority item by item, if had, to client, send CB_RECALL (readjustment) request and recall this mandate, holding the client of directory-extension read authority receives after CB_RECALL (readjustment) request to described catalogue, this catalogue is set to NFS_DELEGATION_RECALL (authorizing readjustment) sign, the flags (identification field) that is about to the delegation (Authorized Domain) of nfs_inode (inode structures) sensing is set to NFS_DELEGATION_RECALL (authorizing readjustment) sign, when not having file to quote the expansion read authority of described catalogue, be that nfs_inode->delegation->ref (count value of directory-extension read authority) is 0 o'clock, to server, send RETURN_DELEGATION (return authorization) request and return to this mandate, server finds and deletes this expansion read authority from the fi_delegations (mandate chained list) of the nfs4_file (File Open structure) of catalogue, when chained list is sky, corresponding nfs4_file (File Open structure) deltrees, client discharges the nfs_delegations (authorization structure) in nfs_inode (inode structures).
The present invention also comprises as lower module:
Authorization module, for this user end to server, send and read this catalog request, this server is authorized this client this expansion read authority to this catalogue according to directory-extension read authority mechanism, and directory information, this expansion read authority are sent to this client, this client deposits this directory information in this locality and reads buffer memory; The step of this directory-extension read authority mechanism is as follows: whether the client of judgement except this client authorized the mandate of writing of writing file under mandate or this catalogue of this catalogue by this server, if, to this client Returning catalogue of this expansion read authority of application, expand read authority failure signal, otherwise this server end is authorized this expansion read authority of this this catalogue of client of this expansion read authority of application.
Module opens file, this directory information of reading buffer memory according to this this locality for this client is set up the directory entry structure of this document and the inode structures of this document, and this directory entry structure, this inode structures is associated with the Unclosing structure of this document, increase the reference count of this expansion read authority, this directory entry structure, this inode structures simultaneously, this document Unclosing structure process of adding to is opened file in table;
Close file module, for reducing the reference count of this expansion read authority, this directory entry structure, this inode structures, and this document Unclosing structure under this catalogue that this process is opened file in table is removed and discharges.
Authorize callback module, this module reclaims this expansion read authority for this server, when the client except this client is sent write request to this document under this catalogue or this catalogue to this server, this server sends " readjustment " request to this client of holding this expansion read authority, this this expansion read authority of this client mark of holding this expansion read authority is " recalling ", when the reference count of this expansion read authority is kept to 0, this expansion read authority is returned to this server.
This directory information comprises: the directory entry information of All Files and the attribute information of the All Files under this catalogue under this catalogue; Territory in this inode structures comprises: the creation-time of this document, the modification time of this document, the size of this document, the inode number of the founder of this document, this document, the access rights of the type of this document, this document, the equipment that this document is corresponding; This document directory entry structure comprises: the filename of this document and the inode number of this document.

Claims (10)

1. the client terminal local based on catalogue mandate opens and closes a method for file, it is characterized in that, comprises the steps:
Authorisation step, this user end to server sends reads this catalog request, this server is authorized this client this expansion read authority to this catalogue according to directory-extension read authority mechanism, and directory information, this expansion read authority are sent to this client, this client deposits this directory information in this locality and reads buffer memory;
Step opens file, this directory information that this client is read in buffer memory according to this this locality is set up the directory entry structure of this document and the inode structures of this document, and this directory entry structure, this inode structures is associated with the Unclosing structure of this document, increase the reference count of this expansion read authority, this directory entry structure, this inode structures simultaneously, this document Unclosing structure process of adding to is opened file in table, to complete this client terminal local, open this document under this catalogue;
Close file step, this step is the inverse process of this step that opens file.
2. the client terminal local based on catalogue mandate as claimed in claim 1 opens and closes the method for file, it is characterized in that, in this authorisation step, the step of this directory-extension read authority mechanism is as follows: whether the client of judgement except this client authorized the mandate of writing of writing file under mandate or this catalogue of this catalogue by this server, if, to this client Returning catalogue of this expansion read authority of application, expand read authority failure signal, otherwise this server end is authorized this expansion read authority of this this catalogue of client of this expansion read authority of application.
3. the client terminal local based on catalogue mandate as claimed in claim 1 opens and closes the method for file, it is characterized in that, in this authorisation step, this directory information comprises: the directory entry information of All Files and the attribute information of the All Files under this catalogue under this catalogue.
4. the client terminal local based on catalogue mandate as described in claim 1 or 3 opens and closes the method for file, it is characterized in that, the territory in this step that opens file in this document inode structures comprises: the creation-time of this document, the modification time of this document, the size of this document, the inode number of the founder of this document, this document, the access rights of the type of this document, this document, the equipment that this document is corresponding; Territory in this directory entry structure of this document comprises: the filename of this document and the inode number of this document.
5. the client terminal local based on catalogue mandate as claimed in claim 1 opens and closes the method for file, it is characterized in that, also comprise and authorize readjustment, comprise the steps: when the client except this client is sent write request to this document under this catalogue or this catalogue to this server, this server sends " readjustment " request to this client of holding this expansion read authority, this this expansion read authority of this client mark of holding this expansion read authority is " recalling ", when the reference count of this expansion read authority is kept to 0, this expansion read authority is returned to this server.
6. the client terminal local based on catalogue mandate opens and closes a system for file, it is characterized in that, comprising:
Authorization module, for this user end to server, send and read this catalog request, this server is authorized this client this expansion read authority to this catalogue according to directory-extension read authority mechanism, and directory information, this expansion read authority are sent to this client, this client deposits this directory information in this locality and reads buffer memory;
Module opens file, this directory information of reading buffer memory according to this this locality for this client is set up the directory entry structure of this document and the inode structures of this document, and this directory entry structure, this inode structures is associated with the Unclosing structure of this document, increase the reference count of this expansion read authority, this directory entry structure, this inode structures simultaneously, this document Unclosing structure process of adding to is opened file in table;
Close file module, for reducing the reference count of this expansion read authority, this directory entry structure, this inode structures, and this document Unclosing structure under this catalogue that this process is opened file in table is removed and discharges.
7. the client terminal local based on catalogue mandate as claimed in claim 6 opens and closes the system of file, it is characterized in that, in this authorisation step, the step of this directory-extension read authority mechanism is as follows: whether the client of judgement except this client authorized the mandate of writing of writing file under mandate or this catalogue of this catalogue by this server, if, to this client Returning catalogue of this expansion read authority of application, expand read authority failure signal, otherwise this server end is authorized this expansion read authority of this this catalogue of client of this expansion read authority of application.
8. the client terminal local based on catalogue mandate as claimed in claim 6 opens and closes the system of file, it is characterized in that, this directory information comprises: the directory entry information of All Files and the attribute information of the All Files under this catalogue under this catalogue.
9. the client terminal local based on catalogue mandate as described in claim 6 or 8 opens and closes the system of file, it is characterized in that, the territory in this inode structures comprises: the creation-time of this document, the modification time of this document, the size of this document, the inode number of the founder of this document, this document, the access rights of the type of this document, this document, the equipment that this document is corresponding; This document directory entry structure comprises: the filename of this document and the inode number of this document.
10. the client terminal local based on catalogue mandate as claimed in claim 6 opens and closes the system of file, it is characterized in that, also comprise mandate callback module, this module reclaims this expansion read authority for this server, when the client except this client is sent write request to this document under this catalogue or this catalogue to this server, this server sends " readjustment " request to this client of holding this expansion read authority, this this expansion read authority of this client mark of holding this expansion read authority is " recalling ", when the reference count of this expansion read authority is kept to 0, this expansion read authority is returned to this server.
CN201410160168.9A 2014-04-21 2014-04-21 A kind of client based on catalogue mandate is locally opened and closed the method and system of file Expired - Fee Related CN104021137B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410160168.9A CN104021137B (en) 2014-04-21 2014-04-21 A kind of client based on catalogue mandate is locally opened and closed the method and system of file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410160168.9A CN104021137B (en) 2014-04-21 2014-04-21 A kind of client based on catalogue mandate is locally opened and closed the method and system of file

Publications (2)

Publication Number Publication Date
CN104021137A true CN104021137A (en) 2014-09-03
CN104021137B CN104021137B (en) 2017-06-09

Family

ID=51437892

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410160168.9A Expired - Fee Related CN104021137B (en) 2014-04-21 2014-04-21 A kind of client based on catalogue mandate is locally opened and closed the method and system of file

Country Status (1)

Country Link
CN (1) CN104021137B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106897440A (en) * 2017-02-28 2017-06-27 郑州云海信息技术有限公司 A kind of distributed file system file read-write processing method
CN108717420A (en) * 2018-04-20 2018-10-30 北京鲸鲨软件科技有限公司 A kind of method that small documents reading efficiency is improved in distributed file system
CN109408474A (en) * 2018-11-09 2019-03-01 郑州云海信息技术有限公司 A kind of file creating method and client
CN111046001A (en) * 2019-12-28 2020-04-21 浪潮电子信息产业股份有限公司 Method, device and equipment for creating files in batch and storage medium
CN112948844A (en) * 2021-01-28 2021-06-11 维沃移动通信有限公司 Control method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158546A (en) * 2011-02-28 2011-08-17 中国科学院计算技术研究所 Cluster file system and file service method thereof
CN102332016A (en) * 2010-09-17 2012-01-25 微软公司 Catalogue chance lock
CN103065100A (en) * 2012-12-26 2013-04-24 中国人民解放军总参谋部第六十一研究所 Container-based method of users to protect private data
CN103179185A (en) * 2012-12-25 2013-06-26 中国科学院计算技术研究所 Method and system for creating files in cache of distributed file system client

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102332016A (en) * 2010-09-17 2012-01-25 微软公司 Catalogue chance lock
CN102158546A (en) * 2011-02-28 2011-08-17 中国科学院计算技术研究所 Cluster file system and file service method thereof
CN103179185A (en) * 2012-12-25 2013-06-26 中国科学院计算技术研究所 Method and system for creating files in cache of distributed file system client
CN103065100A (en) * 2012-12-26 2013-04-24 中国人民解放军总参谋部第六十一研究所 Container-based method of users to protect private data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
范勇: "蓝鲸分布式文件系统数据一致性语义研究", 《中国优秀硕士学位论文全文数据库》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106897440A (en) * 2017-02-28 2017-06-27 郑州云海信息技术有限公司 A kind of distributed file system file read-write processing method
CN106897440B (en) * 2017-02-28 2020-06-26 郑州云海信息技术有限公司 File read-write processing method for distributed file system
CN108717420A (en) * 2018-04-20 2018-10-30 北京鲸鲨软件科技有限公司 A kind of method that small documents reading efficiency is improved in distributed file system
CN108717420B (en) * 2018-04-20 2022-04-15 北京鲸鲨软件科技有限公司 Method for improving small file reading efficiency in distributed file system
CN109408474A (en) * 2018-11-09 2019-03-01 郑州云海信息技术有限公司 A kind of file creating method and client
CN109408474B (en) * 2018-11-09 2021-11-19 郑州云海信息技术有限公司 File creation method and client
CN111046001A (en) * 2019-12-28 2020-04-21 浪潮电子信息产业股份有限公司 Method, device and equipment for creating files in batch and storage medium
CN111046001B (en) * 2019-12-28 2023-03-14 浪潮电子信息产业股份有限公司 Method, device and equipment for creating files in batch and storage medium
CN112948844A (en) * 2021-01-28 2021-06-11 维沃移动通信有限公司 Control method and device and electronic equipment

Also Published As

Publication number Publication date
CN104021137B (en) 2017-06-09

Similar Documents

Publication Publication Date Title
US11388251B2 (en) Providing access to managed content
CN103179185B (en) Method and system for creating files in cache of distributed file system client
CN107169083B (en) Mass vehicle data storage and retrieval method and device for public security card port and electronic equipment
US8341118B2 (en) Method and system for dynamically replicating data within a distributed storage system
KR100825721B1 (en) System and method of time-based cache coherency maintenance in user file manager of object-based storage system
US10275347B2 (en) System, method and computer program product for managing caches
CN101272313B (en) Intermediate device for achieving virtualization of file level, file server system and relay method
CN105183839A (en) Hadoop-based storage optimizing method for small file hierachical indexing
CN112236758A (en) Cloud storage distributed file system
CN103916465A (en) Data pre-reading device based on distributed file system and method thereof
CN103647797A (en) Distributed file system and data access method thereof
CN102984256B (en) Processing method and system for metadata based on authorization manner
WO2010027849A1 (en) Shared namespace for storage clusters
CN104021137A (en) Method and system for opening and closing file locally through client side based on catalogue authorization
CN106775446A (en) Based on the distributed file system small documents access method that solid state hard disc accelerates
CN103902660A (en) System and method for prefetching file layout through readdir++ in cluster file system
CN105354250A (en) Data storage method and device for cloud storage
CN103559319A (en) Cache synchronization method and equipment for distributed cluster file system
WO2023077971A1 (en) Transaction processing method and apparatus, and computing device and storage medium
CN113377868A (en) Offline storage system based on distributed KV database
US10387384B1 (en) Method and system for semantic metadata compression in a two-tier storage system using copy-on-write
CN101483668A (en) Network storage and access method, device and system for hot spot data
CN103136294B (en) File operating method and device
CN105740166B (en) Cache reading and reading processing method and device
CN103064929B (en) A kind of method that in NFS, server writes data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170609

CF01 Termination of patent right due to non-payment of annual fee