diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2018-06-13 12:23:04 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2019-09-12 15:59:40 +0300 |
commit | 0cc2656cdb0b1f234e6d29378cb061e29d7522bc (patch) | |
tree | 131a397c92997fcfac727b37f1237b31b68c3f55 /fs/fuse/fuse_i.h | |
parent | 4388c5aac4bae5c83a2c66882043942002ba09a2 (diff) | |
download | linux-0cc2656cdb0b1f234e6d29378cb061e29d7522bc.tar.xz |
fuse: extract fuse_fill_super_common()
fuse_fill_super() includes code to process the fd= option and link the
struct fuse_dev to the fd's struct file. In virtio-fs there is no file
descriptor because /dev/fuse is not used.
This patch extracts fuse_fill_super_common() so that both classic fuse and
virtio-fs can share the code to initialize a mount.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r-- | fs/fuse/fuse_i.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 5f910c99e8dd..1902148281cc 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -416,6 +416,26 @@ struct fuse_dev { struct list_head entry; }; +struct fuse_fs_context { + int fd; + unsigned int rootmode; + kuid_t user_id; + kgid_t group_id; + bool is_bdev:1; + bool fd_present:1; + bool rootmode_present:1; + bool user_id_present:1; + bool group_id_present:1; + bool default_permissions:1; + bool allow_other:1; + unsigned int max_read; + unsigned int blksize; + const char *subtype; + + /* fuse_dev pointer to fill in, should contain NULL on entry */ + void **fudptr; +}; + /** * A Fuse connection. * @@ -874,6 +894,13 @@ void fuse_dev_free(struct fuse_dev *fud); void fuse_send_init(struct fuse_conn *fc); /** + * Fill in superblock and initialize fuse connection + * @sb: partially-initialized superblock to fill in + * @ctx: mount context + */ +int fuse_fill_super_common(struct super_block *sb, struct fuse_fs_context *ctx); + +/** * Add connection to control filesystem */ int fuse_ctl_add_conn(struct fuse_conn *fc); |