qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] virtio-blk: don't start dataplane during the stop of datapla


From: Stefan Hajnoczi
Subject: Re: [PATCH] virtio-blk: don't start dataplane during the stop of dataplane
Date: Mon, 16 Oct 2023 15:39:18 -0400

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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]