From: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
To: Alexander Ivanov <alexander.ivanov@virtuozzo.com>,
andrey.zhadchenko@virtuozzo.com
Cc: svt-core@virtuozzo.com
Subject: Re: [PATCH hci-8.2 v2 2/2] vhost-blk: pause the VM on an IO_ERROR uevent from dm-qcow2 #VSTOR-152175
Date: Wed, 18 Nov 2026 18:08:20 +0200 [thread overview]
Message-ID: <21278994-3411-4a67-bf7d-256bb29343ed@virtuozzo.com> (raw)
In-Reply-To: <20261118082826.3259784-3-alexander.ivanov@virtuozzo.com>
On 11/18/26 10:28 AM, Alexander Ivanov wrote:
> vhost-blk completes requests to the guest in the kernel, so werror and
> rerror had no effect: dm-qcow2 held the failed write under the enospc
> or stop policy, but the VM kept running with the request stuck.
>
> dm-qcow2 reports a held request with a change uevent carrying
> IO_ERROR=1, IO_ERROR_OP=read|write and IO_ERROR_ERRNO=<errno>. Parse it
> on the uevent socket, stop the VM with the io-error reason and emit
> BLOCK_IO_ERROR, as the block layer does for other devices. The device
> field is the id of the proxy, which is the disk alias libvirt looks the
> disk up by.
>
> libvirt loads the same policy into the dm-qcow2 table, so an event the
> policy of the device would not stop on means a misconfiguration. Warn
> about it, but stop anyway: the request is held in the kernel, and
> without the stop nobody resubmits it.
>
> The VM stops with RUN_STATE_IO_ERROR, on which vhost-blk keeps running,
> so the held requests survive the pause. libvirt resubmits them before
> cont. dm-qcow2 repeats the event on every failed retry, so ignore it
> once the held request has been reported. The run state does not cover
> this: it stays running until the main loop handles the stop request,
> after the whole uevent queue is read.
>
> If the VM is already stopped, e.g. by an error on another disk, still
> block migration and emit BLOCK_IO_ERROR, but do not request a stop.
> Ignore the event while vhost is stopped and in the suspended state,
> which has no transition to io-error.
>
> Migration and savevm from IO_ERROR do not notify the VM state handlers,
> so vhost-blk would keep running and its vring state would be saved
> stale. The held requests cannot be migrated either, so block migration
> until the VM runs again, and fail it in pre_save for a migration that
> was already running when the error came.
>
> Reject the stop policy without the ueventfd property: without the
> socket QEMU never learns about the held request. Accept enospc without
> it, as it is the default and rejecting it would break every device
> configured without ueventfd.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-152175
>
> Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
> ---
> [...]
This version looks OK to me.
Reviewed-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
prev parent reply other threads:[~2026-11-18 16:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=21278994-3411-4a67-bf7d-256bb29343ed@virtuozzo.com \
--to=andrey.drobyshev@virtuozzo.com \
--cc=alexander.ivanov@virtuozzo.com \
--cc=andrey.zhadchenko@virtuozzo.com \
--cc=svt-core@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.