From: Masatake YAMATO Date: Sun, 12 Nov 2023 17:26:53 +0000 (+0900) Subject: lslocks: (man) update the note about OFDLCK X-Git-Tag: v2.40-rc1~163^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=548e821c7b29f0d3c26211effd6dc50986c97a60;p=thirdparty%2Futil-linux.git lslocks: (man) update the note about OFDLCK Signed-off-by: Masatake YAMATO --- diff --git a/misc-utils/lslocks.8.adoc b/misc-utils/lslocks.8.adoc index 39d4573f29..ef145aa278 100644 --- a/misc-utils/lslocks.8.adoc +++ b/misc-utils/lslocks.8.adoc @@ -29,8 +29,6 @@ lslocks - list local system locks *lslocks* lists information about all the currently held file locks in a Linux system. -Note that lslocks also lists OFD (Open File Description) locks, these locks are not associated with any process (PID is -1). OFD locks are associated with the open file description on which they are acquired. This lock type is available since Linux 3.15, see *fcntl*(2) for more details. - == OPTIONS *-b*, *--bytes*:: @@ -71,7 +69,7 @@ COMMAND:: The command name of the process holding the lock. PID:: -The process ID of the process which holds the lock or -1 for OFDLCK. +The process ID of the process. TYPE:: The type of lock; can be LEASE (created with *fcntl*(2)), FLOCK (created with *flock*(2)), POSIX (created with *fcntl*(2) and *lockf*(3)) or OFDLCK (created with *fcntl*(2)). @@ -107,6 +105,13 @@ The PID of the process which blocks the lock. The *lslocks* command is meant to replace the *lslk*(8) command, originally written by mailto:abe@purdue.edu[Victor A. Abell] and unmaintained since 2001. +"The process holding the lock" for leases, FLOCK locks, and +OFD locks is a fake-concept. They are associated with the open file +description on which they are acquired. With *fork*(2) and/or +*cmsg*(3), multiple processes can share an open file description. So +the holder process of a lease (or a lock) is not uniquely determined. +*lslocks* shows the one of the holder processes in COMMAND and PID columns. + == AUTHORS mailto:dave@gnu.org[Davidlohr Bueso]