aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-07-19 17:49:39 -0400
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-07-19 17:49:39 -0400
commit39299d9d15c41cbdd7c7009967cd35afaf34d8fa (patch)
tree42a0c0408fcf76024eb6885a27d4f1ed0228abcf /Documentation
parentce625a801664d8ed7344117bbb57510e4e0e872c (diff)
parentf60f700876cd51de9de69f3a3c865d95e287a24d (diff)
Merge with /shiny/git/linux-2.6/.git
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/dontdiff2
-rw-r--r--Documentation/feature-removal-schedule.txt4
-rw-r--r--Documentation/filesystems/inotify.txt77
-rw-r--r--Documentation/filesystems/ntfs.txt29
4 files changed, 76 insertions, 36 deletions
diff --git a/Documentation/dontdiff b/Documentation/dontdiff
index d4fda25db868..b974cf595d01 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -41,6 +41,7 @@ COPYING
41CREDITS 41CREDITS
42CVS 42CVS
43ChangeSet 43ChangeSet
44Image
44Kerntypes 45Kerntypes
45MODS.txt 46MODS.txt
46Module.symvers 47Module.symvers
@@ -103,6 +104,7 @@ logo_*.c
103logo_*_clut224.c 104logo_*_clut224.c
104logo_*_mono.c 105logo_*_mono.c
105lxdialog 106lxdialog
107mach-types.h
106make_times_h 108make_times_h
107map 109map
108maui_boot.h 110maui_boot.h
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 12dde43fe657..8b1430b46655 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -103,11 +103,11 @@ Who: Jody McIntyre <scjody@steamballoon.com>
103--------------------------- 103---------------------------
104 104
105What: register_serial/unregister_serial 105What: register_serial/unregister_serial
106When: December 2005 106When: September 2005
107Why: This interface does not allow serial ports to be registered against 107Why: This interface does not allow serial ports to be registered against
108 a struct device, and as such does not allow correct power management 108 a struct device, and as such does not allow correct power management
109 of such ports. 8250-based ports should use serial8250_register_port 109 of such ports. 8250-based ports should use serial8250_register_port
110 and serial8250_unregister_port instead. 110 and serial8250_unregister_port, or platform devices instead.
111Who: Russell King <rmk@arm.linux.org.uk> 111Who: Russell King <rmk@arm.linux.org.uk>
112 112
113--------------------------- 113---------------------------
diff --git a/Documentation/filesystems/inotify.txt b/Documentation/filesystems/inotify.txt
index 2c716041f578..6d501903f68e 100644
--- a/Documentation/filesystems/inotify.txt
+++ b/Documentation/filesystems/inotify.txt
@@ -1,18 +1,22 @@
1 inotify 1 inotify
2 a powerful yet simple file change notification system 2 a powerful yet simple file change notification system
3 3
4 4
5 5
6Document started 15 Mar 2005 by Robert Love <rml@novell.com> 6Document started 15 Mar 2005 by Robert Love <rml@novell.com>
7 7
8
8(i) User Interface 9(i) User Interface
9 10
10Inotify is controlled by a set of three sys calls 11Inotify is controlled by a set of three system calls and normal file I/O on a
12returned file descriptor.
11 13
12First step in using inotify is to initialise an inotify instance 14First step in using inotify is to initialise an inotify instance:
13 15
14 int fd = inotify_init (); 16 int fd = inotify_init ();
15 17
18Each instance is associated with a unique, ordered queue.
19
16Change events are managed by "watches". A watch is an (object,mask) pair where 20Change events are managed by "watches". A watch is an (object,mask) pair where
17the object is a file or directory and the mask is a bit mask of one or more 21the object is a file or directory and the mask is a bit mask of one or more
18inotify events that the application wishes to receive. See <linux/inotify.h> 22inotify events that the application wishes to receive. See <linux/inotify.h>
@@ -22,43 +26,52 @@ Watches are added via a path to the file.
22 26
23Watches on a directory will return events on any files inside of the directory. 27Watches on a directory will return events on any files inside of the directory.
24 28
25Adding a watch is simple, 29Adding a watch is simple:
26 30
27 int wd = inotify_add_watch (fd, path, mask); 31 int wd = inotify_add_watch (fd, path, mask);
28 32
29You can add a large number of files via something like 33Where "fd" is the return value from inotify_init(), path is the path to the
30 34object to watch, and mask is the watch mask (see <linux/inotify.h>).
31 for each file to watch {
32 int wd = inotify_add_watch (fd, file, mask);
33 }
34 35
35You can update an existing watch in the same manner, by passing in a new mask. 36You can update an existing watch in the same manner, by passing in a new mask.
36 37
37An existing watch is removed via the INOTIFY_IGNORE ioctl, for example 38An existing watch is removed via
38 39
39 inotify_rm_watch (fd, wd); 40 int ret = inotify_rm_watch (fd, wd);
40 41
41Events are provided in the form of an inotify_event structure that is read(2) 42Events are provided in the form of an inotify_event structure that is read(2)
42from a inotify instance fd. The filename is of dynamic length and follows the 43from a given inotify instance. The filename is of dynamic length and follows
43struct. It is of size len. The filename is padded with null bytes to ensure 44the struct. It is of size len. The filename is padded with null bytes to
44proper alignment. This padding is reflected in len. 45ensure proper alignment. This padding is reflected in len.
45 46
46You can slurp multiple events by passing a large buffer, for example 47You can slurp multiple events by passing a large buffer, for example
47 48
48 size_t len = read (fd, buf, BUF_LEN); 49 size_t len = read (fd, buf, BUF_LEN);
49 50
50Will return as many events as are available and fit in BUF_LEN. 51Where "buf" is a pointer to an array of "inotify_event" structures at least
52BUF_LEN bytes in size. The above example will return as many events as are
53available and fit in BUF_LEN.
51 54
52each inotify instance fd is also select()- and poll()-able. 55Each inotify instance fd is also select()- and poll()-able.
53 56
54You can find the size of the current event queue via the FIONREAD ioctl. 57You can find the size of the current event queue via the standard FIONREAD
58ioctl on the fd returned by inotify_init().
55 59
56All watches are destroyed and cleaned up on close. 60All watches are destroyed and cleaned up on close.
57 61
58 62
59(ii) Internal Kernel Implementation 63(ii)
64
65Prototypes:
66
67 int inotify_init (void);
68 int inotify_add_watch (int fd, const char *path, __u32 mask);
69 int inotify_rm_watch (int fd, __u32 mask);
70
60 71
61Each open inotify instance is associated with an inotify_device structure. 72(iii) Internal Kernel Implementation
73
74Each inotify instance is associated with an inotify_device structure.
62 75
63Each watch is associated with an inotify_watch structure. Watches are chained 76Each watch is associated with an inotify_watch structure. Watches are chained
64off of each associated device and each associated inode. 77off of each associated device and each associated inode.
@@ -66,7 +79,7 @@ off of each associated device and each associated inode.
66See fs/inotify.c for the locking and lifetime rules. 79See fs/inotify.c for the locking and lifetime rules.
67 80
68 81
69(iii) Rationale 82(iv) Rationale
70 83
71Q: What is the design decision behind not tying the watch to the open fd of 84Q: What is the design decision behind not tying the watch to the open fd of
72 the watched object? 85 the watched object?
@@ -75,9 +88,9 @@ A: Watches are associated with an open inotify device, not an open file.
75 This solves the primary problem with dnotify: keeping the file open pins 88 This solves the primary problem with dnotify: keeping the file open pins
76 the file and thus, worse, pins the mount. Dnotify is therefore infeasible 89 the file and thus, worse, pins the mount. Dnotify is therefore infeasible
77 for use on a desktop system with removable media as the media cannot be 90 for use on a desktop system with removable media as the media cannot be
78 unmounted. 91 unmounted. Watching a file should not require that it be open.
79 92
80Q: What is the design decision behind using an-fd-per-device as opposed to 93Q: What is the design decision behind using an-fd-per-instance as opposed to
81 an fd-per-watch? 94 an fd-per-watch?
82 95
83A: An fd-per-watch quickly consumes more file descriptors than are allowed, 96A: An fd-per-watch quickly consumes more file descriptors than are allowed,
@@ -86,8 +99,8 @@ A: An fd-per-watch quickly consumes more file descriptors than are allowed,
86 can use epoll, but requiring both is a silly and extraneous requirement. 99 can use epoll, but requiring both is a silly and extraneous requirement.
87 A watch consumes less memory than an open file, separating the number 100 A watch consumes less memory than an open file, separating the number
88 spaces is thus sensible. The current design is what user-space developers 101 spaces is thus sensible. The current design is what user-space developers
89 want: Users initialize inotify, once, and add n watches, requiring but one fd 102 want: Users initialize inotify, once, and add n watches, requiring but one
90 and no twiddling with fd limits. Initializing an inotify instance two 103 fd and no twiddling with fd limits. Initializing an inotify instance two
91 thousand times is silly. If we can implement user-space's preferences 104 thousand times is silly. If we can implement user-space's preferences
92 cleanly--and we can, the idr layer makes stuff like this trivial--then we 105 cleanly--and we can, the idr layer makes stuff like this trivial--then we
93 should. 106 should.
@@ -111,9 +124,6 @@ A: An fd-per-watch quickly consumes more file descriptors than are allowed,
111 example, love it. Trust me, I asked. It is not a surprise: Who'd want 124 example, love it. Trust me, I asked. It is not a surprise: Who'd want
112 to manage and block on 1000 fd's via select? 125 to manage and block on 1000 fd's via select?
113 126
114 - You'd have to manage the fd's, as an example: Call close() when you
115 received a delete event.
116
117 - No way to get out of band data. 127 - No way to get out of band data.
118 128
119 - 1024 is still too low. ;-) 129 - 1024 is still too low. ;-)
@@ -122,6 +132,11 @@ A: An fd-per-watch quickly consumes more file descriptors than are allowed,
122 scales to 1000s of directories, juggling 1000s of fd's just does not seem 132 scales to 1000s of directories, juggling 1000s of fd's just does not seem
123 the right interface. It is too heavy. 133 the right interface. It is too heavy.
124 134
135 Additionally, it _is_ possible to more than one instance and
136 juggle more than one queue and thus more than one associated fd. There
137 need not be a one-fd-per-process mapping; it is one-fd-per-queue and a
138 process can easily want more than one queue.
139
125Q: Why the system call approach? 140Q: Why the system call approach?
126 141
127A: The poor user-space interface is the second biggest problem with dnotify. 142A: The poor user-space interface is the second biggest problem with dnotify.
@@ -131,8 +146,6 @@ A: The poor user-space interface is the second biggest problem with dnotify.
131 Obtaining the fd and managing the watches could have been done either via a 146 Obtaining the fd and managing the watches could have been done either via a
132 device file or a family of new system calls. We decided to implement a 147 device file or a family of new system calls. We decided to implement a
133 family of system calls because that is the preffered approach for new kernel 148 family of system calls because that is the preffered approach for new kernel
134 features and it means our user interface requirements. 149 interfaces. The only real difference was whether we wanted to use open(2)
135 150 and ioctl(2) or a couple of new system calls. System calls beat ioctls.
136 Additionally, it _is_ possible to more than one instance and
137 juggle more than one queue and thus more than one associated fd.
138 151
diff --git a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt
index f89b440fad1d..eef4aca0c753 100644
--- a/Documentation/filesystems/ntfs.txt
+++ b/Documentation/filesystems/ntfs.txt
@@ -21,7 +21,7 @@ Overview
21======== 21========
22 22
23Linux-NTFS comes with a number of user-space programs known as ntfsprogs. 23Linux-NTFS comes with a number of user-space programs known as ntfsprogs.
24These include mkntfs, a full-featured ntfs file system format utility, 24These include mkntfs, a full-featured ntfs filesystem format utility,
25ntfsundelete used for recovering files that were unintentionally deleted 25ntfsundelete used for recovering files that were unintentionally deleted
26from an NTFS volume and ntfsresize which is used to resize an NTFS partition. 26from an NTFS volume and ntfsresize which is used to resize an NTFS partition.
27See the web site for more information. 27See the web site for more information.
@@ -149,7 +149,14 @@ case_sensitive=<BOOL> If case_sensitive is specified, treat all file names as
149 name, if it exists. If case_sensitive, you will need 149 name, if it exists. If case_sensitive, you will need
150 to provide the correct case of the short file name. 150 to provide the correct case of the short file name.
151 151
152errors=opt What to do when critical file system errors are found. 152disable_sparse=<BOOL> If disable_sparse is specified, creation of sparse
153 regions, i.e. holes, inside files is disabled for the
154 volume (for the duration of this mount only). By
155 default, creation of sparse regions is enabled, which
156 is consistent with the behaviour of traditional Unix
157 filesystems.
158
159errors=opt What to do when critical filesystem errors are found.
153 Following values can be used for "opt": 160 Following values can be used for "opt":
154 continue: DEFAULT, try to clean-up as much as 161 continue: DEFAULT, try to clean-up as much as
155 possible, e.g. marking a corrupt inode as 162 possible, e.g. marking a corrupt inode as
@@ -432,6 +439,24 @@ ChangeLog
432 439
433Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. 440Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
434 441
4422.1.23:
443 - Stamp the user space journal, aka transaction log, aka $UsnJrnl, if
444 it is present and active thus telling Windows and applications using
445 the transaction log that changes can have happened on the volume
446 which are not recorded in $UsnJrnl.
447 - Detect the case when Windows has been hibernated (suspended to disk)
448 and if this is the case do not allow (re)mounting read-write to
449 prevent data corruption when you boot back into the suspended
450 Windows session.
451 - Implement extension of resident files using the normal file write
452 code paths, i.e. most very small files can be extended to be a little
453 bit bigger but not by much.
454 - Add new mount option "disable_sparse". (See list of mount options
455 above for details.)
456 - Improve handling of ntfs volumes with errors and strange boot sectors
457 in particular.
458 - Fix various bugs including a nasty deadlock that appeared in recent
459 kernels (around 2.6.11-2.6.12 timeframe).
4352.1.22: 4602.1.22:
436 - Improve handling of ntfs volumes with errors. 461 - Improve handling of ntfs volumes with errors.
437 - Fix various bugs and race conditions. 462 - Fix various bugs and race conditions.