qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 081/104] virtiofsd: Prevent multiply running with same vhost_


From: Daniel P . Berrangé
Subject: Re: [PATCH 081/104] virtiofsd: Prevent multiply running with same vhost_user_socket
Date: Tue, 7 Jan 2020 11:43:57 +0000
User-agent: Mutt/1.12.1 (2019-06-15)

On Thu, Dec 12, 2019 at 04:38:41PM +0000, Dr. David Alan Gilbert (git) wrote:
> From: Masayoshi Mizuma <address@hidden>
> 
> virtiofsd can run multiply even if the vhost_user_socket is same path.
> 
>   ]# ./virtiofsd -o vhost_user_socket=/tmp/vhostqemu -o source=/tmp/share &
>   [1] 244965
>   virtio_session_mount: Waiting for vhost-user socket connection...
>   ]# ./virtiofsd -o vhost_user_socket=/tmp/vhostqemu -o source=/tmp/share &
>   [2] 244966
>   virtio_session_mount: Waiting for vhost-user socket connection...
>   ]#
> 
> The user will get confused about the situation and maybe the cause of the
> unexpected problem. So it's better to prevent the multiple running.
> 
> Create a regular file under localstatedir directory to exclude the
> vhost_user_socket. To create and lock the file, use qemu_write_pidfile()
> because the API has some sanity checks and file lock.
> 
> Signed-off-by: Masayoshi Mizuma <address@hidden>
> Signed-off-by: Dr. David Alan Gilbert <address@hidden>
>   Applied fixes from Stefan's review and moved osdep include
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
>  tools/virtiofsd/fuse_lowlevel.c |  1 +
>  tools/virtiofsd/fuse_virtio.c   | 49 ++++++++++++++++++++++++++++++++-
>  2 files changed, 49 insertions(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <address@hidden>


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 :|




reply via email to

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