aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/fuse_i.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r--fs/fuse/fuse_i.h45
1 files changed, 40 insertions, 5 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index b4aa8f7bc2c1..c8e6c87496e0 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -21,6 +21,19 @@
21/** If more requests are outstanding, then the operation will block */ 21/** If more requests are outstanding, then the operation will block */
22#define FUSE_MAX_OUTSTANDING 10 22#define FUSE_MAX_OUTSTANDING 10
23 23
24/** If the FUSE_DEFAULT_PERMISSIONS flag is given, the filesystem
25 module will check permissions based on the file mode. Otherwise no
26 permission checking is done in the kernel */
27#define FUSE_DEFAULT_PERMISSIONS (1 << 0)
28
29/** If the FUSE_ALLOW_OTHER flag is given, then not only the user
30 doing the mount will be allowed to access the filesystem */
31#define FUSE_ALLOW_OTHER (1 << 1)
32
33/** If the FUSE_KERNEL_CACHE flag is given, then cached data will not
34 be flushed on open */
35#define FUSE_KERNEL_CACHE (1 << 2)
36
24/** FUSE inode */ 37/** FUSE inode */
25struct fuse_inode { 38struct fuse_inode {
26 /** Inode data */ 39 /** Inode data */
@@ -109,6 +122,9 @@ struct fuse_req {
109 lists in fuse_conn */ 122 lists in fuse_conn */
110 struct list_head list; 123 struct list_head list;
111 124
125 /** Entry on the background list */
126 struct list_head bg_entry;
127
112 /** refcount */ 128 /** refcount */
113 atomic_t count; 129 atomic_t count;
114 130
@@ -176,15 +192,15 @@ struct fuse_req {
176 * unmounted. 192 * unmounted.
177 */ 193 */
178struct fuse_conn { 194struct fuse_conn {
179 /** The superblock of the mounted filesystem */ 195 /** Reference count */
180 struct super_block *sb; 196 int count;
181
182 /** The opened client device */
183 struct file *file;
184 197
185 /** The user id for this mount */ 198 /** The user id for this mount */
186 uid_t user_id; 199 uid_t user_id;
187 200
201 /** The fuse mount flags for this mount */
202 unsigned flags;
203
188 /** Readers of the connection are waiting on this */ 204 /** Readers of the connection are waiting on this */
189 wait_queue_head_t waitq; 205 wait_queue_head_t waitq;
190 206
@@ -194,6 +210,10 @@ struct fuse_conn {
194 /** The list of requests being processed */ 210 /** The list of requests being processed */
195 struct list_head processing; 211 struct list_head processing;
196 212
213 /** Requests put in the background (RELEASE or any other
214 interrupted request) */
215 struct list_head background;
216
197 /** Controls the maximum number of outstanding requests */ 217 /** Controls the maximum number of outstanding requests */
198 struct semaphore outstanding_sem; 218 struct semaphore outstanding_sem;
199 219
@@ -201,12 +221,21 @@ struct fuse_conn {
201 outstanding_sem would go negative */ 221 outstanding_sem would go negative */
202 unsigned outstanding_debt; 222 unsigned outstanding_debt;
203 223
224 /** RW semaphore for exclusion with fuse_put_super() */
225 struct rw_semaphore sbput_sem;
226
204 /** The list of unused requests */ 227 /** The list of unused requests */
205 struct list_head unused_list; 228 struct list_head unused_list;
206 229
207 /** The next unique request id */ 230 /** The next unique request id */
208 u64 reqctr; 231 u64 reqctr;
209 232
233 /** Mount is active */
234 unsigned mounted : 1;
235
236 /** Connection established */
237 unsigned connected : 1;
238
210 /** Connection failed (version mismatch) */ 239 /** Connection failed (version mismatch) */
211 unsigned conn_error : 1; 240 unsigned conn_error : 1;
212 241
@@ -261,6 +290,7 @@ extern struct file_operations fuse_dev_operations;
261 * - the private_data field of the device file 290 * - the private_data field of the device file
262 * - the s_fs_info field of the super block 291 * - the s_fs_info field of the super block
263 * - unused_list, pending, processing lists in fuse_conn 292 * - unused_list, pending, processing lists in fuse_conn
293 * - background list in fuse_conn
264 * - the unique request ID counter reqctr in fuse_conn 294 * - the unique request ID counter reqctr in fuse_conn
265 * - the sb (super_block) field in fuse_conn 295 * - the sb (super_block) field in fuse_conn
266 * - the file (device file) field in fuse_conn 296 * - the file (device file) field in fuse_conn
@@ -372,6 +402,11 @@ void request_send_noreply(struct fuse_conn *fc, struct fuse_req *req);
372void request_send_background(struct fuse_conn *fc, struct fuse_req *req); 402void request_send_background(struct fuse_conn *fc, struct fuse_req *req);
373 403
374/** 404/**
405 * Release inodes and file assiciated with background request
406 */
407void fuse_release_background(struct fuse_req *req);
408
409/**
375 * Get the attributes of a file 410 * Get the attributes of a file
376 */ 411 */
377int fuse_do_getattr(struct inode *inode); 412int fuse_do_getattr(struct inode *inode);