virtio-fs: Allow shared memory region to be empty
Subsystems (2)
PATCH 1/1 virtio-fs: Allow shared memory region to be empty
Quoted 1 line
From
908b1c5660b919266379d68940815a5dea9ca6f4Mon Sep 17 00:00:00 2001
From: Sebastien Boeuf <[email protected]>
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.
--- fs/fuse/virtio_fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/fuse/virtio_fs.c +0 -0
@@ -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);
Signature · 1 line
2.17.1
Vivek Goyal
maintainerQuoted 10 lines · Sebastien
Quoted 1 line
From
908b1c5660b919266379d68940815a5dea9ca6f4Mon Sep 17 00:00:00 2001From: Sebastien Boeuf <[email protected]>
Date: Mon, 17 Jun 2019 11:11:10 -0700
Subject: [PATCH] virtio-fs: Allow shared memory region to be emptyIn 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 <[email protected]>
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
Quoted 30 lines
--- fs/fuse/virtio_fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)fs/fuse/virtio_fs.c +1
-2@@ -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__);fs/fuse/virtio_fs.c +1
-0+return 0 ; }else {dev_notice (&vdev->dev,"Cache len: 0x%llx @ 0x%llx\n" , cache_reg.len, cache_reg.addr);Signature · 6 lines
2.17.1 _______________________________________________ Virtio-fs mailing list [email protected] https://www.redhat.com/mailman/listinfo/virtio-fs
Hi Vivek,
Quoted 24 lines · Vivek Goyal
Quoted 7 lines · Sebastien
Quoted 2 lines
From
908b1c5660b919266379d68940815a5dea9ca6f4Mon Sep 17 00:00:00 2001From: Sebastien Boeuf <[email protected]>
Date: Mon, 17 Jun 2019 11:11:10 -0700
Subject: [PATCH] virtio-fs: Allow shared memory region to be emptyQuoted 7 lines
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 <[email protected]>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).
Quoted 3 lines
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
Quoted 34 lines
Vivek
Quoted 31 lines
--- fs/fuse/virtio_fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)fs/fuse/virtio_fs.c +0
-0@@ -540,8 +540,8 @@ static int virtio_fs_setup_dax(struct
virtio_device
*vdev, structvirtio_fs*fs)fs/fuse/virtio_fs.c +0
-0&cache_reg, (u8 )VIRTIO_FS_SHMCAP_ID_CACH E);
fs/fuse/virtio_fs.c +0
-1if (!have_cache) { - dev_err(&vdev->dev, "%s: No cache capability\n",
__func__);fs/fuse/virtio_fs.c +1
-1-return -ENXIO ; + dev_notice(&vdev->dev, "%s: No cache capability\n",
__func__);fs/fuse/virtio_fs.c +1
-0+return 0 ; }else {dev_notice (&vdev->dev,"Cache len: 0x%llx @ 0x%llx\n" , cache_reg.len, cache_reg.addr);Signature · 6 lines
2.17.1 _______________________________________________ Virtio-fs mailing list [email protected] https://www.redhat.com/mailman/listinfo/virtio-fs