[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 028/104] virtiofsd: make -f (foreground) the default
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH 028/104] virtiofsd: make -f (foreground) the default |
Date: |
Mon, 6 Jan 2020 14:19:00 +0000 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
On Thu, Dec 12, 2019 at 04:37:48PM +0000, Dr. David Alan Gilbert (git) wrote:
> From: Stefan Hajnoczi <address@hidden>
>
> According to vhost-user.rst "Backend program conventions", backend
> programs should run in the foregound by default. Follow the
> conventions so libvirt and other management tools can control virtiofsd
> in a standard way.
>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
> tools/virtiofsd/helper.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
Reviewed-by: Daniel P. Berrangé <address@hidden>
>
> diff --git a/tools/virtiofsd/helper.c b/tools/virtiofsd/helper.c
> index 48e38a7963..d4fff4fa53 100644
> --- a/tools/virtiofsd/helper.c
> +++ b/tools/virtiofsd/helper.c
> @@ -28,6 +28,11 @@
> { \
> t, offsetof(struct fuse_cmdline_opts, p), 1 \
> }
> +#define FUSE_HELPER_OPT_VALUE(t, p, v) \
> + { \
> + t, offsetof(struct fuse_cmdline_opts, p), v \
> + }
> +
>
> static const struct fuse_opt fuse_helper_opts[] = {
> FUSE_HELPER_OPT("-h", show_help),
> @@ -41,6 +46,7 @@ static const struct fuse_opt fuse_helper_opts[] = {
> FUSE_OPT_KEY("-d", FUSE_OPT_KEY_KEEP),
> 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),
> @@ -132,6 +138,7 @@ void fuse_cmdline_help(void)
> " -V --version print version\n"
> " -d -o debug enable debug output (implies
> -f)\n"
> " -f foreground operation\n"
> + " --daemonize run in background\n"
Wonder if there is sense in documenting '--daemonize' as a standard
for backend programs, even if QEMU/libvirt don't need it.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 028/104] virtiofsd: make -f (foreground) the default,
Daniel P . Berrangé <=