blob: 68ae87cbafab556a8b3843681274f7ac911ceae8 [file] [log] [blame]
Miklos Szeredid8a5ba42005-09-09 13:10:26 -07001/*
2 FUSE: Filesystem in Userspace
Miklos Szeredid7133112006-04-10 22:54:55 -07003 Copyright (C) 2001-2006 Miklos Szeredi <miklos@szeredi.hu>
Miklos Szeredid8a5ba42005-09-09 13:10:26 -07004
5 This program can be distributed under the terms of the GNU GPL.
6 See the file COPYING.
7*/
8
9#include <linux/fuse.h>
10#include <linux/fs.h>
Miklos Szeredi51eb01e2006-06-25 05:48:50 -070011#include <linux/mount.h>
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070012#include <linux/wait.h>
13#include <linux/list.h>
14#include <linux/spinlock.h>
15#include <linux/mm.h>
16#include <linux/backing-dev.h>
Miklos Szeredibafa9652006-06-25 05:48:51 -070017#include <linux/mutex.h>
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070018
Miklos Szeredi334f4852005-09-09 13:10:27 -070019/** Max number of pages that can be used in a single read request */
20#define FUSE_MAX_PAGES_PER_REQ 32
21
Miklos Szeredi08a53cd2006-04-10 22:54:59 -070022/** Maximum number of outstanding background requests */
23#define FUSE_MAX_BACKGROUND 10
24
Miklos Szeredi1d3d7522006-01-06 00:19:40 -080025/** It could be as large as PATH_MAX, but would that have any uses? */
26#define FUSE_NAME_MAX 1024
27
Miklos Szeredibafa9652006-06-25 05:48:51 -070028/** Number of dentries for each connection in the control filesystem */
29#define FUSE_CTL_NUM_DENTRIES 3
30
Miklos Szeredi1e9a4ed2005-09-09 13:10:31 -070031/** If the FUSE_DEFAULT_PERMISSIONS flag is given, the filesystem
32 module will check permissions based on the file mode. Otherwise no
33 permission checking is done in the kernel */
34#define FUSE_DEFAULT_PERMISSIONS (1 << 0)
35
36/** If the FUSE_ALLOW_OTHER flag is given, then not only the user
37 doing the mount will be allowed to access the filesystem */
38#define FUSE_ALLOW_OTHER (1 << 1)
39
Miklos Szeredibafa9652006-06-25 05:48:51 -070040/** List of active connections */
41extern struct list_head fuse_conn_list;
42
43/** Global mutex protecting fuse_conn_list and the control filesystem */
44extern struct mutex fuse_mutex;
Miklos Szeredi413ef8c2005-09-09 13:10:35 -070045
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070046/** FUSE inode */
47struct fuse_inode {
48 /** Inode data */
49 struct inode inode;
50
51 /** Unique ID, which identifies the inode between userspace
52 * and kernel */
53 u64 nodeid;
54
Miklos Szeredi9e6268d2005-09-09 13:10:29 -070055 /** Number of lookups on this inode */
56 u64 nlookup;
57
Miklos Szeredie5e55582005-09-09 13:10:28 -070058 /** The request used for sending the FORGET message */
59 struct fuse_req *forget_req;
60
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070061 /** Time in jiffies until the file attributes are valid */
Miklos Szeredi0a0898c2006-07-30 03:04:10 -070062 u64 i_time;
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070063};
64
Miklos Szeredib6aeade2005-09-09 13:10:30 -070065/** FUSE specific file data */
66struct fuse_file {
67 /** Request reserved for flush and release */
Miklos Szeredi33649c92006-06-25 05:48:52 -070068 struct fuse_req *reserved_req;
Miklos Szeredib6aeade2005-09-09 13:10:30 -070069
70 /** File handle used by userspace */
71 u64 fh;
72};
73
Miklos Szeredi334f4852005-09-09 13:10:27 -070074/** One input argument of a request */
75struct fuse_in_arg {
76 unsigned size;
77 const void *value;
78};
79
80/** The request input */
81struct fuse_in {
82 /** The request header */
83 struct fuse_in_header h;
84
85 /** True if the data for the last argument is in req->pages */
86 unsigned argpages:1;
87
88 /** Number of arguments */
89 unsigned numargs;
90
91 /** Array of arguments */
92 struct fuse_in_arg args[3];
93};
94
95/** One output argument of a request */
96struct fuse_arg {
97 unsigned size;
98 void *value;
99};
100
101/** The request output */
102struct fuse_out {
103 /** Header returned from userspace */
104 struct fuse_out_header h;
105
Miklos Szeredi095da6c2006-01-16 22:14:52 -0800106 /*
107 * The following bitfields are not changed during the request
108 * processing
109 */
110
Miklos Szeredi334f4852005-09-09 13:10:27 -0700111 /** Last argument is variable length (can be shorter than
112 arg->size) */
113 unsigned argvar:1;
114
115 /** Last argument is a list of pages to copy data to */
116 unsigned argpages:1;
117
118 /** Zero partially or not copied pages */
119 unsigned page_zeroing:1;
120
121 /** Number or arguments */
122 unsigned numargs;
123
124 /** Array of arguments */
125 struct fuse_arg args[3];
126};
127
Miklos Szeredi83cfd492006-01-16 22:14:31 -0800128/** The request state */
129enum fuse_req_state {
130 FUSE_REQ_INIT = 0,
131 FUSE_REQ_PENDING,
132 FUSE_REQ_READING,
133 FUSE_REQ_SENT,
Miklos Szeredia4d27e72006-06-25 05:48:54 -0700134 FUSE_REQ_WRITING,
Miklos Szeredi83cfd492006-01-16 22:14:31 -0800135 FUSE_REQ_FINISHED
136};
137
Miklos Szeredi64c6d8e2006-01-16 22:14:42 -0800138struct fuse_conn;
139
Miklos Szeredi334f4852005-09-09 13:10:27 -0700140/**
141 * A request to the client
142 */
143struct fuse_req {
Miklos Szeredice1d5a42006-04-10 22:54:58 -0700144 /** This can be on either pending processing or io lists in
145 fuse_conn */
Miklos Szeredi334f4852005-09-09 13:10:27 -0700146 struct list_head list;
147
Miklos Szeredia4d27e72006-06-25 05:48:54 -0700148 /** Entry on the interrupts list */
149 struct list_head intr_entry;
150
Miklos Szeredi334f4852005-09-09 13:10:27 -0700151 /** refcount */
152 atomic_t count;
153
Miklos Szeredia4d27e72006-06-25 05:48:54 -0700154 /** Unique ID for the interrupt request */
155 u64 intr_unique;
156
Miklos Szeredi095da6c2006-01-16 22:14:52 -0800157 /*
158 * The following bitfields are either set once before the
159 * request is queued or setting/clearing them is protected by
Miklos Szeredid7133112006-04-10 22:54:55 -0700160 * fuse_conn->lock
Miklos Szeredi095da6c2006-01-16 22:14:52 -0800161 */
162
Miklos Szeredi334f4852005-09-09 13:10:27 -0700163 /** True if the request has reply */
164 unsigned isreply:1;
165
Miklos Szeredi51eb01e2006-06-25 05:48:50 -0700166 /** Force sending of the request even if interrupted */
167 unsigned force:1;
168
Miklos Szeredif9a28422006-06-25 05:48:53 -0700169 /** The request was aborted */
170 unsigned aborted:1;
Miklos Szeredi334f4852005-09-09 13:10:27 -0700171
172 /** Request is sent in the background */
173 unsigned background:1;
174
Miklos Szeredia4d27e72006-06-25 05:48:54 -0700175 /** The request has been interrupted */
176 unsigned interrupted:1;
177
Miklos Szeredi334f4852005-09-09 13:10:27 -0700178 /** Data is being copied to/from the request */
179 unsigned locked:1;
180
Miklos Szeredi9bc5ddd2006-04-11 21:16:09 +0200181 /** Request is counted as "waiting" */
182 unsigned waiting:1;
183
Miklos Szeredi83cfd492006-01-16 22:14:31 -0800184 /** State of the request */
185 enum fuse_req_state state;
Miklos Szeredi334f4852005-09-09 13:10:27 -0700186
187 /** The request input */
188 struct fuse_in in;
189
190 /** The request output */
191 struct fuse_out out;
192
193 /** Used to wake up the task waiting for completion of request*/
194 wait_queue_head_t waitq;
195
196 /** Data for asynchronous requests */
197 union {
Miklos Szeredie5e55582005-09-09 13:10:28 -0700198 struct fuse_forget_in forget_in;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700199 struct fuse_release_in release_in;
Miklos Szeredi3ec870d2006-01-06 00:19:41 -0800200 struct fuse_init_in init_in;
201 struct fuse_init_out init_out;
Miklos Szeredi361b1eb52006-01-16 22:14:45 -0800202 struct fuse_read_in read_in;
Miklos Szeredi71421252006-06-25 05:48:52 -0700203 struct fuse_lk_in lk_in;
Miklos Szeredi334f4852005-09-09 13:10:27 -0700204 } misc;
205
206 /** page vector */
207 struct page *pages[FUSE_MAX_PAGES_PER_REQ];
208
209 /** number of pages in vector */
210 unsigned num_pages;
211
212 /** offset of data on first page */
213 unsigned page_offset;
214
Miklos Szeredi334f4852005-09-09 13:10:27 -0700215 /** File used in the request (or NULL) */
216 struct file *file;
Miklos Szeredi64c6d8e2006-01-16 22:14:42 -0800217
Miklos Szeredi51eb01e2006-06-25 05:48:50 -0700218 /** vfsmount used in release */
219 struct vfsmount *vfsmount;
220
221 /** dentry used in release */
222 struct dentry *dentry;
223
Miklos Szeredi64c6d8e2006-01-16 22:14:42 -0800224 /** Request completion callback */
225 void (*end)(struct fuse_conn *, struct fuse_req *);
Miklos Szeredi33649c92006-06-25 05:48:52 -0700226
227 /** Request is stolen from fuse_file->reserved_req */
228 struct file *stolen_file;
Miklos Szeredi334f4852005-09-09 13:10:27 -0700229};
230
Miklos Szeredid8a5ba42005-09-09 13:10:26 -0700231/**
232 * A Fuse connection.
233 *
234 * This structure is created, when the filesystem is mounted, and is
235 * destroyed, when the client device is closed and the filesystem is
236 * unmounted.
237 */
238struct fuse_conn {
Miklos Szeredid7133112006-04-10 22:54:55 -0700239 /** Lock protecting accessess to members of this structure */
240 spinlock_t lock;
241
Miklos Szeredid2a85162006-10-17 00:10:11 -0700242 /** Mutex protecting against directory alias creation */
243 struct mutex inst_mutex;
244
Miklos Szeredibafa9652006-06-25 05:48:51 -0700245 /** Refcount */
246 atomic_t count;
247
Miklos Szeredid8a5ba42005-09-09 13:10:26 -0700248 /** The user id for this mount */
249 uid_t user_id;
250
Miklos Szeredi87729a52005-09-09 13:10:34 -0700251 /** The group id for this mount */
252 gid_t group_id;
253
Miklos Szeredi1e9a4ed2005-09-09 13:10:31 -0700254 /** The fuse mount flags for this mount */
255 unsigned flags;
256
Miklos Szeredidb50b962005-09-09 13:10:33 -0700257 /** Maximum read size */
258 unsigned max_read;
259
Miklos Szeredi413ef8c2005-09-09 13:10:35 -0700260 /** Maximum write size */
261 unsigned max_write;
262
Miklos Szeredi334f4852005-09-09 13:10:27 -0700263 /** Readers of the connection are waiting on this */
264 wait_queue_head_t waitq;
265
266 /** The list of pending requests */
267 struct list_head pending;
268
269 /** The list of requests being processed */
270 struct list_head processing;
271
Miklos Szeredid77a1d52006-01-16 22:14:31 -0800272 /** The list of requests under I/O */
273 struct list_head io;
274
Miklos Szeredi08a53cd2006-04-10 22:54:59 -0700275 /** Number of requests currently in the background */
276 unsigned num_background;
277
Miklos Szeredia4d27e72006-06-25 05:48:54 -0700278 /** Pending interrupts */
279 struct list_head interrupts;
280
Miklos Szeredi08a53cd2006-04-10 22:54:59 -0700281 /** Flag indicating if connection is blocked. This will be
282 the case before the INIT reply is received, and if there
283 are too many outstading backgrounds requests */
284 int blocked;
285
286 /** waitq for blocked connection */
287 wait_queue_head_t blocked_waitq;
288
Miklos Szeredi334f4852005-09-09 13:10:27 -0700289 /** The next unique request id */
290 u64 reqctr;
291
Miklos Szeredi69a53bf2006-01-16 22:14:41 -0800292 /** Connection established, cleared on umount, connection
293 abort and device release */
Miklos Szeredi095da6c2006-01-16 22:14:52 -0800294 unsigned connected;
Miklos Szeredi1e9a4ed2005-09-09 13:10:31 -0700295
Miklos Szeredi095da6c2006-01-16 22:14:52 -0800296 /** Connection failed (version mismatch). Cannot race with
297 setting other bitfields since it is only set once in INIT
298 reply, before any other request, and never cleared */
Miklos Szeredi334f4852005-09-09 13:10:27 -0700299 unsigned conn_error : 1;
300
Miklos Szeredi0ec7ca42006-12-06 20:35:52 -0800301 /** Connection successful. Only set in INIT */
302 unsigned conn_init : 1;
303
Miklos Szeredi9cd68452006-02-01 03:04:40 -0800304 /** Do readpages asynchronously? Only set in INIT */
305 unsigned async_read : 1;
306
Miklos Szeredi095da6c2006-01-16 22:14:52 -0800307 /*
308 * The following bitfields are only for optimization purposes
309 * and hence races in setting them will not cause malfunction
310 */
311
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700312 /** Is fsync not implemented by fs? */
313 unsigned no_fsync : 1;
314
Miklos Szeredi82547982005-09-09 13:10:38 -0700315 /** Is fsyncdir not implemented by fs? */
316 unsigned no_fsyncdir : 1;
317
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700318 /** Is flush not implemented by fs? */
319 unsigned no_flush : 1;
320
Miklos Szeredi92a87802005-09-09 13:10:31 -0700321 /** Is setxattr not implemented by fs? */
322 unsigned no_setxattr : 1;
323
324 /** Is getxattr not implemented by fs? */
325 unsigned no_getxattr : 1;
326
327 /** Is listxattr not implemented by fs? */
328 unsigned no_listxattr : 1;
329
330 /** Is removexattr not implemented by fs? */
331 unsigned no_removexattr : 1;
332
Miklos Szeredi71421252006-06-25 05:48:52 -0700333 /** Are file locking primitives not implemented by fs? */
334 unsigned no_lock : 1;
335
Miklos Szeredi31d40d72005-11-07 00:59:50 -0800336 /** Is access not implemented by fs? */
337 unsigned no_access : 1;
338
Miklos Szeredifd72faa2005-11-07 00:59:51 -0800339 /** Is create not implemented by fs? */
340 unsigned no_create : 1;
341
Miklos Szeredia4d27e72006-06-25 05:48:54 -0700342 /** Is interrupt not implemented by fs? */
343 unsigned no_interrupt : 1;
344
Miklos Szeredib2d22722006-12-06 20:35:51 -0800345 /** Is bmap not implemented by fs? */
346 unsigned no_bmap : 1;
347
Miklos Szeredi0cd5b882006-01-16 22:14:38 -0800348 /** The number of requests waiting for completion */
349 atomic_t num_waiting;
350
Miklos Szeredi45714d62006-01-06 00:19:36 -0800351 /** Negotiated minor version */
352 unsigned minor;
353
Miklos Szeredid8a5ba42005-09-09 13:10:26 -0700354 /** Backing dev info */
355 struct backing_dev_info bdi;
Miklos Szeredif543f252006-01-16 22:14:35 -0800356
Miklos Szeredibafa9652006-06-25 05:48:51 -0700357 /** Entry on the fuse_conn_list */
358 struct list_head entry;
359
360 /** Unique ID */
361 u64 id;
362
363 /** Dentries in the control filesystem */
364 struct dentry *ctl_dentry[FUSE_CTL_NUM_DENTRIES];
365
366 /** number of dentries used in the above array */
367 int ctl_ndents;
Jeff Dike385a17b2006-04-10 22:54:52 -0700368
369 /** O_ASYNC requests */
370 struct fasync_struct *fasync;
Miklos Szeredi9c8ef562006-06-25 05:48:55 -0700371
372 /** Key for lock owner ID scrambling */
373 u32 scramble_key[4];
Miklos Szeredi0ec7ca42006-12-06 20:35:52 -0800374
375 /** Reserved request for the DESTROY message */
376 struct fuse_req *destroy_req;
Miklos Szeredid8a5ba42005-09-09 13:10:26 -0700377};
378
Miklos Szeredid8a5ba42005-09-09 13:10:26 -0700379static inline struct fuse_conn *get_fuse_conn_super(struct super_block *sb)
380{
Miklos Szeredi6383bda2006-01-16 22:14:29 -0800381 return sb->s_fs_info;
Miklos Szeredid8a5ba42005-09-09 13:10:26 -0700382}
383
384static inline struct fuse_conn *get_fuse_conn(struct inode *inode)
385{
386 return get_fuse_conn_super(inode->i_sb);
387}
388
389static inline struct fuse_inode *get_fuse_inode(struct inode *inode)
390{
391 return container_of(inode, struct fuse_inode, inode);
392}
393
394static inline u64 get_node_id(struct inode *inode)
395{
396 return get_fuse_inode(inode)->nodeid;
397}
398
Miklos Szeredi334f4852005-09-09 13:10:27 -0700399/** Device operations */
Arjan van de Ven4b6f5d22006-03-28 01:56:42 -0800400extern const struct file_operations fuse_dev_operations;
Miklos Szeredi334f4852005-09-09 13:10:27 -0700401
Miklos Szeredid8a5ba42005-09-09 13:10:26 -0700402/**
Miklos Szeredie5e55582005-09-09 13:10:28 -0700403 * Get a filled in inode
404 */
405struct inode *fuse_iget(struct super_block *sb, unsigned long nodeid,
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700406 int generation, struct fuse_attr *attr);
Miklos Szeredie5e55582005-09-09 13:10:28 -0700407
408/**
409 * Send FORGET command
410 */
411void fuse_send_forget(struct fuse_conn *fc, struct fuse_req *req,
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700412 unsigned long nodeid, u64 nlookup);
Miklos Szeredie5e55582005-09-09 13:10:28 -0700413
414/**
Miklos Szeredi361b1eb52006-01-16 22:14:45 -0800415 * Initialize READ or READDIR request
Miklos Szeredi04730fe2005-09-09 13:10:36 -0700416 */
Miklos Szeredi361b1eb52006-01-16 22:14:45 -0800417void fuse_read_fill(struct fuse_req *req, struct file *file,
418 struct inode *inode, loff_t pos, size_t count, int opcode);
Miklos Szeredi04730fe2005-09-09 13:10:36 -0700419
420/**
421 * Send OPEN or OPENDIR request
422 */
423int fuse_open_common(struct inode *inode, struct file *file, int isdir);
424
Miklos Szeredifd72faa2005-11-07 00:59:51 -0800425struct fuse_file *fuse_file_alloc(void);
426void fuse_file_free(struct fuse_file *ff);
427void fuse_finish_open(struct inode *inode, struct file *file,
428 struct fuse_file *ff, struct fuse_open_out *outarg);
429
Miklos Szeredi51eb01e2006-06-25 05:48:50 -0700430/** */
431struct fuse_req *fuse_release_fill(struct fuse_file *ff, u64 nodeid, int flags,
432 int opcode);
Miklos Szeredi04730fe2005-09-09 13:10:36 -0700433/**
434 * Send RELEASE or RELEASEDIR request
435 */
436int fuse_release_common(struct inode *inode, struct file *file, int isdir);
437
438/**
Miklos Szeredi82547982005-09-09 13:10:38 -0700439 * Send FSYNC or FSYNCDIR request
440 */
441int fuse_fsync_common(struct file *file, struct dentry *de, int datasync,
442 int isdir);
443
444/**
Miklos Szeredi17793812005-10-30 15:02:51 -0800445 * Initialize file operations on a regular file
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700446 */
447void fuse_init_file_inode(struct inode *inode);
448
449/**
Miklos Szeredi17793812005-10-30 15:02:51 -0800450 * Initialize inode operations on regular files and special files
Miklos Szeredie5e55582005-09-09 13:10:28 -0700451 */
452void fuse_init_common(struct inode *inode);
453
454/**
Miklos Szeredi17793812005-10-30 15:02:51 -0800455 * Initialize inode and file operations on a directory
Miklos Szeredie5e55582005-09-09 13:10:28 -0700456 */
457void fuse_init_dir(struct inode *inode);
458
459/**
Miklos Szeredi17793812005-10-30 15:02:51 -0800460 * Initialize inode operations on a symlink
Miklos Szeredie5e55582005-09-09 13:10:28 -0700461 */
462void fuse_init_symlink(struct inode *inode);
463
464/**
465 * Change attributes of an inode
466 */
467void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr);
468
469/**
Miklos Szeredi334f4852005-09-09 13:10:27 -0700470 * Initialize the client device
471 */
472int fuse_dev_init(void);
473
474/**
475 * Cleanup the client device
476 */
477void fuse_dev_cleanup(void);
478
Miklos Szeredibafa9652006-06-25 05:48:51 -0700479int fuse_ctl_init(void);
480void fuse_ctl_cleanup(void);
481
Miklos Szeredi334f4852005-09-09 13:10:27 -0700482/**
483 * Allocate a request
484 */
485struct fuse_req *fuse_request_alloc(void);
486
487/**
488 * Free a request
489 */
490void fuse_request_free(struct fuse_req *req);
491
492/**
Miklos Szeredi33649c92006-06-25 05:48:52 -0700493 * Get a request, may fail with -ENOMEM
Miklos Szeredi334f4852005-09-09 13:10:27 -0700494 */
Miklos Szeredice1d5a42006-04-10 22:54:58 -0700495struct fuse_req *fuse_get_req(struct fuse_conn *fc);
Miklos Szeredi334f4852005-09-09 13:10:27 -0700496
497/**
Miklos Szeredi33649c92006-06-25 05:48:52 -0700498 * Gets a requests for a file operation, always succeeds
499 */
500struct fuse_req *fuse_get_req_nofail(struct fuse_conn *fc, struct file *file);
501
502/**
Miklos Szeredice1d5a42006-04-10 22:54:58 -0700503 * Decrement reference count of a request. If count goes to zero free
504 * the request.
Miklos Szeredi334f4852005-09-09 13:10:27 -0700505 */
506void fuse_put_request(struct fuse_conn *fc, struct fuse_req *req);
507
508/**
Miklos Szeredi7c352bd2005-09-09 13:10:39 -0700509 * Send a request (synchronous)
Miklos Szeredi334f4852005-09-09 13:10:27 -0700510 */
511void request_send(struct fuse_conn *fc, struct fuse_req *req);
512
513/**
Miklos Szeredi334f4852005-09-09 13:10:27 -0700514 * Send a request with no reply
515 */
516void request_send_noreply(struct fuse_conn *fc, struct fuse_req *req);
517
518/**
519 * Send a request in the background
520 */
521void request_send_background(struct fuse_conn *fc, struct fuse_req *req);
522
Miklos Szeredi5a5fb1e2006-04-26 10:48:55 +0200523/* Abort all requests */
Miklos Szeredi69a53bf2006-01-16 22:14:41 -0800524void fuse_abort_conn(struct fuse_conn *fc);
525
Miklos Szeredi1e9a4ed2005-09-09 13:10:31 -0700526/**
Miklos Szeredie5e55582005-09-09 13:10:28 -0700527 * Get the attributes of a file
528 */
529int fuse_do_getattr(struct inode *inode);
530
531/**
532 * Invalidate inode attributes
533 */
534void fuse_invalidate_attr(struct inode *inode);
Miklos Szeredibafa9652006-06-25 05:48:51 -0700535
536/**
537 * Acquire reference to fuse_conn
538 */
539struct fuse_conn *fuse_conn_get(struct fuse_conn *fc);
540
541/**
542 * Release reference to fuse_conn
543 */
544void fuse_conn_put(struct fuse_conn *fc);
545
546/**
547 * Add connection to control filesystem
548 */
549int fuse_ctl_add_conn(struct fuse_conn *fc);
550
551/**
552 * Remove connection from control filesystem
553 */
554void fuse_ctl_remove_conn(struct fuse_conn *fc);
Timo Savolaa5bfffac2007-04-08 16:04:00 -0700555
556/**
557 * Is file type valid?
558 */
559int fuse_valid_type(int m);