diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/00-INDEX | 6 | ||||
-rw-r--r-- | Documentation/filesystems/00-INDEX | 4 | ||||
-rw-r--r-- | Documentation/filesystems/locks.txt (renamed from Documentation/locks.txt) | 10 | ||||
-rw-r--r-- | Documentation/filesystems/mandatory-locking.txt (renamed from Documentation/mandatory.txt) | 21 |
4 files changed, 30 insertions, 11 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index 43e89b1537d9..cc10ce7dc339 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX | |||
@@ -145,7 +145,7 @@ fb/ | |||
145 | feature-removal-schedule.txt | 145 | feature-removal-schedule.txt |
146 | - list of files and features that are going to be removed. | 146 | - list of files and features that are going to be removed. |
147 | filesystems/ | 147 | filesystems/ |
148 | - directory with info on the various filesystems that Linux supports. | 148 | - info on the vfs and the various filesystems that Linux supports. |
149 | firmware_class/ | 149 | firmware_class/ |
150 | - request_firmware() hotplug interface info. | 150 | - request_firmware() hotplug interface info. |
151 | floppy.txt | 151 | floppy.txt |
@@ -230,8 +230,6 @@ local_ops.txt | |||
230 | - semantics and behavior of local atomic operations. | 230 | - semantics and behavior of local atomic operations. |
231 | lockdep-design.txt | 231 | lockdep-design.txt |
232 | - documentation on the runtime locking correctness validator. | 232 | - documentation on the runtime locking correctness validator. |
233 | locks.txt | ||
234 | - info on file locking implementations, flock() vs. fcntl(), etc. | ||
235 | logo.gif | 233 | logo.gif |
236 | - full colour GIF image of Linux logo (penguin - Tux). | 234 | - full colour GIF image of Linux logo (penguin - Tux). |
237 | logo.txt | 235 | logo.txt |
@@ -240,8 +238,6 @@ m68k/ | |||
240 | - directory with info about Linux on Motorola 68k architecture. | 238 | - directory with info about Linux on Motorola 68k architecture. |
241 | magic-number.txt | 239 | magic-number.txt |
242 | - list of magic numbers used to mark/protect kernel data structures. | 240 | - list of magic numbers used to mark/protect kernel data structures. |
243 | mandatory.txt | ||
244 | - info on the Linux implementation of Sys V mandatory file locking. | ||
245 | mca.txt | 241 | mca.txt |
246 | - info on supporting Micro Channel Architecture (e.g. PS/2) systems. | 242 | - info on supporting Micro Channel Architecture (e.g. PS/2) systems. |
247 | md.txt | 243 | md.txt |
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX index 59db1bca7027..599593a17067 100644 --- a/Documentation/filesystems/00-INDEX +++ b/Documentation/filesystems/00-INDEX | |||
@@ -52,6 +52,10 @@ isofs.txt | |||
52 | - info and mount options for the ISO 9660 (CDROM) filesystem. | 52 | - info and mount options for the ISO 9660 (CDROM) filesystem. |
53 | jfs.txt | 53 | jfs.txt |
54 | - info and mount options for the JFS filesystem. | 54 | - info and mount options for the JFS filesystem. |
55 | locks.txt | ||
56 | - info on file locking implementations, flock() vs. fcntl(), etc. | ||
57 | mandatory-locking.txt | ||
58 | - info on the Linux implementation of Sys V mandatory file locking. | ||
55 | ncpfs.txt | 59 | ncpfs.txt |
56 | - info on Novell Netware(tm) filesystem using NCP protocol. | 60 | - info on Novell Netware(tm) filesystem using NCP protocol. |
57 | ntfs.txt | 61 | ntfs.txt |
diff --git a/Documentation/locks.txt b/Documentation/filesystems/locks.txt index e3b402ef33bd..fab857accbd6 100644 --- a/Documentation/locks.txt +++ b/Documentation/filesystems/locks.txt | |||
@@ -53,11 +53,11 @@ fcntl(), with all the problems that implies. | |||
53 | 1.3 Mandatory Locking As A Mount Option | 53 | 1.3 Mandatory Locking As A Mount Option |
54 | --------------------------------------- | 54 | --------------------------------------- |
55 | 55 | ||
56 | Mandatory locking, as described in 'Documentation/mandatory.txt' was prior | 56 | Mandatory locking, as described in 'Documentation/filesystems/mandatory.txt' |
57 | to this release a general configuration option that was valid for all | 57 | was prior to this release a general configuration option that was valid for |
58 | mounted filesystems. This had a number of inherent dangers, not the least | 58 | all mounted filesystems. This had a number of inherent dangers, not the |
59 | of which was the ability to freeze an NFS server by asking it to read a | 59 | least of which was the ability to freeze an NFS server by asking it to read |
60 | file for which a mandatory lock existed. | 60 | a file for which a mandatory lock existed. |
61 | 61 | ||
62 | From this release of the kernel, mandatory locking can be turned on and off | 62 | From this release of the kernel, mandatory locking can be turned on and off |
63 | on a per-filesystem basis, using the mount options 'mand' and 'nomand'. | 63 | on a per-filesystem basis, using the mount options 'mand' and 'nomand'. |
diff --git a/Documentation/mandatory.txt b/Documentation/filesystems/mandatory-locking.txt index bc449d49eee5..0979d1d2ca8b 100644 --- a/Documentation/mandatory.txt +++ b/Documentation/filesystems/mandatory-locking.txt | |||
@@ -3,7 +3,26 @@ | |||
3 | Andy Walker <andy@lysaker.kvaerner.no> | 3 | Andy Walker <andy@lysaker.kvaerner.no> |
4 | 4 | ||
5 | 15 April 1996 | 5 | 15 April 1996 |
6 | 6 | (Updated September 2007) | |
7 | |||
8 | 0. Why you should avoid mandatory locking | ||
9 | ----------------------------------------- | ||
10 | |||
11 | The Linux implementation is prey to a number of difficult-to-fix race | ||
12 | conditions which in practice make it not dependable: | ||
13 | |||
14 | - The write system call checks for a mandatory lock only once | ||
15 | at its start. It is therefore possible for a lock request to | ||
16 | be granted after this check but before the data is modified. | ||
17 | A process may then see file data change even while a mandatory | ||
18 | lock was held. | ||
19 | - Similarly, an exclusive lock may be granted on a file after | ||
20 | the kernel has decided to proceed with a read, but before the | ||
21 | read has actually completed, and the reading process may see | ||
22 | the file data in a state which should not have been visible | ||
23 | to it. | ||
24 | - Similar races make the claimed mutual exclusion between lock | ||
25 | and mmap similarly unreliable. | ||
7 | 26 | ||
8 | 1. What is mandatory locking? | 27 | 1. What is mandatory locking? |
9 | ------------------------------ | 28 | ------------------------------ |