History

docs: filesystems: convert mandatory-locking.txt to ReST

- Add a SPDX header; - Adjust document title; - Some whitespace fixes and new line breaks; - Use notes markups; - Add it to filesystems/index.rst.

Mauro Carvalho Chehab committed 6 years ago

Commit a02dcdf1 parent 63526524 files · +19 −11Browse files

Unified · Split

4 files
  1. Documentation/filesystems/index.rst +1 −0
  2. Documentation/filesystems/locks.rst +1 −1
  3. Documentation/filesystems/mandatory-locking.rst +16 −9
  4. fs/locks.c +1 −1
Documentation/filesystems/index.rst+1−0
@@ -29,6 +29,7 @@ algorithms work. · 28 unmodified lines
2929 fiemap
3030 files
3131 locks
32+ mandatory-locking
3233
3334 automount-support
3435
Documentation/filesystems/locks.rst+1−1
@@ -58,7 +58,7 @@ fcntl(), with all the problems that implies. · 57 unmodified lines
5858 ---------------------------------------
5959
6060 Mandatory locking, as described in
61−'Documentation/filesystems/mandatory-locking.txt' was prior to this release a
61+'Documentation/filesystems/mandatory-locking.rst' was prior to this release a
6262 general configuration option that was valid for all mounted filesystems. This
6363 had a number of inherent dangers, not the least of which was the ability to
6464 freeze an NFS server by asking it to read a file for which a mandatory lock
Documentation/filesystems/mandatory-locking.rstrenamed from Documentation/filesystems/mandatory-locking.txt+16−9
@@ -1,8 +1,13 @@
1− Mandatory File Locking For The Linux Operating System
1+.. SPDX-License-Identifier: GPL-2.0
2+
3+=====================================================
4+Mandatory File Locking For The Linux Operating System
5+=====================================================
26
37 Andy Walker <andy@lysaker.kvaerner.no>
48
59 15 April 1996
10+
611 (Updated September 2007)
712
813 0. Why you should avoid mandatory locking
@@ -53,15 +58,17 @@ possible on existing user code. The scheme is based on marking individual files · 44 unmodified lines
5358 as candidates for mandatory locking, and using the existing fcntl()/lockf()
5459 interface for applying locks just as if they were normal, advisory locks.
5560
56−Note 1: In saying "file" in the paragraphs above I am actually not telling
57−the whole truth. System V locking is based on fcntl(). The granularity of
58−fcntl() is such that it allows the locking of byte ranges in files, in addition
59−to entire files, so the mandatory locking rules also have byte level
60−granularity.
61+.. Note::
62+
63+ 1. In saying "file" in the paragraphs above I am actually not telling
64+ the whole truth. System V locking is based on fcntl(). The granularity of
65+ fcntl() is such that it allows the locking of byte ranges in files, in
66+ addition to entire files, so the mandatory locking rules also have byte
67+ level granularity.
6168
62−Note 2: POSIX.1 does not specify any scheme for mandatory locking, despite
63−borrowing the fcntl() locking scheme from System V. The mandatory locking
64−scheme is defined by the System V Interface Definition (SVID) Version 3.
69+ 2. POSIX.1 does not specify any scheme for mandatory locking, despite
70+ borrowing the fcntl() locking scheme from System V. The mandatory locking
71+ scheme is defined by the System V Interface Definition (SVID) Version 3.
6572
6673 2. Marking a file for mandatory locking
6774 ---------------------------------------
fs/locks.c+1−1
@@ -61,7 +61,7 @@ · 60 unmodified lines
6161 *
6262 * Initial implementation of mandatory locks. SunOS turned out to be
6363 * a rotten model, so I implemented the "obvious" semantics.
64− * See 'Documentation/filesystems/mandatory-locking.txt' for details.
64+ * See 'Documentation/filesystems/mandatory-locking.rst' for details.
6565 * Andy Walker (andy@lysaker.kvaerner.no), April 06, 1996.
6666 *
6767 * Don't allow mandatory locks on mmap()'ed files. Added simple functions to