* [Virtio-fs] [PATCH] virtio-fs: Allow shared memory region to be empty
@ 2019-06-18 20:25 Boeuf, Sebastien
2019-06-19 20:22 ` Vivek Goyal
0 siblings, 1 reply; 3+ messages in thread
From: Boeuf, Sebastien @ 2019-06-18 20:25 UTC (permalink / raw)
To: virtio-fs@redhat.com
>From 908b1c5660b919266379d68940815a5dea9ca6f4 Mon Sep 17 00:00:00 2001
From: Sebastien Boeuf <sebastien.boeuf@intel.com>
Date: Mon, 17 Jun 2019 11:11:10 -0700
Subject: [PATCH] virtio-fs: Allow shared memory region to be empty
In case the device declares an empty cache region to the driver, the
whole DAX setup should be simply skipped and the shared memory region
should never be used.
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
---
fs/fuse/virtio_fs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 3f3c018571ee..88531324fe40 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -540,8 +540,8 @@ static int virtio_fs_setup_dax(struct virtio_device
*vdev, struct virtio_fs *fs)
&cache_reg,
(u8)VIRTIO_FS_SHMCAP_ID_CACH
E);
if (!have_cache) {
- dev_err(&vdev->dev, "%s: No cache capability\n",
__func__);
- return -ENXIO;
+ dev_notice(&vdev->dev, "%s: No cache capability\n",
__func__);
+ return 0;
} else {
dev_notice(&vdev->dev, "Cache len: 0x%llx @ 0x%llx\n",
cache_reg.len, cache_reg.addr);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Virtio-fs] [PATCH] virtio-fs: Allow shared memory region to be empty
2019-06-18 20:25 [Virtio-fs] [PATCH] virtio-fs: Allow shared memory region to be empty Boeuf, Sebastien
@ 2019-06-19 20:22 ` Vivek Goyal
2019-06-19 22:12 ` Boeuf, Sebastien
0 siblings, 1 reply; 3+ messages in thread
From: Vivek Goyal @ 2019-06-19 20:22 UTC (permalink / raw)
To: Boeuf, Sebastien; +Cc: virtio-fs@redhat.com
On Tue, Jun 18, 2019 at 08:25:07PM +0000, Boeuf, Sebastien wrote:
> >From 908b1c5660b919266379d68940815a5dea9ca6f4 Mon Sep 17 00:00:00 2001
> From: Sebastien Boeuf <sebastien.boeuf@intel.com>
> Date: Mon, 17 Jun 2019 11:11:10 -0700
> Subject: [PATCH] virtio-fs: Allow shared memory region to be empty
>
> In case the device declares an empty cache region to the driver, the
> whole DAX setup should be simply skipped and the shared memory region
> should never be used.
>
> Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Hi Sebastien,
Thanks for the patch. I am currently trying to integrate shared version
patches and with those patches we probably can't reutrun immediately.
We still will have to probe for shared version table. (I think it
can be made to work even without dax).
So I will keep this in mind and integrate this patch in some form once
I am done taking care of shared version patches.
Vivek
> ---
> fs/fuse/virtio_fs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
> index 3f3c018571ee..88531324fe40 100644
> --- a/fs/fuse/virtio_fs.c
> +++ b/fs/fuse/virtio_fs.c
> @@ -540,8 +540,8 @@ static int virtio_fs_setup_dax(struct virtio_device
> *vdev, struct virtio_fs *fs)
> &cache_reg,
> (u8)VIRTIO_FS_SHMCAP_ID_CACH
> E);
> if (!have_cache) {
> - dev_err(&vdev->dev, "%s: No cache capability\n",
> __func__);
> - return -ENXIO;
> + dev_notice(&vdev->dev, "%s: No cache capability\n",
> __func__);
> + return 0;
> } else {
> dev_notice(&vdev->dev, "Cache len: 0x%llx @ 0x%llx\n",
> cache_reg.len, cache_reg.addr);
> --
> 2.17.1
>
> _______________________________________________
> Virtio-fs mailing list
> Virtio-fs@redhat.com
> https://www.redhat.com/mailman/listinfo/virtio-fs
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Virtio-fs] [PATCH] virtio-fs: Allow shared memory region to be empty
2019-06-19 20:22 ` Vivek Goyal
@ 2019-06-19 22:12 ` Boeuf, Sebastien
0 siblings, 0 replies; 3+ messages in thread
From: Boeuf, Sebastien @ 2019-06-19 22:12 UTC (permalink / raw)
To: vgoyal@redhat.com; +Cc: virtio-fs@redhat.com
Hi Vivek,
On Wed, 2019-06-19 at 16:22 -0400, Vivek Goyal wrote:
> On Tue, Jun 18, 2019 at 08:25:07PM +0000, Boeuf, Sebastien wrote:
> > > From 908b1c5660b919266379d68940815a5dea9ca6f4 Mon Sep 17 00:00:00
> > > 2001
> >
> > From: Sebastien Boeuf <sebastien.boeuf@intel.com>
> > Date: Mon, 17 Jun 2019 11:11:10 -0700
> > Subject: [PATCH] virtio-fs: Allow shared memory region to be empty
> >
> > In case the device declares an empty cache region to the driver,
> > the
> > whole DAX setup should be simply skipped and the shared memory
> > region
> > should never be used.
> >
> > Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
>
> Hi Sebastien,
>
> Thanks for the patch. I am currently trying to integrate shared
> version
> patches and with those patches we probably can't reutrun immediately.
> We still will have to probe for shared version table. (I think it
> can be made to work even without dax).
>
> So I will keep this in mind and integrate this patch in some form
> once
> I am done taking care of shared version patches.
Oh that sounds great. I'll keep it for now in my local tree, but let me
know once you figured out how to include the same idea into the main
branch.
Thanks,
Sebastien
>
> Vivek
>
> > ---
> > fs/fuse/virtio_fs.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
> > index 3f3c018571ee..88531324fe40 100644
> > --- a/fs/fuse/virtio_fs.c
> > +++ b/fs/fuse/virtio_fs.c
> > @@ -540,8 +540,8 @@ static int virtio_fs_setup_dax(struct
> > virtio_device
> > *vdev, struct virtio_fs *fs)
> > &cache_reg,
> > (u8)VIRTIO_FS_SHMCAP_ID_CACH
> > E);
> > if (!have_cache) {
> > - dev_err(&vdev->dev, "%s: No cache capability\n",
> > __func__);
> > - return -ENXIO;
> > + dev_notice(&vdev->dev, "%s: No cache capability\n",
> > __func__);
> > + return 0;
> > } else {
> > dev_notice(&vdev->dev, "Cache len: 0x%llx @ 0x%llx\n",
> > cache_reg.len, cache_reg.addr);
> > --
> > 2.17.1
> >
> > _______________________________________________
> > Virtio-fs mailing list
> > Virtio-fs@redhat.com
> > https://www.redhat.com/mailman/listinfo/virtio-fs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-19 22:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-18 20:25 [Virtio-fs] [PATCH] virtio-fs: Allow shared memory region to be empty Boeuf, Sebastien
2019-06-19 20:22 ` Vivek Goyal
2019-06-19 22:12 ` Boeuf, Sebastien
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.