All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: Alexander Ivanov <alexander.ivanov@virtuozzo.com>,
	 andrey.zhadchenko@virtuozzo.com
Cc: andrey.drobyshev@virtuozzo.com, 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 08:32:44 +0000	[thread overview]
Message-ID: <010701a1edc972b4-aceaf194-d65e-4f7f-82e0-7590fe881f63-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261118082826.3259784-3-alexander.ivanov@virtuozzo.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] vhost-blk: ENOBUFS in uevent_read() cannot recover a dropped
  IO_ERROR event
--

commit c81b48de82c56f0c6b470db39c0b62c9613d02cf
Author: Alexander Ivanov <alexander.ivanov@virtuozzo.com>

vhost-blk: pause the VM on an IO_ERROR uevent from dm-qcow2

This parses the IO_ERROR change uevent that dm-qcow2 sends for a held request. It stops the VM with the io-error reason and emits BLOCK_IO_ERROR. It also blocks migration while the request is held. The stop policy is now rejected when the ueventfd property is not set.

> diff --git a/hw/block/vhost-blk.c b/hw/block/vhost-blk.c
> index 3e9653fb28c8..51b40d85089e 100644
> --- a/hw/block/vhost-blk.c
> +++ b/hw/block/vhost-blk.c

[ ... ]

> @@ -293,6 +298,55 @@ static void vhost_blk_block_cpr(VHostBlk *s)
>      }
>  }
>
> +static void vhost_blk_io_error(VHostBlk *s, bool is_read, int error)
> +{

[ ... ]

> +    /* dm-qcow2 repeats the event on every failed retry of a held request */
> +    if (s->io_error_held || !s->vhost_started ||
> +        runstate_check(RUN_STATE_SUSPENDED)) {
> +        return;
> +    }

[Severity: Low]
Can a dropped IO_ERROR uevent leave the guest running with a held request?

If the socket overruns and the only IO_ERROR event for a request is lost, vhost_blk_uevent_read() hits the ENOBUFS branch. That branch only calls qemu_bh_schedule(s->resize_bh), which re-reads the capacity. It cannot detect a held request, so vhost_blk_io_error() is never called. The VM is not stopped, no BLOCK_IO_ERROR is emitted and no migration blocker is added. The request stays held in dm-qcow2 and the guest I/O hangs.

The repeat described in this comment does not seem to cover that case. A retry happens only after libvirt resubmits, and libvirt resubmits only after the VM has stopped. A lost first event therefore removes the trigger for any repeat. I could not check dm-qcow2 from this tree, so the claim in the comment is unverified.

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261118082826.3259784-1-alexander.ivanov@virtuozzo.com?part=2

  reply	other threads:[~2026-11-18  8:32 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 [this message]
2026-11-20 12:45     ` Alexander Ivanov
2026-11-18 16:08   ` Andrey Drobyshev

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=010701a1edc972b4-aceaf194-d65e-4f7f-82e0-7590fe881f63-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=alexander.ivanov@virtuozzo.com \
    --cc=andrey.drobyshev@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.