Method and system for locking file in network file system, equipment and medium
A network file system and file locking technology, applied in the field of file locking by network file system, can solve problems such as loss of lock status information and problems with NFS applications.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0044] Embodiment 1 of the present invention proposes a method for locking files in a network file system. The present invention provides the receiving and processing of file lock requests in the network file system, and recovery of file locks in the network file system under abnormal conditions.
[0045] Such as figure 1 A flow chart of a method for locking a file in a network file system according to Embodiment 1 of the present invention is given
[0046] In step S101, a file lock request is received, and a lock record is generated;
[0047] The NFS-server receives the lock request and generates a lock record, where the lock record includes the client ID, file handle, the starting position of the file lock, the scope of the file lock, the type of the file lock and the status of the file lock. The initial file lock status is unlock status.
[0048] In step S102, if query the original file lock list according to the lock record, there is no lock record with the same and the ...
Embodiment 2
[0077] Based on the method for locking files by a network file system proposed in Embodiment 1 of the present invention, a system for locking files by a network file system is also proposed. Such as Figure 5 It is a system schematic diagram of locking files by a network file system according to Embodiment 2 of the present invention. The system includes a receiving module and a locking module;
[0078] The receiving module is used to receive file lock requests and generate lock records;
[0079] The lock module is used to query the original file lock list according to the lock record, which does not have the same and the same range of lock records, and does not have conflicting locks; then add the lock record to the original file lock list to obtain the first file lock list, and write the first file lock list into the database; then perform file locking.
[0080] The method of querying the lock records that do not have the same and the same range in the original file lock l...
Embodiment 3
[0087] The invention also proposes a device comprising:
[0088] memory for storing computer programs;
[0089] When the processor is used to execute the computer program, the method steps are as follows:
[0090] Such as figure 1 A flow chart of a method for locking a file in a network file system according to Embodiment 1 of the present invention is given
[0091] In step S101, a file lock request is received, and a lock record is generated;
[0092] The NFS-server receives the lock request and generates a lock record, where the lock record includes the client ID, file handle, the starting position of the file lock, the scope of the file lock, the type of the file lock and the status of the file lock. The initial file lock status is unlock status.
[0093] In step S102, if query the original file lock list according to the lock record, there is no lock record with the same and the same range, nor conflict lock; then add the lock record to the original file lock list to o...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com