From: no-reply@sashiko.virtuozzo.com
To: Alexander Ivanov <alexander.ivanov@virtuozzo.com>,
andrey.zhadchenko@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v3 9/9] drivers/vhost/blk: fix a hang on release after the vhost worker is killed
Date: Tue, 17 Nov 2026 11:01:25 +0000 [thread overview]
Message-ID: <010701a1e92b3706-abc17d35-e495-4187-8e72-ead91778be6c-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261117104329.3079812-10-alexander.ivanov@virtuozzo.com>
> When the owner is killed, vhost_worker_killed() detaches the worker
> from the vqs. A bio completing after that fails to queue the
> completion work, so its request stays on llhead and is never removed
> from req_inflight. vhost_blk_flush() on release then waits forever
> and the process is stuck in D state. Any kill of a VM with I/O in
> flight can hit this.
>
> If the work cannot be queued, drop the completed requests right in
> the bio end_io: forget them without writing a status, as there is no
> guest left to see it. llist_del_all() makes sure a request is dropped
> once even if it races with the last run of the host kick handler.
> forget_request() can now run in irq context, so take flush_lock with
> interrupts disabled. The end_io may run in atomic context and the
> request buffers may be vmalloc'ed, so free them on release instead:
> a dropped request is the one left with ->inflight set.
>
> Once a request is on llhead, a concurrent consumer may forget it and
> let release free the request array and blk while the end_io is still
> using blk_vq. Keep the end_io tail in an RCU read-side section and
> wait for a grace period before freeing the requests. The same window
> existed before with the host kick handler as the consumer.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-152175
>
> Fixes: c57a98d65796 ("drivers/vhost: vhost-blk accelerator for virtio-blk guests")
> Feature: vhost-blk: in-kernel accelerator for virtio-blk guests
> Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261117104329.3079812-1-alexander.ivanov@virtuozzo.com?part=9
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-17 11:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 10:43 [Devel] [PATCH hci-8.1 v3 0/9] dm-qcow2: support the werror/rerror policies for vhost-blk disks Alexander Ivanov
2026-11-17 10:43 ` [Devel] [PATCH hci-8.1 v3 1/9] drivers/md/dm-qcow2: cancel the event work and ENOSPC timer in the destructor Alexander Ivanov
2026-11-17 10:52 ` no-reply
2026-11-17 10:43 ` [Devel] [PATCH hci-8.1 v3 2/9] drivers/md/dm-qcow2: always resubmit delayed ENOSPC requests in presuspend Alexander Ivanov
2026-11-17 10:50 ` no-reply
2026-11-17 10:43 ` [Devel] [PATCH hci-8.1 v3 3/9] drivers/md/dm-qcow2: rename the ENOSPC delay list to a held request list Alexander Ivanov
2026-11-17 10:51 ` no-reply
2026-11-17 10:43 ` [Devel] [PATCH hci-8.1 v3 4/9] drivers/md/dm-qcow2: arm the hold timer only for the first held request Alexander Ivanov
2026-11-17 10:52 ` no-reply
2026-11-17 10:43 ` [Devel] [PATCH hci-8.1 v3 5/9] drivers/md/dm-qcow2: report held requests with an IO_ERROR uevent Alexander Ivanov
2026-11-17 10:53 ` no-reply
2026-11-17 10:43 ` [Devel] [PATCH hci-8.1 v3 6/9] drivers/md/dm-qcow2: add the resubmit and fail_held messages Alexander Ivanov
2026-11-17 10:54 ` no-reply
2026-11-17 10:43 ` [Devel] [PATCH hci-8.1 v3 7/9] drivers/md/dm-qcow2: add the error_policy table argument Alexander Ivanov
2026-11-17 10:56 ` no-reply
2026-11-17 10:43 ` [Devel] [PATCH hci-8.1 v3 8/9] drivers/md/dm-qcow2: requeue held requests on a noflush suspend Alexander Ivanov
2026-11-17 10:57 ` no-reply
2026-11-17 10:43 ` [Devel] [PATCH hci-8.1 v3 9/9] drivers/vhost/blk: fix a hang on release after the vhost worker is killed Alexander Ivanov
2026-11-17 11:01 ` no-reply [this message]
2026-11-17 11:25 ` Konstantin Khorenko
2026-11-17 11:25 ` [Devel] [PATCH hci-8.1 v3 0/9] dm-qcow2: support the werror/rerror policies for vhost-blk disks Konstantin Khorenko
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=010701a1e92b3706-abc17d35-e495-4187-8e72-ead91778be6c-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=alexander.ivanov@virtuozzo.com \
--cc=andrey.zhadchenko@virtuozzo.com \
--cc=devel@openvz.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox