qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 109/109] virtiofsd: add some options to the help message


From: Dr. David Alan Gilbert
Subject: Re: [PATCH v2 109/109] virtiofsd: add some options to the help message
Date: Wed, 22 Jan 2020 18:11:14 +0000
User-agent: Mutt/1.13.0 (2019-11-30)

* Misono Tomohiro (address@hidden) wrote:
> > From: Masayoshi Mizuma <address@hidden>
> > 
> > Add following options to the help message:
> > - cache
> > - flock|no_flock
> > - norace
> > - posix_lock|no_posix_lock
> > - readdirplus|no_readdirplus
> > - timeout
> > - writeback|no_writeback
> > - xattr|no_xattr
> > 
> > Signed-off-by: Masayoshi Mizuma <address@hidden>
> > 
> > dgilbert: Split cache, norace, posix_lock, readdirplus off
> >   into our own earlier patches that added the options
> > 
> > Reviewed-by: Dr. David Alan Gilbert <address@hidden><Paste>
> 
> Hello,
> 
> I think we also need to remove unused options from help message as well.
> Could you please review following patch and add or fold to this patch
> if it is ok.
> 
> Thanks,
> Misono

Thanks, I've merged that into the 'Trim down imported files'

> =====
> [PATCH] virtiofsd: Remove unused options
> 
> Following options came from libfuse but not used in virtiofs:
>  - allow_other (always set to 1 in guest kernel)
>  - auto_unmount
>  - -s (singlethread)
> 
> Let's remove unused options from help in order not to confuse users.
> 
> Signed-off-by: Misono Tomohiro <address@hidden>
> ---
>  tools/virtiofsd/fuse_lowlevel.c | 12 +++---------
>  tools/virtiofsd/fuse_lowlevel.h |  1 -
>  tools/virtiofsd/helper.c        |  2 --
>  3 files changed, 3 insertions(+), 12 deletions(-)
> 
> diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowlevel.c
> index 2ce3e739fd..00554c6aa7 100644
> --- a/tools/virtiofsd/fuse_lowlevel.c
> +++ b/tools/virtiofsd/fuse_lowlevel.c
> @@ -2539,11 +2539,9 @@ void fuse_lowlevel_help(void)
>       * potentially of interest to an end-user
>       */
>      printf(
> -        "    -o allow_other             allow access by all users\n"
>          "    -o allow_root              allow access by root\n"
>          "    --socket-path=PATH         path for the vhost-user socket\n"
>          "    --fd=FDNUM                 fd number of vhost-user socket\n"
> -        "    -o auto_unmount            auto unmount on process 
> termination\n"
>          "    --thread-pool-size=NUM     thread pool size limit (default 
> %d)\n",
>          THREAD_POOL_SIZE);
>  }
> @@ -2612,14 +2610,10 @@ struct fuse_session *fuse_session_new(struct 
> fuse_args *args,
>           * Allowing access only by root is done by instructing
>           * kernel to allow access by everyone, and then restricting
>           * access to root and mountpoint owner in libfuse.
> +         *
> +         * Note: allow_other is set to 1 in guest kernel for virtiofs
> +         * so nothing needs to be done here
>           */
> -        /*
> -         * We may be adding the option a second time, but
> -         * that doesn't hurt.
> -         */
> -        if (fuse_opt_add_arg(args, "-oallow_other") == -1) {
> -            goto out2;
> -        }
>      }

I took out the surrounding 'if' as well because there was nothing left
except for the comment.

Dave

>      if (args->argc == 1 && args->argv[0][0] == '-') {
>          fuse_log(FUSE_LOG_ERR,
> diff --git a/tools/virtiofsd/fuse_lowlevel.h b/tools/virtiofsd/fuse_lowlevel.h
> index 3a7213f42f..aa5f62c846 100644
> --- a/tools/virtiofsd/fuse_lowlevel.h
> +++ b/tools/virtiofsd/fuse_lowlevel.h
> @@ -1820,7 +1820,6 @@ void fuse_cmdline_help(void);
>   */
>  
>  struct fuse_cmdline_opts {
> -    int singlethread;
>      int foreground;
>      int debug;
>      int nodefault_subtype;
> diff --git a/tools/virtiofsd/helper.c b/tools/virtiofsd/helper.c
> index 8f00737b1a..9dd4199800 100644
> --- a/tools/virtiofsd/helper.c
> +++ b/tools/virtiofsd/helper.c
> @@ -47,7 +47,6 @@ static const struct fuse_opt fuse_helper_opts[] = {
>      FUSE_OPT_KEY("debug", FUSE_OPT_KEY_KEEP),
>      FUSE_HELPER_OPT("-f", foreground),
>      FUSE_HELPER_OPT_VALUE("--daemonize", foreground, 0),
> -    FUSE_HELPER_OPT("-s", singlethread),
>      FUSE_HELPER_OPT("fsname=", nodefault_subtype),
>      FUSE_OPT_KEY("fsname=", FUSE_OPT_KEY_KEEP),
>      FUSE_HELPER_OPT("subtype=", nodefault_subtype),
> @@ -145,7 +144,6 @@ void fuse_cmdline_help(void)
>             "    --syslog                   log to syslog (default stderr)\n"
>             "    -f                         foreground operation\n"
>             "    --daemonize                run in background\n"
> -           "    -s                         disable multi-threaded 
> operation\n"
>             "    -o cache=<mode>            cache mode. could be one of 
> \"auto, "
>             "always, none\"\n"
>             "                               default: auto\n"
> -- 
> 2.21.1
> 
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]