fcntl.2: Refine discussion of locks when NFSv4 client loses contact with server

Reported-by: NeilBrown <neilb@suse.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-04-29 11:53:44 +02:00
parent 6ca357f965
commit af8713605a
1 changed files with 12 additions and 2 deletions

View File

@ -1275,8 +1275,18 @@ Clearly,
alone is not going to be very useful if the process holding the lock
may live on a different machine.
Before Linux 3.12, if an NFS client
is out of contact with the server for a period of time,
Before Linux 3.12, if an NFSv4 client
loses contact with the server for a period of time
(defined as more than 90 seconds with no communication),
.\" FIXME: The 90 seconds is either /proc/fs/nfsd/nfsv4leasetime or
.\" /proc/fs/nfsd/nfsv4gracetime. Which is it? My suspicion, looking at
.\" fs/lockd/svcproc.c and fs/lockd/grace.c::locks_in_grace() is that
.\" it is /proc/fs/nfsd/nfsv4gracetime that is relevant here.
.\"
.\" Neil Brown: With NFSv3 the failure mode is the reverse. If
.\" the server loses contact with a client then any lock stays in place
.\" indefinitely ("why can't I read my mail"... I remember it well).
.\"
it might lose and regain a lock without ever being aware of the fact.
This scenario potentially risks data corruption,
since another process might acquire a lock in the intervening period