Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

virtiofs: get rid of no_mount_options

This option was introduced so that for virtio_fs we don't show any mounts
options fuse_show_options(). Because we don't offer any of these options
to be controlled by mounter.

Very soon we are planning to introduce option "dax" which mounter should
be able to specify. And no_mount_options does not work anymore.


Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>

authored by

Vivek Goyal and committed by
Miklos Szeredi
f4fd4ae3 b43b7e81

+20 -19
+4 -4
fs/fuse/fuse_i.h
··· 482 482 bool destroy:1; 483 483 bool no_control:1; 484 484 bool no_force_umount:1; 485 - bool no_mount_options:1; 485 + bool legacy_opts_show:1; 486 486 unsigned int max_read; 487 487 unsigned int blksize; 488 488 const char *subtype; ··· 610 610 /** cache READLINK responses in page cache */ 611 611 unsigned cache_symlinks:1; 612 612 613 + /* show legacy mount options */ 614 + unsigned int legacy_opts_show:1; 615 + 613 616 /* 614 617 * The following bitfields are only for optimization purposes 615 618 * and hence races in setting them will not cause malfunction ··· 719 716 720 717 /** Do not allow MNT_FORCE umount */ 721 718 unsigned int no_force_umount:1; 722 - 723 - /* Do not show mount options */ 724 - unsigned int no_mount_options:1; 725 719 726 720 /** The number of requests waiting for completion */ 727 721 atomic_t num_waiting;
+16 -14
fs/fuse/inode.c
··· 573 573 struct super_block *sb = root->d_sb; 574 574 struct fuse_conn *fc = get_fuse_conn_super(sb); 575 575 576 - if (fc->no_mount_options) 577 - return 0; 578 - 579 - seq_printf(m, ",user_id=%u", from_kuid_munged(fc->user_ns, fc->user_id)); 580 - seq_printf(m, ",group_id=%u", from_kgid_munged(fc->user_ns, fc->group_id)); 581 - if (fc->default_permissions) 582 - seq_puts(m, ",default_permissions"); 583 - if (fc->allow_other) 584 - seq_puts(m, ",allow_other"); 585 - if (fc->max_read != ~0) 586 - seq_printf(m, ",max_read=%u", fc->max_read); 587 - if (sb->s_bdev && sb->s_blocksize != FUSE_DEFAULT_BLKSIZE) 588 - seq_printf(m, ",blksize=%lu", sb->s_blocksize); 576 + if (fc->legacy_opts_show) { 577 + seq_printf(m, ",user_id=%u", 578 + from_kuid_munged(fc->user_ns, fc->user_id)); 579 + seq_printf(m, ",group_id=%u", 580 + from_kgid_munged(fc->user_ns, fc->group_id)); 581 + if (fc->default_permissions) 582 + seq_puts(m, ",default_permissions"); 583 + if (fc->allow_other) 584 + seq_puts(m, ",allow_other"); 585 + if (fc->max_read != ~0) 586 + seq_printf(m, ",max_read=%u", fc->max_read); 587 + if (sb->s_bdev && sb->s_blocksize != FUSE_DEFAULT_BLKSIZE) 588 + seq_printf(m, ",blksize=%lu", sb->s_blocksize); 589 + } 589 590 return 0; 590 591 } 591 592 ··· 1197 1196 fc->allow_other = ctx->allow_other; 1198 1197 fc->user_id = ctx->user_id; 1199 1198 fc->group_id = ctx->group_id; 1199 + fc->legacy_opts_show = ctx->legacy_opts_show; 1200 1200 fc->max_read = max_t(unsigned, 4096, ctx->max_read); 1201 1201 fc->destroy = ctx->destroy; 1202 1202 fc->no_control = ctx->no_control; 1203 1203 fc->no_force_umount = ctx->no_force_umount; 1204 - fc->no_mount_options = ctx->no_mount_options; 1205 1204 1206 1205 err = -ENOMEM; 1207 1206 root = fuse_get_root_inode(sb, ctx->rootmode); ··· 1326 1325 1327 1326 ctx->max_read = ~0; 1328 1327 ctx->blksize = FUSE_DEFAULT_BLKSIZE; 1328 + ctx->legacy_opts_show = true; 1329 1329 1330 1330 #ifdef CONFIG_BLOCK 1331 1331 if (fc->fs_type == &fuseblk_fs_type) {
-1
fs/fuse/virtio_fs.c
··· 1096 1096 .destroy = true, 1097 1097 .no_control = true, 1098 1098 .no_force_umount = true, 1099 - .no_mount_options = true, 1100 1099 }; 1101 1100 1102 1101 mutex_lock(&virtio_fs_mutex);