]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
proc.5, proc_locks.5: Split /proc/locks from proc(5)
authorAlejandro Colomar <alx@kernel.org>
Tue, 15 Aug 2023 17:12:06 +0000 (19:12 +0200)
committerAlejandro Colomar <alx@kernel.org>
Tue, 15 Aug 2023 21:19:13 +0000 (23:19 +0200)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man5/proc.5
man5/proc_locks.5 [new file with mode: 0644]

index 96ac457093e1d1c307c9143cc1bc2d8627ee2629..268564ed4e34b9655b0653a82ddd0b4b5fc5da26 100644 (file)
@@ -227,112 +227,6 @@ hierarchy.
 .\"       Added in Linux 2.6.9
 .\"       CONFIG_SCHEDSTATS
 .TP
-.I /proc/locks
-This file shows current file locks
-.RB ( flock "(2) and " fcntl (2))
-and leases
-.RB ( fcntl (2)).
-.IP
-An example of the content shown in this file is the following:
-.IP
-.in +4n
-.EX
-1: POSIX  ADVISORY  READ  5433 08:01:7864448 128 128
-2: FLOCK  ADVISORY  WRITE 2001 08:01:7864554 0 EOF
-3: FLOCK  ADVISORY  WRITE 1568 00:2f:32388 0 EOF
-4: POSIX  ADVISORY  WRITE 699 00:16:28457 0 EOF
-5: POSIX  ADVISORY  WRITE 764 00:16:21448 0 0
-6: POSIX  ADVISORY  READ  3548 08:01:7867240 1 1
-7: POSIX  ADVISORY  READ  3548 08:01:7865567 1826 2335
-8: OFDLCK ADVISORY  WRITE \-1 08:01:8713209 128 191
-.EE
-.in
-.IP
-The fields shown in each line are as follows:
-.RS
-.IP [1] 5
-The ordinal position of the lock in the list.
-.IP [2]
-The lock type.
-Values that may appear here include:
-.RS
-.TP
-.B FLOCK
-This is a BSD file lock created using
-.BR flock (2).
-.TP
-.B OFDLCK
-This is an open file description (OFD) lock created using
-.BR fcntl (2).
-.TP
-.B POSIX
-This is a POSIX byte-range lock created using
-.BR fcntl (2).
-.RE
-.IP [3]
-Among the strings that can appear here are the following:
-.RS
-.TP
-.B ADVISORY
-This is an advisory lock.
-.TP
-.B MANDATORY
-This is a mandatory lock.
-.RE
-.IP [4]
-The type of lock.
-Values that can appear here are:
-.RS
-.TP
-.B READ
-This is a POSIX or OFD read lock, or a BSD shared lock.
-.TP
-.B WRITE
-This is a POSIX or OFD write lock, or a BSD exclusive lock.
-.RE
-.IP [5]
-The PID of the process that owns the lock.
-.IP
-Because OFD locks are not owned by a single process
-(since multiple processes may have file descriptors that
-refer to the same open file description),
-the value \-1 is displayed in this field for OFD locks.
-(Before Linux 4.14,
-.\" commit 9d5b86ac13c573795525ecac6ed2db39ab23e2a8
-a bug meant that the PID of the process that
-initially acquired the lock was displayed instead of the value \-1.)
-.IP [6]
-Three colon-separated subfields that identify the major and minor device
-ID of the device containing the filesystem where the locked file resides,
-followed by the inode number of the locked file.
-.IP [7]
-The byte offset of the first byte of the lock.
-For BSD locks, this value is always 0.
-.IP [8]
-The byte offset of the last byte of the lock.
-.B EOF
-in this field means that the lock extends to the end of the file.
-For BSD locks, the value shown is always
-.IR EOF .
-.RE
-.IP
-Since Linux 4.9,
-.\" commit d67fd44f697dff293d7cdc29af929241b669affe
-the list of locks shown in
-.I /proc/locks
-is filtered to show just the locks for the processes in the PID
-namespace (see
-.BR pid_namespaces (7))
-for which the
-.I /proc
-filesystem was mounted.
-(In the initial PID namespace,
-there is no filtering of the records shown in this file.)
-.IP
-The
-.BR lslocks (8)
-command provides a bit more information about each lock.
-.TP
 .IR /proc/malloc " (only up to and including Linux 2.2)"
 .\" It looks like this only ever did something back in 1.0 days
 This file is present only if
