qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH] blockjob: cancel blockjobs before stopping all


From: Alberto Garcia
Subject: Re: [Qemu-block] [PATCH] blockjob: cancel blockjobs before stopping all iothreads
Date: Wed, 07 Jun 2017 11:46:33 +0200
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

On Sat 03 Jun 2017 07:48:37 AM CEST, sochin.jiang wrote:

> --- a/block.c
> +++ b/block.c
> @@ -3084,9 +3084,16 @@ static void bdrv_close(BlockDriverState *bs)
>      bdrv_drained_end(bs);
>  }
>  
> +void bdrv_cancel_all(void)
> +{
> +    if (!block_jobs_is_empty()) {
> +        block_job_cancel_sync_all();
> +    }
> +}

Why do you need this function at all? block_job_cancel_sync_all() is
already doing nothing when the block_jobs list is empty.

Berto



reply via email to

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