All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
* [Devel] [PATCH hci-8.2 0/4] drivers/vhost/blk: hold requests failed with ENOSPC until QEMU resubmits them
@ 2026-11-27 11:15 Alexander Ivanov
  2026-11-27 11:16 ` [Devel] [PATCH hci-8.2 1/4] drivers/vhost: split the descriptor chain walk out of vhost_get_vq_desc() Alexander Ivanov
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Alexander Ivanov @ 2026-11-27 11:15 UTC (permalink / raw)
  To: andrey.zhadchenko; +Cc: devel

With report_enospc, dm-qcow2 and dm-ploop fail a request with ENOSPC
at once, and vhost-blk passes it to the guest as VIRTIO_BLK_S_IOERR.
The guest gets a write error, where QEMU with werror=enospc would
pause the VM until space is freed.

This series lets QEMU hold such requests in vhost-blk:
- VHOST_BLK_SET_ERROR_POLICY selects the requests to hold on ENOSPC:
  writes (with flushes and write zeroes) and reads
- VHOST_BLK_SET_ERROR_FD sets the eventfd signalled when a request is
  held
- VHOST_BLK_GET_HELD_REQS returns the vq and head of each held request
- VHOST_BLK_RESUBMIT submits held requests again by vq and head, on
  resume or on the destination of a migration

A held request stays out of the used ring and is not counted as
inflight, so stopping vhost-blk to pause the VM does not wait for it.

Patches 1-2 move the descriptor chain walk and the request parsing out
of the avail ring path, so that a head taken earlier can be parsed
again. Patch 3 holds the requests and reports them, patch 4 resubmits
them.

The series needs "dm-qcow2, dm-ploop: report ENOSPC at once for
vhost-blk disks" for the ENOSPC to reach vhost-blk. The QEMU, libvirt
and ploop.ovz changes follow as separate series.

https://virtuozzo.atlassian.net/browse/VSTOR-152175

Assisted-by: LLM

Alexander Ivanov (4):
  drivers/vhost: split the descriptor chain walk out of
    vhost_get_vq_desc()
  drivers/vhost/blk: split request parsing out of the guest kick handler
  drivers/vhost/blk: hold requests failed with ENOSPC
  drivers/vhost/blk: add the VHOST_BLK_RESUBMIT ioctl

 drivers/vhost/blk.c              | 290 ++++++++++++++++++++++++++++---
 drivers/vhost/vhost.c            |  91 ++++++----
 drivers/vhost/vhost.h            |   4 +
 include/uapi/linux/vhost.h       |  31 ++++
 include/uapi/linux/vhost_types.h |  18 ++
 5 files changed, 373 insertions(+), 61 deletions(-)

-- 
2.53.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-30 10:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-27 11:15 [Devel] [PATCH hci-8.2 0/4] drivers/vhost/blk: hold requests failed with ENOSPC until QEMU resubmits them Alexander Ivanov
2026-11-27 11:16 ` [Devel] [PATCH hci-8.2 1/4] drivers/vhost: split the descriptor chain walk out of vhost_get_vq_desc() Alexander Ivanov
2026-11-27 11:16 ` [Devel] [PATCH hci-8.2 2/4] drivers/vhost/blk: split request parsing out of the guest kick handler Alexander Ivanov
2026-11-27 11:16 ` [Devel] [PATCH hci-8.2 3/4] drivers/vhost/blk: hold requests failed with ENOSPC Alexander Ivanov
2026-11-27 11:51   ` Konstantin Khorenko
2026-11-27 11:16 ` [Devel] [PATCH hci-8.2 4/4] drivers/vhost/blk: add the VHOST_BLK_RESUBMIT ioctl Alexander Ivanov
2026-11-27 11:51   ` Konstantin Khorenko
2026-11-27 11:51 ` [Devel] [PATCH hci-8.2 0/4] drivers/vhost/blk: hold requests failed with ENOSPC until QEMU resubmits them Konstantin Khorenko
2026-11-30 10:52   ` Alexander Ivanov

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.