From: Stefan Hajnoczi <stefanha@redhat.com>
To: lv.mengzhao@zte.com.cn
Cc: mst@redhat.com, kwolf@redhat.com, hreitz@redhat.com,
qemu-devel@nongnu.org, hu.jian@zte.com.cn
Subject: Re: [PATCH] virtio-blk: don't start dataplane during the stop of dataplane
Date: Mon, 16 Oct 2023 15:39:18 -0400 [thread overview]
Message-ID: <20231016193918.GA163275@fedora> (raw)
In-Reply-To: <202310111414266586398@zte.com.cn>
[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]
On Wed, Oct 11, 2023 at 02:14:26PM +0800, lv.mengzhao@zte.com.cn wrote:
> From: hujian <hu.jian@zte.com.cn>
>
> During the stop of dataplane for virtio-blk, virtio_bus_cleanup_host_notifier() is be
> called to clean up notifier at the end, if polled ioeventfd, virtio_blk_handle_output()
> is used to handle io request. But due to s->dataplane_disabled is false, it will be
> returned directly, which drops io request.
> Backtrace:
> ->virtio_blk_data_plane_stop
> ->virtio_bus_cleanup_host_notifier
> ->virtio_queue_host_notifier_read
> ->virtio_queue_notify_vq
> ->vq->handle_output
> ->virtio_blk_handle_output
> ->if (s->dataplane && !s->dataplane_stoped)
> ->if (!s->dataplane_disabled)
> ->return *
> ->virtio_blk_handle_output_do
> The above problem can occur when using "virsh reset" cmdline to reset guest, while
> guest does io.
> To fix this problem, don't try to start dataplane if s->stopping is true, and io would
> be handled by virtio_blk_handle_vq().
>
> Signed-off-by: hujian <hu.jian@zte.com.cn>
> ---
> hw/block/virtio-blk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, applied to my block tree:
https://gitlab.com/stefanha/qemu/commits/block
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-10-16 19:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 6:14 [PATCH] virtio-blk: don't start dataplane during the stop of dataplane lv.mengzhao
2023-10-16 19:39 ` Stefan Hajnoczi [this message]
2023-10-17 14:03 ` Stefan Hajnoczi
-- strict thread matches above, loose matches on Subject: below --
2023-10-11 7:17 lv.mengzhao
2023-10-11 3:37 hujian
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=20231016193918.GA163275@fedora \
--to=stefanha@redhat.com \
--cc=hreitz@redhat.com \
--cc=hu.jian@zte.com.cn \
--cc=kwolf@redhat.com \
--cc=lv.mengzhao@zte.com.cn \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).