All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
* [PATCH hci-8.2 v2 0/2] vhost-blk: support the werror/rerror policies
@ 2026-11-18  8:28 Alexander Ivanov
  2026-11-18  8:28 ` [PATCH hci-8.2 v2 1/2] vhost-blk: add the werror and rerror properties #VSTOR-152175 Alexander Ivanov
  2026-11-18  8:28 ` [PATCH hci-8.2 v2 2/2] vhost-blk: pause the VM on an IO_ERROR uevent from dm-qcow2 #VSTOR-152175 Alexander Ivanov
  0 siblings, 2 replies; 7+ messages in thread
From: Alexander Ivanov @ 2026-11-18  8:28 UTC (permalink / raw)
  To: andrey.zhadchenko; +Cc: andrey.drobyshev, svt-core

A vhost-blk disk completes requests to the guest from the kernel, so
QEMU never sees an I/O error and the werror/rerror policies cannot
work the usual way. The dm-qcow2 series holds a failed request
according to the policy and reports it with an IO_ERROR change
uevent. This series makes QEMU accept the policies and pause the VM
on that uevent.

Patch 1 adds the werror and rerror properties, which libvirt passes
when the disk has error_policy or rerror_policy set. Without them
QEMU refuses to start such a VM.

Patch 2 parses the IO_ERROR uevent and stops the VM with the io-error
reason and a BLOCK_IO_ERROR event. Migration and savevm are blocked
while requests are held in the kernel.

v2:
- patch 1: accept enospc as rerror, add Reviewed-by
- patch 2: stop the VM even if the event does not match the policy of
  the device, with a warning, as nobody resubmits the held request
  otherwise
- patch 2: ignore repeated events once the held request is reported,
  as the run state stays running until the main loop handles the stop
- patch 2: if the VM is already stopped, block migration and emit
  BLOCK_IO_ERROR without requesting a stop
- patch 2: ignore the event while vhost is stopped and in the
  suspended state
- patch 2: accept enospc without ueventfd, as it is the default

! Don't apply this patchset before the kernel patchset is applied.

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

Alexander Ivanov (2):
  vhost-blk: add the werror and rerror properties #VSTOR-152175
  vhost-blk: pause the VM on an IO_ERROR uevent from dm-qcow2
    #VSTOR-152175

 hw/block/vhost-blk.c          | 117 +++++++++++++++++++++++++++++++++-
 include/hw/virtio/vhost-blk.h |   2 +
 2 files changed, 116 insertions(+), 3 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-11-20 12:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18  8:28 [PATCH hci-8.2 v2 0/2] vhost-blk: support the werror/rerror policies Alexander Ivanov
2026-11-18  8:28 ` [PATCH hci-8.2 v2 1/2] vhost-blk: add the werror and rerror properties #VSTOR-152175 Alexander Ivanov
2026-11-18  8:31   ` no-reply
2026-11-18  8:28 ` [PATCH hci-8.2 v2 2/2] vhost-blk: pause the VM on an IO_ERROR uevent from dm-qcow2 #VSTOR-152175 Alexander Ivanov
2026-11-18  8:32   ` no-reply
2026-11-20 12:45     ` Alexander Ivanov
2026-11-18 16:08   ` Andrey Drobyshev

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.