[Virtio-fs] [PATCH] Fix file descriptor passed for setupmapping
Vivek Goyal
vgoyal at redhat.com
Mon May 18 12:37:37 UTC 2020
On Fri, May 15, 2020 at 04:50:31PM +0000, Fotis Xenakis wrote:
> From: Liu Bo <bo.liu at linux.alibaba.com>
> Sent: Friday, May 15, 2020 06:48
> To: Fotis Xenakis <foxen at windowslive.com>
> Cc: virtio-fs at redhat.com <virtio-fs at redhat.com>
> Subject: Re: [Virtio-fs] [PATCH] Fix file descriptor passed for setupmapping
>
> On Wed, May 13, 2020 at 07:33:56PM +0300, Fotis Xenakis wrote:
> > Currently, during FUSE_SETUPMAPPING, virtiofsd passes the wrong file
> > descriptor for the file to mmap() to QEMU (specifically, it passes the
> > file handle as requested from the guest).
> >
> > This fixes it, using lo_fi_fd() to map the file handle to the right file
> > descriptor on the host.
> >
>
> Looks good, guest has been setting fi as NULL though.
> As far as I can see, this function is only called from [1], which passes fi as NULL only when the file handle passed from the guest is (uint64_t)-1. In my testing this was never the case though.
Hi Fotis,
Do you know what's different about your setup. This has been working for
me so clearly I am seeing fi as NULL.
Vivek
More information about the Virtio-fs
mailing list