qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v3 2/2] block: move blk_exp_close_all() to qemu_cleanup()


From: Eric Blake
Subject: Re: [PATCH v3 2/2] block: move blk_exp_close_all() to qemu_cleanup()
Date: Thu, 21 Jan 2021 12:02:10 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 1/21/21 11:07 AM, Sergio Lopez wrote:
> Move blk_exp_close_all() from bdrv_close() to qemu_cleanup(), before
> bdrv_drain_all_begin().
> 
> Export drivers may have coroutines yielding at some point in the block
> layer, so we need to shut them down before draining the block layer,
> as otherwise they may get stuck blk_wait_while_drained().

stuck in

> 
> RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1900505
> Signed-off-by: Sergio Lopez <slp@redhat.com>
> ---
>  block.c            | 1 -
>  softmmu/runstate.c | 9 +++++++++
>  2 files changed, 9 insertions(+), 1 deletion(-)
> 

> @@ -783,6 +784,14 @@ void qemu_cleanup(void)
>       */
>      migration_shutdown();
>  
> +    /*
> +     * Close the exports before draining the block layer. The export
> +     * drivers may have coroutines yielding on it, so we need to clean
> +     * them up before the drain, as otherwise they may be get stuck in

s/be //

> +     * blk_wait_while_drained().
> +     */
> +    blk_exp_close_all();
> +
>      /*
>       * We must cancel all block jobs while the block layer is drained,
>       * or cancelling will be affected by throttling and thus may block
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

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