[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 016/104] virtiofsd: Open vhost connection instead of mounting
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [PATCH 016/104] virtiofsd: Open vhost connection instead of mounting |
Date: |
Tue, 21 Jan 2020 11:38:12 +0000 |
User-agent: |
Mutt/1.13.0 (2019-11-30) |
* Misono Tomohiro (address@hidden) wrote:
> > From: "Dr. David Alan Gilbert" <address@hidden>
> >
> > When run with vhost-user options we conect to the QEMU instead
> > via a socket. Start this off by creating the socket.
> >
> > Signed-off-by: Dr. David Alan Gilbert <address@hidden>
> > ---
>
> <snip>
> > + /*
> > + * Poison the fuse FD so we spot if we accidentally use it;
> > + * DO NOT check for this value, check for fuse_lowlevel_is_virtio()
> > + */
> > + se->fd = 0xdaff0d11;
> </snip>
>
> As a result of this, se->fd now holds dummy fd.
> So we should remove close(se->fd) in fuse_session_destroy():
> https://gitlab.com/virtio-fs/qemu/blob/virtio-fs-dev/tools/virtiofsd/fuse_lowlevel.c#L2663
Thanks; the easier fix here is to remove the dummy
0xdaff0d11 value and just use -1 - it was quite a useful trick when
I first did this to find places where we were accidentally using
the fd when we shouldn't, but it's not really needed now we got it
going.
> Reviewed-by: Misono Tomohiro <address@hidden>
Thanks.
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK