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()) {
> +
From: "sochin.jiang"
commit 88b062c and commit c9d1a56 introduce BDRV_POLL_WHILE,
checking bs->in_flight in the main thread and exit till
bs->in_flight reaches 0. This leaves a chance that
BDRV_POLL_WHILE will hang until iothread complete the
relative block job when