提交 d1875dba 编写于 作者: M Miklos Szeredi 提交者: Linus Torvalds

mount options: fix fuse

Add blksize= option to /proc/mounts for fuseblk filesystems.
Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 c1fca3b6
...@@ -29,6 +29,8 @@ DEFINE_MUTEX(fuse_mutex); ...@@ -29,6 +29,8 @@ DEFINE_MUTEX(fuse_mutex);
#define FUSE_SUPER_MAGIC 0x65735546 #define FUSE_SUPER_MAGIC 0x65735546
#define FUSE_DEFAULT_BLKSIZE 512
struct fuse_mount_data { struct fuse_mount_data {
int fd; int fd;
unsigned rootmode; unsigned rootmode;
...@@ -355,7 +357,7 @@ static int parse_fuse_opt(char *opt, struct fuse_mount_data *d, int is_bdev) ...@@ -355,7 +357,7 @@ static int parse_fuse_opt(char *opt, struct fuse_mount_data *d, int is_bdev)
char *p; char *p;
memset(d, 0, sizeof(struct fuse_mount_data)); memset(d, 0, sizeof(struct fuse_mount_data));
d->max_read = ~0; d->max_read = ~0;
d->blksize = 512; d->blksize = FUSE_DEFAULT_BLKSIZE;
while ((p = strsep(&opt, ",")) != NULL) { while ((p = strsep(&opt, ",")) != NULL) {
int token; int token;
...@@ -440,6 +442,9 @@ static int fuse_show_options(struct seq_file *m, struct vfsmount *mnt) ...@@ -440,6 +442,9 @@ static int fuse_show_options(struct seq_file *m, struct vfsmount *mnt)
seq_puts(m, ",allow_other"); seq_puts(m, ",allow_other");
if (fc->max_read != ~0) if (fc->max_read != ~0)
seq_printf(m, ",max_read=%u", fc->max_read); seq_printf(m, ",max_read=%u", fc->max_read);
if (mnt->mnt_sb->s_bdev &&
mnt->mnt_sb->s_blocksize != FUSE_DEFAULT_BLKSIZE)
seq_printf(m, ",blksize=%lu", mnt->mnt_sb->s_blocksize);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册