diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-27 21:38:42 -0700 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-27 21:38:42 -0700 |
commit | e885e84f796da2433907e57358bc4916bca30a50 (patch) | |
tree | 278350db190c3f8f50933397d368cc9fbbbe74e9 /lib/mount.c | |
parent | 4fade0c616a9227e42043ac3332f0fc59a6df327 (diff) |
Add max_read to fuse_conn_info
Eventually, this setting should be negotiated in the filesystem's init()
handler (like e.g. max_write). However, this requires corresponding
changes in the FUSE kernel module. In preparation for this (and to allow
a transition period) we already allow (and require) filesystems to set
the value in the init() handler in addition to the mount option.
The end-goal is tracked in issue #91.
Diffstat (limited to 'lib/mount.c')
-rw-r--r-- | lib/mount.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/mount.c b/lib/mount.c index 051b424..bb13c30 100644 --- a/lib/mount.c +++ b/lib/mount.c @@ -73,6 +73,7 @@ struct mount_opts { char *mtab_opts; char *fusermount_opts; char *kernel_opts; + unsigned max_read; }; #define FUSE_MOUNT_OPT(t, p) { t, offsetof(struct mount_opts, p), 1 } @@ -83,6 +84,7 @@ static const struct fuse_opt fuse_mount_opts[] = { FUSE_MOUNT_OPT("blkdev", blkdev), FUSE_MOUNT_OPT("auto_unmount", auto_unmount), FUSE_MOUNT_OPT("fsname=%s", fsname), + FUSE_MOUNT_OPT("max_read=%u", max_read), FUSE_MOUNT_OPT("subtype=%s", subtype), FUSE_OPT_KEY("allow_other", KEY_KERN_OPT), FUSE_OPT_KEY("allow_root", KEY_ALLOW_ROOT), @@ -157,6 +159,11 @@ static const struct mount_flags mount_flags[] = { {NULL, 0, 0} }; +unsigned get_max_read(struct mount_opts *o) +{ + return o->max_read; +} + static void set_mount_flag(const char *s, int *flags) { int i; |