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
29 fiemap29 fiemap
30 files30 files
31 locks31 locks
32 mandatory-locking
32 33
33 automount-support34 automount-support
34 35
Documentation/filesystems/locks.rst+1−1
@@ -58,7 +58,7 @@ fcntl(), with all the problems that implies. · 57 unmodified lines
58---------------------------------------58---------------------------------------
59 59
60Mandatory locking, as described in60Mandatory locking, as described in
61'Documentation/filesystems/mandatory-locking.txt' was prior to this release a61'Documentation/filesystems/mandatory-locking.rst' was prior to this release a
62general configuration option that was valid for all mounted filesystems. This62general configuration option that was valid for all mounted filesystems. This
63had a number of inherent dangers, not the least of which was the ability to63had a number of inherent dangers, not the least of which was the ability to
64freeze an NFS server by asking it to read a file for which a mandatory lock64freeze 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 System1.. SPDX-License-Identifier: GPL-2.0
2
3=====================================================
4Mandatory File Locking For The Linux Operating System
5=====================================================
2 6
3 Andy Walker <andy@lysaker.kvaerner.no>7 Andy Walker <andy@lysaker.kvaerner.no>
4 8
5 15 April 19969 15 April 1996
10
6 (Updated September 2007)11 (Updated September 2007)
7 12
80. Why you should avoid mandatory locking130. 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
53as candidates for mandatory locking, and using the existing fcntl()/lockf()58as candidates for mandatory locking, and using the existing fcntl()/lockf()
54interface for applying locks just as if they were normal, advisory locks.59interface for applying locks just as if they were normal, advisory locks.
55 60
56Note 1: In saying "file" in the paragraphs above I am actually not telling61.. Note::
57the whole truth. System V locking is based on fcntl(). The granularity of62
58fcntl() is such that it allows the locking of byte ranges in files, in addition63 1. In saying "file" in the paragraphs above I am actually not telling
59to entire files, so the mandatory locking rules also have byte level64 the whole truth. System V locking is based on fcntl(). The granularity of
60granularity.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.
61 68
62Note 2: POSIX.1 does not specify any scheme for mandatory locking, despite69 2. POSIX.1 does not specify any scheme for mandatory locking, despite
63borrowing the fcntl() locking scheme from System V. The mandatory locking70 borrowing the fcntl() locking scheme from System V. The mandatory locking
64scheme is defined by the System V Interface Definition (SVID) Version 3.71 scheme is defined by the System V Interface Definition (SVID) Version 3.
65 72
662. Marking a file for mandatory locking732. Marking a file for mandatory locking
67---------------------------------------74---------------------------------------
fs/locks.c+1−1
@@ -61,7 +61,7 @@ · 60 unmodified lines
61 *61 *
62 * Initial implementation of mandatory locks. SunOS turned out to be62 * Initial implementation of mandatory locks. SunOS turned out to be
63 * a rotten model, so I implemented the "obvious" semantics.63 * 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.
65 * Andy Walker (andy@lysaker.kvaerner.no), April 06, 1996.65 * Andy Walker (andy@lysaker.kvaerner.no), April 06, 1996.
66 *66 *
67 * Don't allow mandatory locks on mmap()'ed files. Added simple functions to67 * Don't allow mandatory locks on mmap()'ed files. Added simple functions to