https://lists.oasis-open.org/archives/virtio-dev/201908/msg00055.html
Pankaj Gupta (2):
virtio: decrement avail idx with buffer detach for packed ring
virtio_console: free unused buffers with port delete
char/virtio_console.c | 14 +++---
virtio/virtio_ring.c |6 ++
2 files
ttached with the port. Re-plug the same port tries to allocate new
buffers in virtqueue and results in this error if queue is full.
This patch reverts this commit by removing the unused buffers in vq's
when we unplug the port.
Reported-by: Xiaohui Li
Cc: sta...@vger.kernel.org
Signed-off-
etatched from the vq.
Acked-by: Jason Wang
Signed-off-by: Pankaj Gupta
---
drivers/virtio/virtio_ring.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index c8be1c4f5b55..7c69181113e2 100644
--- a/drivers/virtio/virtio_ring.c
>
> On 2019/8/9 下午2:48, Pankaj Gupta wrote:
> > This patch decrements 'next_avail_idx' count when detaching a buffer
> > from vq for packed ring code. Split ring code already does this in
> > virtqueue_detach_unused_buf_split function. This updates the
&g
>
> On Fri, Aug 09, 2019 at 12:18:46PM +0530, Pankaj Gupta wrote:
> > The commit a7a69ec0d8e4 ("virtio_console: free buffers after reset")
> > deferred detaching of unused buffer to virtio device unplug time.
> > This causes unplug/replug of single port in virt
> On Fri, Aug 09, 2019 at 12:18:47PM +0530, Pankaj Gupta wrote:
> > This patch decrements 'next_avail_idx' count when detaching a buffer
> > from vq for packed ring code. Split ring code already does this in
> > virtqueue_detach_unused_buf_split function. This upda
tive.
Reported-by: Xiaohui Li
Fixes: a7a69ec0d8e4 ("virtio_console: free buffers after reset")
Cc: sta...@vger.kernel.org
Signed-off-by: Pankaj Gupta
---
drivers/char/virtio_console.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/driv
etatched from the vq.
Signed-off-by: Pankaj Gupta
---
drivers/virtio/virtio_ring.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index c8be1c4f5b55..7c69181113e2 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virt
info/?l=qemu-devel&m=156471883703948&w=2
[2] https://lkml.org/lkml/2019/3/4/517
Pankaj Gupta (2):
virtio_console: free unused buffers with port delete
virtio: decrement avail idx with buffer detach for packed ring
char/virtio_console.c | 14 +++---
virtio/virtio_ring.c |6 ++
2
> On Thu, Aug 08, 2019 at 08:28:46AM -0400, Pankaj Gupta wrote:
> >
> >
> > > > This patch makes packed ring code compatible with split ring in
> > > > function
> > > > 'virtqueue_detach_unused_buf_*'.
> > >
> > >
> > This patch makes packed ring code compatible with split ring in function
> > 'virtqueue_detach_unused_buf_*'.
>
> What does that mean? What does this "fix"?
Patch 1 frees the buffers When a port is unplugged from the virtio
console device. It does this with the help of
'virtqueue_detach_
>
> On Thu, Aug 08, 2019 at 05:06:05PM +0530, Pankaj Gupta wrote:
> > The commit a7a69ec0d8e4 ("virtio_console: free buffers after reset")
> > deferred detaching of unused buffer to virtio device unplug time.
> >
> > This causes unplug/replug
ed
here [1].
Changes from v1[2]
-
Make virtio packed ring code compatible with split ring - [Michael]
[1] https://marc.info/?l=qemu-devel&m=156471883703948&w=2
[2] https://lkml.org/lkml/2019/3/4/517
Pankaj Gupta (2):
virtio_console: free unused buffers with port delete
virtio_ring
irtio
device is still active.
Reported-by: Xiaohui Li
Fixes: b3258ff1d6 ("virtio_console: free buffers after reset")
Signed-off-by: Pankaj Gupta
---
drivers/char/virtio_console.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/char/virtio_console
This patch makes packed ring code compatible with split ring in function
'virtqueue_detach_unused_buf_*'.
Signed-off-by: Pankaj Gupta
---
drivers/virtio/virtio_ring.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ri
[unsigned] [usertype] ret
Reported-by: kbuild test robot
Signed-off-by: Pankaj Gupta
---
This fixes a warning, so submitting it as a separate
patch on top of virtio pmem series.
v2-> v3
Use __le for req/resp fields - Michael
drivers/nvdimm/nd_virtio.c | 4 ++--
include/uapi/li
>
> On Wed, Jul 10, 2019 at 11:28:32PM +0530, Pankaj Gupta wrote:
> > This patch fixes below sparse warning related to __virtio
> > type in virtio pmem driver. This is reported by Intel test
> > bot on linux-next tree.
> >
> > nd_virtio.c:56:28: w
>
> On Wed, Jul 10, 2019 at 07:57:00PM +0530, Pankaj Gupta wrote:
> > This patch fixes below sparse warning related to __virtio
> > type in virtio pmem driver. This is reported by Intel test
> > bot on linux-next tree.
> >
> > nd_virtio.c:56:28: w
[unsigned] [usertype] ret
Reported-by: kbuild test robot
Signed-off-by: Pankaj Gupta
---
This fixes a warning, so submitting it as a separate
patch on top of virtio pmem series.
include/uapi/linux/virtio_pmem.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/uapi
nd_virtio.c:56:28:got restricted __virtio32
nd_virtio.c:93:59: warning: incorrect type in argument 2 (different base types)
nd_virtio.c:93:59:expected restricted __virtio32 [usertype] val
nd_virtio.c:93:59:got unsigned int [unsigned] [usertype] ret
Signed-off-by: Pankaj Gupta
Reported-by
Dont support 'MAP_SYNC' with non-DAX files and DAX files
with asynchronous dax_device. Virtio pmem provides
asynchronous host page cache flush mechanism. We don't
support 'MAP_SYNC' with virtio pmem and xfs.
Signed-off-by: Pankaj Gupta
Reviewed-by: Darrick J. Wong
-
Dont support 'MAP_SYNC' with non-DAX files and DAX files
with asynchronous dax_device. Virtio pmem provides
asynchronous host page cache flush mechanism. We don't
support 'MAP_SYNC' with virtio pmem and ext4.
Signed-off-by: Pankaj Gupta
Reviewed-by: Jan Kara
This patch introduces 'daxdev_mapping_supported' helper
which checks if 'MAP_SYNC' is supported with filesystem
mapping. It also checks if corresponding dax_device is
synchronous. Virtio pmem device is asynchronous and
does not not support VM_SYNC.
Suggested-by: Jan Kara
S
red to pass 'iterate_devices_fn'
as argument so that the callers can pass the appropriate functions.
Suggested-by: Mike Snitzer
Signed-off-by: Pankaj Gupta
Reviewed-by: Mike Snitzer
---
drivers/md/dm-table.c | 24 ++--
drivers/md/dm.c | 2 +-
drivers/
This patch adds 'DAXDEV_SYNC' flag which is set
for nd_region doing synchronous flush. This later
is used to disable MAP_SYNC functionality for
ext4 & xfs filesystem for devices don't support
synchronous flush.
Signed-off-by: Pankaj Gupta
---
drivers/dax/bus.c|
orms flush
on DAX memory range.
Signed-off-by: Pankaj Gupta
Reviewed-by: Yuval Shaia
Acked-by: Michael S. Tsirkin
Acked-by: Jakub Staron
Tested-by: Jakub Staron
Reviewed-by: Cornelia Huck
---
drivers/nvdimm/Makefile | 1 +
drivers/nvdimm/nd_virtio.c | 125 +
ed by host fsync
failure to userspace.
Signed-off-by: Pankaj Gupta
---
drivers/acpi/nfit/core.c | 4 ++--
drivers/nvdimm/claim.c | 6 --
drivers/nvdimm/nd.h | 1 +
drivers/nvdimm/pmem.c| 13 -
drivers/nvdimm/region_devs.c | 26 -
.h
- nvdimm_flush() return 0 or -EIO if it fails
- Teach nsio_rw_bytes() that the flush can fail
- Rename nvdimm_flush() to generic_nvdimm_flush()
- Use 'nd_region->provider_data' for long dereferencing
- Remove virtio_pmem_freeze/restore functions
- Remove BSD license text with SPDX li
Dont support 'MAP_SYNC' with non-DAX files and DAX files
with asynchronous dax_device. Virtio pmem provides
asynchronous host page cache flush mechanism. We don't
support 'MAP_SYNC' with virtio pmem and xfs.
Signed-off-by: Pankaj Gupta
Reviewed-by: Darrick J. Wong
-
Dont support 'MAP_SYNC' with non-DAX files and DAX files
with asynchronous dax_device. Virtio pmem provides
asynchronous host page cache flush mechanism. We don't
support 'MAP_SYNC' with virtio pmem and ext4.
Signed-off-by: Pankaj Gupta
Reviewed-by: Jan Kara
This patch introduces 'daxdev_mapping_supported' helper
which checks if 'MAP_SYNC' is supported with filesystem
mapping. It also checks if corresponding dax_device is
synchronous. Virtio pmem device is asynchronous and
does not not support VM_SYNC.
Suggested-by: Jan Kara
S
red to pass 'iterate_devices_fn'
as argument so that the callers can pass the appropriate functions.
Suggested-by: Mike Snitzer
Signed-off-by: Pankaj Gupta
Reviewed-by: Mike Snitzer
---
drivers/md/dm-table.c | 24 ++--
drivers/md/dm.c | 2 +-
drivers/
This patch adds 'DAXDEV_SYNC' flag which is set
for nd_region doing synchronous flush. This later
is used to disable MAP_SYNC functionality for
ext4 & xfs filesystem for devices don't support
synchronous flush.
Signed-off-by: Pankaj Gupta
---
drivers/dax/bus.c|
orms flush
on DAX memory range.
Signed-off-by: Pankaj Gupta
Reviewed-by: Yuval Shaia
Acked-by: Michael S. Tsirkin
Acked-by: Jakub Staron
Tested-by: Jakub Staron
Reviewed-by: Cornelia Huck
---
drivers/nvdimm/Makefile | 1 +
drivers/nvdimm/nd_virtio.c | 125 +
ed by host fsync
failure to userspace.
Signed-off-by: Pankaj Gupta
---
drivers/acpi/nfit/core.c | 4 ++--
drivers/nvdimm/claim.c | 6 --
drivers/nvdimm/nd.h | 1 +
drivers/nvdimm/pmem.c| 13 -
drivers/nvdimm/region_devs.c | 26 -
g nd.h
- nvdimm_flush() return 0 or -EIO if it fails
- Teach nsio_rw_bytes() that the flush can fail
- Rename nvdimm_flush() to generic_nvdimm_flush()
- Use 'nd_region->provider_data' for long dereferencing
- Remove virtio_pmem_freeze/restore functions
- Remove BSD license text with SPDX license
> > This also provides function to perform guest flush over
> > VIRTIO from 'pmem' driver when userspace performs flush
> > on DAX memory range.
> >
> > Signed-off-by: Pankaj Gupta
> > Reviewed-by: Yuval Shaia
> > Acked-by: Michael S. Tsirkin
&
Dont support 'MAP_SYNC' with non-DAX files and DAX files
with asynchronous dax_device. Virtio pmem provides
asynchronous host page cache flush mechanism. We don't
support 'MAP_SYNC' with virtio pmem and xfs.
Signed-off-by: Pankaj Gupta
Reviewed-by: Darrick J. Wong
-
Dont support 'MAP_SYNC' with non-DAX files and DAX files
with asynchronous dax_device. Virtio pmem provides
asynchronous host page cache flush mechanism. We don't
support 'MAP_SYNC' with virtio pmem and ext4.
Signed-off-by: Pankaj Gupta
Reviewed-by: Jan Kara
This patch introduces 'daxdev_mapping_supported' helper
which checks if 'MAP_SYNC' is supported with filesystem
mapping. It also checks if corresponding dax_device is
synchronous. Virtio pmem device is asynchronous and
does not not support VM_SYNC.
Suggested-by: Jan Kara
S
red to pass 'iterate_devices_fn'
as argument so that the callers can pass the appropriate functions.
Suggested-by: Mike Snitzer
Signed-off-by: Pankaj Gupta
Reviewed-by: Mike Snitzer
---
drivers/md/dm-table.c | 24 ++--
drivers/md/dm.c | 2 +-
drivers/
This patch adds 'DAXDEV_SYNC' flag which is set
for nd_region doing synchronous flush. This later
is used to disable MAP_SYNC functionality for
ext4 & xfs filesystem for devices don't support
synchronous flush.
Signed-off-by: Pankaj Gupta
---
drivers/dax/bus.c|
orms flush
on DAX memory range.
Signed-off-by: Pankaj Gupta
Reviewed-by: Yuval Shaia
Acked-by: Michael S. Tsirkin
Acked-by: Jakub Staron
Tested-by: Jakub Staron
---
drivers/nvdimm/Makefile | 1 +
drivers/nvdimm/nd_virtio.c | 125 +++
drivers/
ed by host fsync
failure to userspace.
Signed-off-by: Pankaj Gupta
---
drivers/acpi/nfit/core.c | 4 ++--
drivers/nvdimm/claim.c | 6 --
drivers/nvdimm/nd.h | 1 +
drivers/nvdimm/pmem.c| 13 -
drivers/nvdimm/region_devs.c | 26 -
m_flush function
- Use indirect call for nvdimm_flush
- Don’t move declarations to common global header e.g nd.h
- nvdimm_flush() return 0 or -EIO if it fails
- Teach nsio_rw_bytes() that the flush can fail
- Rename nvdimm_flush() to generic_nvdimm_flush()
- Use 'nd_region->provider_da
>
> Hi Pankaj,
>
> On Tue, 11 Jun 2019 23:34:50 -0400 (EDT)
> Pankaj Gupta wrote:
>
> > Hi Cornelia,
> >
> > > On Tue, 11 Jun 2019 22:07:57 +0530
> > > Pankaj Gupta wrote:
>
>
> > > > + err1 = virtqueue_kick(vpmem-
Hi Cornelia,
> On Tue, 11 Jun 2019 22:07:57 +0530
> Pankaj Gupta wrote:
>
> > This patch adds virtio-pmem driver for KVM guest.
> >
> > Guest reads the persistent memory range information from
> > Qemu over VIRTIO and registers it on nvdimm_bus. It also
&g
> On Tue, Jun 11 2019 at 12:37pm -0400,
> Pankaj Gupta wrote:
>
> > This patch sets dax device 'DAXDEV_SYNC' flag if all the target
> > devices of device mapper support synchrononous DAX. If device
> > mapper consists of both synchronous and async
Dont support 'MAP_SYNC' with non-DAX files and DAX files
with asynchronous dax_device. Virtio pmem provides
asynchronous host page cache flush mechanism. We don't
support 'MAP_SYNC' with virtio pmem and xfs.
Signed-off-by: Pankaj Gupta
Reviewed-by: Darrick J. Wong
-
Dont support 'MAP_SYNC' with non-DAX files and DAX files
with asynchronous dax_device. Virtio pmem provides
asynchronous host page cache flush mechanism. We don't
support 'MAP_SYNC' with virtio pmem and ext4.
Signed-off-by: Pankaj Gupta
Reviewed-by: Jan Kara
This patch introduces 'daxdev_mapping_supported' helper
which checks if 'MAP_SYNC' is supported with filesystem
mapping. It also checks if corresponding dax_device is
synchronous. Virtio pmem device is asynchronous and
does not not support VM_SYNC.
Suggested-by: Jan Kara
S
red to pass 'iterate_devices_fn'
as argument so that the callers can pass the appropriate functions.
Suggested-by: Mike Snitzer
Signed-off-by: Pankaj Gupta
---
drivers/md/dm-table.c | 24 ++--
drivers/md/dm.c | 2 +-
drivers/md/dm.h | 5 -
3 files ch
This patch adds 'DAXDEV_SYNC' flag which is set
for nd_region doing synchronous flush. This later
is used to disable MAP_SYNC functionality for
ext4 & xfs filesystem for devices don't support
synchronous flush.
Signed-off-by: Pankaj Gupta
---
drivers/dax/bus.c|
ed by host fsync
failure to userspace.
Signed-off-by: Pankaj Gupta
---
drivers/acpi/nfit/core.c | 4 ++--
drivers/nvdimm/claim.c | 6 --
drivers/nvdimm/nd.h | 1 +
drivers/nvdimm/pmem.c| 13 -
drivers/nvdimm/region_devs.c | 26 -
orms flush
on DAX memory range.
Signed-off-by: Pankaj Gupta
Reviewed-by: Yuval Shaia
Acked-by: Michael S. Tsirkin
Acked-by: Jakub Staron
Tested-by: Jakub Staron
---
drivers/nvdimm/Makefile | 1 +
drivers/nvdimm/nd_virtio.c | 124 +++
drivers/
n
- Use indirect call for nvdimm_flush
- Don’t move declarations to common global header e.g nd.h
- nvdimm_flush() return 0 or -EIO if it fails
- Teach nsio_rw_bytes() that the flush can fail
- Rename nvdimm_flush() to generic_nvdimm_flush()
- Use 'nd_region->provider_data' for long dereferencing
- Remo
>
> > Hi Mike,
> >
> > Thanks for the review Please find my reply inline.
> >
> > >
> > > dm_table_supports_dax() is called multiple times (from
> > > dm_table_set_restrictions and dm_table_determine_type). It is strange
> > > to have a getter have a side-effect of being a setter too. Over
Hi Mike,
Thanks for the review Please find my reply inline.
>
> dm_table_supports_dax() is called multiple times (from
> dm_table_set_restrictions and dm_table_determine_type). It is strange
> to have a getter have a side-effect of being a setter too. Overloading
> like this could get you in t
Dont support 'MAP_SYNC' with non-DAX files and DAX files
with asynchronous dax_device. Virtio pmem provides
asynchronous host page cache flush mechanism. We don't
support 'MAP_SYNC' with virtio pmem and xfs.
Signed-off-by: Pankaj Gupta
Reviewed-by: Darrick J. Wong
-
Dont support 'MAP_SYNC' with non-DAX files and DAX files
with asynchronous dax_device. Virtio pmem provides
asynchronous host page cache flush mechanism. We don't
support 'MAP_SYNC' with virtio pmem and ext4.
Signed-off-by: Pankaj Gupta
Reviewed-by: Jan Kara
This patch introduces 'daxdev_mapping_supported' helper
which checks if 'MAP_SYNC' is supported with filesystem
mapping. It also checks if corresponding dax_device is
synchronous. Virtio pmem device is asynchronous and
does not not support VM_SYNC.
Suggested-by: Jan Kara
S
This patch sets dax device 'DAXDEV_SYNC' flag if all the target
devices of device mapper support synchrononous DAX. If device
mapper consists of both synchronous and asynchronous dax devices,
we don't set 'DAXDEV_SYNC' flag.
Signed-off-by: Pankaj Gupta
---
d
This patch adds 'DAXDEV_SYNC' flag which is set
for nd_region doing synchronous flush. This later
is used to disable MAP_SYNC functionality for
ext4 & xfs filesystem for devices don't support
synchronous flush.
Signed-off-by: Pankaj Gupta
---
drivers/dax/bus.c|
orms flush
on DAX memory range.
Signed-off-by: Pankaj Gupta
Reviewed-by: Yuval Shaia
Acked-by: Michael S. Tsirkin
Acked-by: Jakub Staron
Tested-by: Jakub Staron
---
drivers/nvdimm/Makefile | 1 +
drivers/nvdimm/nd_virtio.c | 124 +++
drivers/
ed by host fsync
failure to userspace.
Signed-off-by: Pankaj Gupta
---
drivers/acpi/nfit/core.c | 4 ++--
drivers/nvdimm/claim.c | 6 --
drivers/nvdimm/nd.h | 1 +
drivers/nvdimm/pmem.c| 13 -
drivers/nvdimm/region_devs.c | 26 -
- nvdimm_flush() return 0 or -EIO if it fails
- Teach nsio_rw_bytes() that the flush can fail
- Rename nvdimm_flush() to generic_nvdimm_flush()
- Use 'nd_region->provider_data' for long dereferencing
- Remove virtio_pmem_freeze/restore functions
- Remove BSD license text with SPDX licen
> On Tue, May 21, 2019 at 6:43 AM Pankaj Gupta wrote:
> >
> > This patch sets dax device 'DAXDEV_SYNC' flag if all the target
> > devices of device mapper support synchrononous DAX. If device
> > mapper consists of both synchronous and asynchronous dax de
SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
> > +/*
> > + * Definitions for virtio-pmem devices.
> > + *
> > + * Copyright (C) 2019 Red Hat, Inc.
> > + *
> > + * Author(s): Pankaj Gupta
> > + */
> > +
> > +#ifndef _UAPI_LINUX_VIRTIO_PMEM_H
&
Dont support 'MAP_SYNC' with non-DAX files and DAX files
with asynchronous dax_device. Virtio pmem provides
asynchronous host page cache flush mechanism. We don't
support 'MAP_SYNC' with virtio pmem and xfs.
Signed-off-by: Pankaj Gupta
Reviewed-by: Darrick J. Wong
-
This patch introduces 'daxdev_mapping_supported' helper
which checks if 'MAP_SYNC' is supported with filesystem
mapping. It also checks if corresponding dax_device is
synchronous. Virtio pmem device is asynchronous and
does not not support VM_SYNC.
Suggested-by: Jan Kara
S
Dont support 'MAP_SYNC' with non-DAX files and DAX files
with asynchronous dax_device. Virtio pmem provides
asynchronous host page cache flush mechanism. We don't
support 'MAP_SYNC' with virtio pmem and ext4.
Signed-off-by: Pankaj Gupta
Reviewed-by: Jan Kara
This patch sets dax device 'DAXDEV_SYNC' flag if all the target
devices of device mapper support synchrononous DAX. If device
mapper consists of both synchronous and asynchronous dax devices,
we don't set 'DAXDEV_SYNC' flag.
Signed-off-by: Pankaj Gupta
---
d
This patch adds 'DAXDEV_SYNC' flag which is set
for nd_region doing synchronous flush. This later
is used to disable MAP_SYNC functionality for
ext4 & xfs filesystem for devices don't support
synchronous flush.
Signed-off-by: Pankaj Gupta
---
drivers/dax/bus.c|
orms flush
on DAX memory range.
Signed-off-by: Pankaj Gupta
Reviewed-by: Yuval Shaia
Acked-by: Michael S. Tsirkin
Acked-by: Jakub Staron
Tested-by: Jakub Staron
---
drivers/nvdimm/Makefile | 1 +
drivers/nvdimm/nd_virtio.c | 124 +++
drivers/
ed by host fsync
failure to userspace.
Signed-off-by: Pankaj Gupta
---
drivers/acpi/nfit/core.c | 4 ++--
drivers/nvdimm/claim.c | 6 --
drivers/nvdimm/nd.h | 1 +
drivers/nvdimm/pmem.c| 13 -
drivers/nvdimm/region_devs.c | 26 -
rovider_data' for long dereferencing
- Remove virtio_pmem_freeze/restore functions
- Remove BSD license text with SPDX license text
- Add might_sleep() in virtio_pmem_flush - [Luiz]
- Make spin_lock_irqsave() narrow
Pankaj Gupta (7):
libnvdimm: nd_region flush callback support
virtio-pm
>
>
> > On 5/16/19 10:35 PM, Pankaj Gupta wrote:
> > > Can I take it your reviewed/acked-by? or tested-by tag? for the virtio
> > > patch :)I don't feel that I have enough expertise to give the reviewed-by
> > > tag, but you can
> > take my ack
> On 5/16/19 10:35 PM, Pankaj Gupta wrote:
> > Can I take it your reviewed/acked-by? or tested-by tag? for the virtio
> > patch :)I don't feel that I have enough expertise to give the reviewed-by
> > tag, but you can
> take my acked-by + tested-by.
>
> Acked-b
Hi Jakub,
>
> On 5/14/19 7:54 AM, Pankaj Gupta wrote:
> > + if (!list_empty(&vpmem->req_list)) {
> > + req_buf = list_first_entry(&vpmem->req_list,
> > + struct virtio_pmem_request,
>
> On Wed, May 15, 2019 at 10:46:00PM +0200, David Hildenbrand wrote:
> > > + vpmem->vdev = vdev;
> > > + vdev->priv = vpmem;
> > > + err = init_vq(vpmem);
> > > + if (err) {
> > > + dev_err(&vdev->dev, "failed to initialize virtio pmem vq's\n");
> > > + goto out_err;
> > > + }
> >> + vpmem->vdev = vdev;
> >> + vdev->priv = vpmem;
> >> + err = init_vq(vpmem);
> >> + if (err) {
> >> + dev_err(&vdev->dev, "failed to initialize virtio pmem vq's\n");
> >> + goto out_err;
> >> + }
> >> +
> >> + virtio_cread(vpmem->vdev, struct virtio_pmem_config,
> >>
>
> > + vpmem->vdev = vdev;
> > + vdev->priv = vpmem;
> > + err = init_vq(vpmem);
> > + if (err) {
> > + dev_err(&vdev->dev, "failed to initialize virtio pmem vq's\n");
> > + goto out_err;
> > + }
> > +
> > + virtio_cread(vpmem->vdev, struct virtio_pmem_config,
>
ring
> > existing flush function. Report error returned by host fsync
> > failure to userspace.
> >
> > Signed-off-by: Pankaj Gupta
> > ---
> > drivers/acpi/nfit/core.c | 4 ++--
> > drivers/nvdimm/claim.c | 6 --
> > drivers/nvdim
> On 5/14/19 7:54 AM, Pankaj Gupta wrote:
> > diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig
> > index 35897649c24f..94bad084ebab 100644
> > --- a/drivers/virtio/Kconfig
> > +++ b/drivers/virtio/Kconfig
> > @@ -42,6 +42,17 @@ config VIRTIO_PCI_LEGA
Dont support 'MAP_SYNC' with non-DAX files and DAX files
with asynchronous dax_device. Virtio pmem provides
asynchronous host page cache flush mechanism. We don't
support 'MAP_SYNC' with virtio pmem and xfs.
Signed-off-by: Pankaj Gupta
Reviewed-by: Darrick J. Wong
-
Dont support 'MAP_SYNC' with non-DAX files and DAX files
with asynchronous dax_device. Virtio pmem provides
asynchronous host page cache flush mechanism. We don't
support 'MAP_SYNC' with virtio pmem and ext4.
Signed-off-by: Pankaj Gupta
Reviewed-by: Jan Kara
This patch introduces 'daxdev_mapping_supported' helper
which checks if 'MAP_SYNC' is supported with filesystem
mapping. It also checks if corresponding dax_device is
synchronous. Virtio pmem device is asynchronous and
does not not support VM_SYNC.
Suggested-by: Jan Kara
S
This patch sets dax device 'DAXDEV_SYNC' flag if all the target
devices of device mapper support synchrononous DAX. If device
mapper consists of both synchronous and asynchronous dax devices,
we don't set 'DAXDEV_SYNC' flag.
Signed-off-by: Pankaj Gupta
---
d
This patch adds 'DAXDEV_SYNC' flag which is set
for nd_region doing synchronous flush. This later
is used to disable MAP_SYNC functionality for
ext4 & xfs filesystem for devices don't support
synchronous flush.
Signed-off-by: Pankaj Gupta
---
drivers/dax/bus.c|
orms flush
on DAX memory range.
Signed-off-by: Pankaj Gupta
Reviewed-by: Yuval Shaia
Acked-by: Michael S. Tsirkin
---
drivers/nvdimm/Makefile | 1 +
drivers/nvdimm/nd_virtio.c | 126 +++
drivers/nvdimm/virtio_pmem.c | 122 ++
ed by host fsync
failure to userspace.
Signed-off-by: Pankaj Gupta
---
drivers/acpi/nfit/core.c | 4 ++--
drivers/nvdimm/claim.c | 6 --
drivers/nvdimm/nd.h | 1 +
drivers/nvdimm/pmem.c| 13 -
drivers/nvdimm/region_devs.c | 26 -
sh can fail
- Rename nvdimm_flush() to generic_nvdimm_flush()
- Use 'nd_region->provider_data' for long dereferencing
- Remove virtio_pmem_freeze/restore functions
- Remove BSD license text with SPDX license text
- Add might_sleep() in virtio_pmem_flush - [Luiz]
- Make spin_lock_irqs
> >>
> >> I think you should do the same here, vdev->priv is allocated in
> >> virtio_pmem_probe.
> >>
> >> But maybe I am missing something important here :)
> >
> > Because virtio_balloon use "kzalloc" for allocation and needs to be freed.
> > But virtio pmem uses "devm_kzalloc" which takes ca
>
> >>
> >>> + }
> >>> +
> >>> + /* When host has read buffer, this completes via host_ack */
> >>
> >> "A host repsonse results in "host_ack" getting called" ... ?
> >>
> >>> + wait_event(req->host_acked, req->done);
> >>> + err = req->ret;
> >>> +ret:
> >>> + kfree(req);
> >>> + return err;
>
Hi David,
Thank you for the review.
> On 10.05.19 17:51, Pankaj Gupta wrote:
> > This patch adds virtio-pmem driver for KVM guest.
> >
> > Guest reads the persistent memory range information from
> > Qemu over VIRTIO and registers it on nvdimm_bus. It also
> >
> >
> >
> > Hi Dan,
> >
> > While testing device mapper with DAX, I faced a bug with the commit:
> >
> > commit ad428cdb525a97d15c0349fdc80f3d58befb50df
> > Author: Dan Williams
> > Date: Wed Feb 20 21:12:50 2019 -0800
> >
> > When I reverted the condition to old code[1] it worked for me. I
>
Hi Dan,
While testing device mapper with DAX, I faced a bug with the commit:
commit ad428cdb525a97d15c0349fdc80f3d58befb50df
Author: Dan Williams
Date: Wed Feb 20 21:12:50 2019 -0800
When I reverted the condition to old code[1] it worked for me. I
am thinking when we map two different devi
; > VIRTIO from 'pmem' driver when userspace performs flush
> > on DAX memory range.
> >
> > Signed-off-by: Pankaj Gupta
> > Reviewed-by: Yuval Shaia
>
> Acked-by: Michael S. Tsirkin
Thank you, Michael.
Best regards,
Pankaj
>
> > ---
> &
> >
> > Hi Dan,
> >
> > Thank you for the review. Please see my reply inline.
> >
> > >
> > > Hi Pankaj,
> > >
> > > Some minor file placement comments below.
> >
> > Sure.
> >
> > >
> > > On
> > > >
> > > > This patch adds 'DAXDEV_SYNC' flag which is set
> > > > for nd_region doing synchronous flush. This later
> > > > is used to disable MAP_SYNC functionality for
> > > > ext4 & xfs filesystem for devices don&
1 - 100 of 209 matches
Mail list logo