diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-01-17 01:14:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-17 02:15:31 -0500 |
commit | bacac382fbf53f717ca7f83558e45cce44e67df9 (patch) | |
tree | 1de51ebaa900b9c16712945171b2474e98446404 | |
parent | c1aa96a52e9594fb16296c0d76c2066773d62933 (diff) |
[PATCH] fuse: update documentation for sysfs
Add documentation for new attributes in sysfs. Also describe the filesystem.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | Documentation/filesystems/fuse.txt | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/Documentation/filesystems/fuse.txt b/Documentation/filesystems/fuse.txt index 6b5741e651a2..33f74310d161 100644 --- a/Documentation/filesystems/fuse.txt +++ b/Documentation/filesystems/fuse.txt | |||
@@ -86,6 +86,62 @@ Mount options | |||
86 | The default is infinite. Note that the size of read requests is | 86 | The default is infinite. Note that the size of read requests is |
87 | limited anyway to 32 pages (which is 128kbyte on i386). | 87 | limited anyway to 32 pages (which is 128kbyte on i386). |
88 | 88 | ||
89 | Sysfs | ||
90 | ~~~~~ | ||
91 | |||
92 | FUSE sets up the following hierarchy in sysfs: | ||
93 | |||
94 | /sys/fs/fuse/connections/N/ | ||
95 | |||
96 | where N is an increasing number allocated to each new connection. | ||
97 | |||
98 | For each connection the following attributes are defined: | ||
99 | |||
100 | 'waiting' | ||
101 | |||
102 | The number of requests which are waiting to be transfered to | ||
103 | userspace or being processed by the filesystem daemon. If there is | ||
104 | no filesystem activity and 'waiting' is non-zero, then the | ||
105 | filesystem is hung or deadlocked. | ||
106 | |||
107 | 'abort' | ||
108 | |||
109 | Writing anything into this file will abort the filesystem | ||
110 | connection. This means that all waiting requests will be aborted an | ||
111 | error returned for all aborted and new requests. | ||
112 | |||
113 | Only a privileged user may read or write these attributes. | ||
114 | |||
115 | Aborting a filesystem connection | ||
116 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
117 | |||
118 | It is possible to get into certain situations where the filesystem is | ||
119 | not responding. Reasons for this may be: | ||
120 | |||
121 | a) Broken userspace filesystem implementation | ||
122 | |||
123 | b) Network connection down | ||
124 | |||
125 | c) Accidental deadlock | ||
126 | |||
127 | d) Malicious deadlock | ||
128 | |||
129 | (For more on c) and d) see later sections) | ||
130 | |||
131 | In either of these cases it may be useful to abort the connection to | ||
132 | the filesystem. There are several ways to do this: | ||
133 | |||
134 | - Kill the filesystem daemon. Works in case of a) and b) | ||
135 | |||
136 | - Kill the filesystem daemon and all users of the filesystem. Works | ||
137 | in all cases except some malicious deadlocks | ||
138 | |||
139 | - Use forced umount (umount -f). Works in all cases but only if | ||
140 | filesystem is still attached (it hasn't been lazy unmounted) | ||
141 | |||
142 | - Abort filesystem through the sysfs interface. Most powerful | ||
143 | method, always works. | ||
144 | |||
89 | How do non-privileged mounts work? | 145 | How do non-privileged mounts work? |
90 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 146 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
91 | 147 | ||
@@ -313,3 +369,10 @@ faulted with get_user_pages(). The 'req->locked' flag indicates | |||
313 | when the copy is taking place, and interruption is delayed until | 369 | when the copy is taking place, and interruption is delayed until |
314 | this flag is unset. | 370 | this flag is unset. |
315 | 371 | ||
372 | Scenario 3 - Tricky deadlock with asynchronous read | ||
373 | --------------------------------------------------- | ||
374 | |||
375 | The same situation as above, except thread-1 will wait on page lock | ||
376 | and hence it will be uninterruptible as well. The solution is to | ||
377 | abort the connection with forced umount (if mount is attached) or | ||
378 | through the abort attribute in sysfs. | ||