This section describes notes on file lock function that is used in the GFS Shared File System.
The GFS Shared File System does not support the following functions:
File lock between nodes to files other than regular file
Deadlock check function between nodes with another file system
The following functions might not operate normally because of the Linux kernel specification.
Setting and getting of file lock when SEEK_END is specified
When you execute the operation that sets or gets a file lock with SEEK_END to the same file after the operation that changes the size of the file by write(2), truncate(2) or the ftruncate(2), etc, execute the operation on the same node.
When operations to the same file are executed on a different node, the file lock operation might be done with the old file size.
When it wants to execute above-mentioned two operation on a different node, the issue can be evaded by getting the latest size of the file by stat(1), stat(2), and the fstat(2), etc. before file lock operation with SEEK_END.
The setting of file lock between the process, its child processes and the threads that it generated
File operation might hang up when the following operation competes for the same file.
The setting operation of file lock by thread that process(A) generated
The setting operation of file lock by process(A)
The terminating operation of process(B) that process(A) generated or
The close(2) operation in process(B) for the file that is target of file lock setting in 1 or 2
Or
The setting operation of file lock by thread that process(A) generated
The setting operation of file lock by the child process(C) that process (A) generated
The terminating operation of process(C) or
The close(2) operation in process(A) for the file that is target of file lock setting in 1 or 2
When the file operation hangs up, it is possible to recover from the state which has hung up by terminating by kill(1) the process which has hung up.
If many file locks are set on a GFS Shared File System, the system performance can be affected as follows:
Loads on the memory will be increased by increase in amount of memory used by MDS.
Loads on CPU will be intensive by the file lock processing.
If there are many processes that wait for the file lock, and the following operations are executed, loads in the network might be temporarily increased.
The file lock is released. or
The node where the process setting file lock exists goes down.
If the recovery procedure is executed when many file locks are set, it will take time and fail.