mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
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. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/aecd6259fe9f99b2c2b3440eab6a2b989125e00d.1588021877.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
63526525dd
commit
a02dcdf65b
4 changed files with 19 additions and 11 deletions
|
@ -29,6 +29,7 @@ algorithms work.
|
||||||
fiemap
|
fiemap
|
||||||
files
|
files
|
||||||
locks
|
locks
|
||||||
|
mandatory-locking
|
||||||
|
|
||||||
automount-support
|
automount-support
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ fcntl(), with all the problems that implies.
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
|
||||||
Mandatory locking, as described in
|
Mandatory locking, as described in
|
||||||
'Documentation/filesystems/mandatory-locking.txt' was prior to this release a
|
'Documentation/filesystems/mandatory-locking.rst' was prior to this release a
|
||||||
general configuration option that was valid for all mounted filesystems. This
|
general configuration option that was valid for all mounted filesystems. This
|
||||||
had a number of inherent dangers, not the least of which was the ability to
|
had a number of inherent dangers, not the least of which was the ability to
|
||||||
freeze an NFS server by asking it to read a file for which a mandatory lock
|
freeze an NFS server by asking it to read a file for which a mandatory lock
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
Mandatory File Locking For The Linux Operating System
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
=====================================================
|
||||||
|
Mandatory File Locking For The Linux Operating System
|
||||||
|
=====================================================
|
||||||
|
|
||||||
Andy Walker <andy@lysaker.kvaerner.no>
|
Andy Walker <andy@lysaker.kvaerner.no>
|
||||||
|
|
||||||
15 April 1996
|
15 April 1996
|
||||||
|
|
||||||
(Updated September 2007)
|
(Updated September 2007)
|
||||||
|
|
||||||
0. Why you should avoid mandatory locking
|
0. Why you should avoid mandatory locking
|
||||||
|
@ -53,15 +58,17 @@ possible on existing user code. The scheme is based on marking individual files
|
||||||
as candidates for mandatory locking, and using the existing fcntl()/lockf()
|
as candidates for mandatory locking, and using the existing fcntl()/lockf()
|
||||||
interface for applying locks just as if they were normal, advisory locks.
|
interface for applying locks just as if they were normal, advisory locks.
|
||||||
|
|
||||||
Note 1: In saying "file" in the paragraphs above I am actually not telling
|
.. Note::
|
||||||
the whole truth. System V locking is based on fcntl(). The granularity of
|
|
||||||
fcntl() is such that it allows the locking of byte ranges in files, in addition
|
|
||||||
to entire files, so the mandatory locking rules also have byte level
|
|
||||||
granularity.
|
|
||||||
|
|
||||||
Note 2: POSIX.1 does not specify any scheme for mandatory locking, despite
|
1. In saying "file" in the paragraphs above I am actually not telling
|
||||||
borrowing the fcntl() locking scheme from System V. The mandatory locking
|
the whole truth. System V locking is based on fcntl(). The granularity of
|
||||||
scheme is defined by the System V Interface Definition (SVID) Version 3.
|
fcntl() is such that it allows the locking of byte ranges in files, in
|
||||||
|
addition to entire files, so the mandatory locking rules also have byte
|
||||||
|
level granularity.
|
||||||
|
|
||||||
|
2. POSIX.1 does not specify any scheme for mandatory locking, despite
|
||||||
|
borrowing the fcntl() locking scheme from System V. The mandatory locking
|
||||||
|
scheme is defined by the System V Interface Definition (SVID) Version 3.
|
||||||
|
|
||||||
2. Marking a file for mandatory locking
|
2. Marking a file for mandatory locking
|
||||||
---------------------------------------
|
---------------------------------------
|
|
@ -61,7 +61,7 @@
|
||||||
*
|
*
|
||||||
* Initial implementation of mandatory locks. SunOS turned out to be
|
* Initial implementation of mandatory locks. SunOS turned out to be
|
||||||
* a rotten model, so I implemented the "obvious" semantics.
|
* a rotten model, so I implemented the "obvious" semantics.
|
||||||
* See 'Documentation/filesystems/mandatory-locking.txt' for details.
|
* See 'Documentation/filesystems/mandatory-locking.rst' for details.
|
||||||
* Andy Walker (andy@lysaker.kvaerner.no), April 06, 1996.
|
* Andy Walker (andy@lysaker.kvaerner.no), April 06, 1996.
|
||||||
*
|
*
|
||||||
* Don't allow mandatory locks on mmap()'ed files. Added simple functions to
|
* Don't allow mandatory locks on mmap()'ed files. Added simple functions to
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue