diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2015-07-01 16:26:08 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2015-07-01 16:26:08 +0200 |
commit | cc080e9e9be16ccf26135d366d7d2b65209f1d56 (patch) | |
tree | 7983dc5634462fb3ee0306827a1dd68f137cc316 /fs/fuse/fuse_i.h | |
parent | 00c570f4ba43ae73b41fa0a2269c3b0ac20386ef (diff) |
fuse: introduce per-instance fuse_dev structure
Allow fuse device clones to refer to be distinguished. This patch just
adds the infrastructure by associating a separate "struct fuse_dev" with
each clone.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Reviewed-by: Ashish Samant <ashish.samant@oracle.com>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r-- | fs/fuse/fuse_i.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index a9507fd97d5e..42d59cbd47e7 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -418,6 +418,17 @@ struct fuse_pqueue { }; /** + * Fuse device instance + */ +struct fuse_dev { + /** Fuse connection for this device */ + struct fuse_conn *fc; + + /** list entry on fc->devices */ + struct list_head entry; +}; + +/** * A Fuse connection. * * This structure is created, when the filesystem is mounted, and is @@ -629,6 +640,9 @@ struct fuse_conn { /** Read/write semaphore to hold when accessing sb. */ struct rw_semaphore killsb; + + /** List of device instances belonging to this connection */ + struct list_head devices; }; static inline struct fuse_conn *get_fuse_conn_super(struct super_block *sb) @@ -841,6 +855,9 @@ void fuse_conn_init(struct fuse_conn *fc); */ void fuse_conn_put(struct fuse_conn *fc); +struct fuse_dev *fuse_dev_alloc(struct fuse_conn *fc); +void fuse_dev_free(struct fuse_dev *fud); + /** * Add connection to control filesystem */ |