From: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
To: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>
Cc: svt-core@virtuozzo.com, den@openvz.org
Subject: Re: [PATCH hci-8.1] vhost-blk: reorder stopping sequence
Date: Wed, 18 Nov 2026 17:20:15 +0200 [thread overview]
Message-ID: <c87f650a-d4df-4139-b7c3-1a84d2f9ad2f@virtuozzo.com> (raw)
In-Reply-To: <20261118145012.216512-1-andrey.zhadchenko@virtuozzo.com>
LGTM, Ack
Applied on hci-8.1, added:
Fixes: 0ff3cb5ff28f ("block: add vhost-blk backend")
On 11/18/26 4:50 PM, Andrey Zhadchenko wrote:
> Setting backend to -1 drains all in-flight requests. But if we
> remove the notifiers beforehand, the requests are never signaled
> as completed and guest is not notified after qemu CPR. Any IO
> completion on the device unstucks the queue because used ring
> is correct but the irqs are lost.
> Remove the notifiers after device stop just like vhost-user-blk
> or vhost-scsi.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-155598
> Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>
> ---
> hw/block/vhost-blk.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/hw/block/vhost-blk.c b/hw/block/vhost-blk.c
> index abddff02c6d..4cebc91d33e 100644
> --- a/hw/block/vhost-blk.c
> +++ b/hw/block/vhost-blk.c
> @@ -138,12 +138,6 @@ static void vhost_blk_stop(VirtIODevice *vdev)
> return;
> }
>
> - ret = k->set_guest_notifiers(qbus->parent, s->dev.nvqs, false);
> - if (ret < 0) {
> - error_report("vhost-blk: unable to unbind guest notifiers");
> - }
> - vhost_dev_disable_notifiers(&s->dev, vdev);
> -
> /*
> * Detach the backend before vhost_dev_stop() samples the vring base,
> * to stop the kernel worker from further fetching.
> @@ -158,6 +152,12 @@ static void vhost_blk_stop(VirtIODevice *vdev)
>
> vhost_dev_stop(&s->dev, vdev, false);
>
> + ret = k->set_guest_notifiers(qbus->parent, s->dev.nvqs, false);
> + if (ret < 0) {
> + error_report("vhost-blk: unable to unbind guest notifiers");
> + }
> + vhost_dev_disable_notifiers(&s->dev, vdev);
> +
> s->vhost_started = false;
> }
>
prev parent reply other threads:[~2026-11-18 15:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 14:50 Andrey Zhadchenko
2026-11-18 15:00 ` no-reply
2026-11-18 15:20 ` 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=c87f650a-d4df-4139-b7c3-1a84d2f9ad2f@virtuozzo.com \
--to=andrey.drobyshev@virtuozzo.com \
--cc=andrey.zhadchenko@virtuozzo.com \
--cc=den@openvz.org \
--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.