diff --git a/man5/proc_locks.5 b/man5/proc_locks.5
new file mode 100644 (file)
index 0000000..cf4ff67
--- /dev/null
@@ -0,0 +1,118 @@
+.\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
+.\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
+.\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
+.\"
+.\" SPDX-License-Identifier: GPL-3.0-or-later
+.\"
+.TH proc_locks 5 (date) "Linux man-pages (unreleased)"
+.SH NAME
+/proc/locks \- current file locks and leases
+.SH DESCRIPTION
+.TP
+.I /proc/locks
+This file shows current file locks
+.RB ( flock "(2) and " fcntl (2))
+and leases
+.RB ( fcntl (2)).
+.IP
+An example of the content shown in this file is the following:
+.IP
+.in +4n
+.EX
+1: POSIX  ADVISORY  READ  5433 08:01:7864448 128 128
+2: FLOCK  ADVISORY  WRITE 2001 08:01:7864554 0 EOF
+3: FLOCK  ADVISORY  WRITE 1568 00:2f:32388 0 EOF
+4: POSIX  ADVISORY  WRITE 699 00:16:28457 0 EOF
+5: POSIX  ADVISORY  WRITE 764 00:16:21448 0 0
+6: POSIX  ADVISORY  READ  3548 08:01:7867240 1 1
+7: POSIX  ADVISORY  READ  3548 08:01:7865567 1826 2335
+8: OFDLCK ADVISORY  WRITE \-1 08:01:8713209 128 191
+.EE
+.in
+.IP
+The fields shown in each line are as follows:
+.RS
+.IP [1] 5
+The ordinal position of the lock in the list.
+.IP [2]
+The lock type.
+Values that may appear here include:
+.RS
+.TP
+.B FLOCK
+This is a BSD file lock created using
+.BR flock (2).
+.TP
+.B OFDLCK
+This is an open file description (OFD) lock created using
+.BR fcntl (2).
+.TP
+.B POSIX
+This is a POSIX byte-range lock created using
+.BR fcntl (2).
+.RE
+.IP [3]
+Among the strings that can appear here are the following:
+.RS
+.TP
+.B ADVISORY
+This is an advisory lock.
+.TP
+.B MANDATORY
+This is a mandatory lock.
+.RE
+.IP [4]
+The type of lock.
+Values that can appear here are:
+.RS
+.TP
+.B READ
+This is a POSIX or OFD read lock, or a BSD shared lock.
+.TP
+.B WRITE
+This is a POSIX or OFD write lock, or a BSD exclusive lock.
+.RE
+.IP [5]
+The PID of the process that owns the lock.
+.IP
+Because OFD locks are not owned by a single process
+(since multiple processes may have file descriptors that
+refer to the same open file description),
+the value \-1 is displayed in this field for OFD locks.
+(Before Linux 4.14,
+.\" commit 9d5b86ac13c573795525ecac6ed2db39ab23e2a8
+a bug meant that the PID of the process that
+initially acquired the lock was displayed instead of the value \-1.)
+.IP [6]
+Three colon-separated subfields that identify the major and minor device
+ID of the device containing the filesystem where the locked file resides,
+followed by the inode number of the locked file.
+.IP [7]
+The byte offset of the first byte of the lock.
+For BSD locks, this value is always 0.
+.IP [8]
+The byte offset of the last byte of the lock.
+.B EOF
+in this field means that the lock extends to the end of the file.
+For BSD locks, the value shown is always
+.IR EOF .
+.RE
+.IP
+Since Linux 4.9,
+.\" commit d67fd44f697dff293d7cdc29af929241b669affe
+the list of locks shown in
+.I /proc/locks
+is filtered to show just the locks for the processes in the PID
+namespace (see
+.BR pid_namespaces (7))
+for which the
+.I /proc
+filesystem was mounted.
+(In the initial PID namespace,
+there is no filtering of the records shown in this file.)
+.IP
+The
+.BR lslocks (8)
+command provides a bit more information about each lock.
+.SH SEE ALSO
+.BR proc (5)