From 50bfd0b3e2a7678939988ec15c37081a1cb42aab Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 3 Oct 2017 15:23:08 +0200 Subject: [PATCH] flock.2: Move NFS details to a headed subsection Signed-off-by: Michael Kerrisk --- man2/flock.2 | 62 ++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/man2/flock.2 b/man2/flock.2 index 2267c87fd..96d60d1a2 100644 --- a/man2/flock.2 +++ b/man2/flock.2 @@ -169,37 +169,6 @@ locks .I do interact with one another.) .PP -In Linux kernels up to 2.6.11, -.BR flock () -does not lock files over NFS -(i.e., the scope of locks was limited to the local system). -Instead, one could use -.BR fcntl (2) -byte-range locking, which does work over NFS, -given a sufficiently recent version of -Linux and a server which supports locking. -Since Linux 2.6.12, NFS clients support -.BR flock () -locks by emulating them as byte-range locks on the entire file. -This means that -.BR fcntl (2) -and -.BR flock () -locks -.I do -interact with one another over NFS. -Since Linux 2.6.37, -.\" commit 5eebde23223aeb0ad2d9e3be6590ff8bbfab0fc2 -the kernel supports a compatibility mode that allows -.BR flock () -locks (and also -.BR fcntl (2) -byte region locks) to be treated as local; -see the discussion of the -.I "local_lock" -option in -.BR nfs (5). -.PP .BR flock () places advisory locks only; given suitable permissions on a file, a process is free to ignore the use of @@ -231,6 +200,37 @@ was specified. and occurs on many other implementations.) .\" Kernel 2.5.21 changed things a little: during lock conversion .\" it is now the highest priority process that will get the lock -- mtk +.SS NFS details +In Linux kernels up to 2.6.11, +.BR flock () +does not lock files over NFS +(i.e., the scope of locks was limited to the local system). +Instead, one could use +.BR fcntl (2) +byte-range locking, which does work over NFS, +given a sufficiently recent version of +Linux and a server which supports locking. +Since Linux 2.6.12, NFS clients support +.BR flock () +locks by emulating them as byte-range locks on the entire file. +This means that +.BR fcntl (2) +and +.BR flock () +locks +.I do +interact with one another over NFS. +Since Linux 2.6.37, +.\" commit 5eebde23223aeb0ad2d9e3be6590ff8bbfab0fc2 +the kernel supports a compatibility mode that allows +.BR flock () +locks (and also +.BR fcntl (2) +byte region locks) to be treated as local; +see the discussion of the +.I "local_lock" +option in +.BR nfs (5). .SH SEE ALSO .BR flock (1), .BR close (2),