[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v3 03/15] block: Cancel jobs first in bdrv_close
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH v3 03/15] block: Cancel jobs first in bdrv_close_all() |
Date: |
Wed, 25 May 2016 16:44:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 |
On 25.05.2016 14:29, Kevin Wolf wrote:
> So far, bdrv_close_all() first removed all root BlockDriverStates of
> BlockBackends and monitor owned BDSes, and then assumed that the
> remaining BDSes must be related to jobs and cancelled these jobs.
>
> This order doesn't work that well any more when block jobs use
> BlockBackends internally because then they will lose their BDS before
> being cancelled.
>
> This patch changes bdrv_close_all() to first cancel all jobs and then
> remove all root BDSes from the remaining BBs.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> Reviewed-by: Alberto Garcia <address@hidden>
> ---
> block.c | 23 ++---------------------
> blockjob.c | 13 +++++++++++++
> include/block/blockjob.h | 7 +++++++
> 3 files changed, 22 insertions(+), 21 deletions(-)
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH v3 00/15] block jobs: Convert I/O to BlockBackend, Kevin Wolf, 2016/05/25
- [Qemu-block] [PATCH v3 02/15] block: keep a list of block jobs, Kevin Wolf, 2016/05/25
- [Qemu-block] [PATCH v3 03/15] block: Cancel jobs first in bdrv_close_all(), Kevin Wolf, 2016/05/25
- Re: [Qemu-block] [PATCH v3 03/15] block: Cancel jobs first in bdrv_close_all(),
Max Reitz <=
- [Qemu-block] [PATCH v3 01/15] block: Rename blk_write_zeroes(), Kevin Wolf, 2016/05/25
- [Qemu-block] [PATCH v3 04/15] block: Default to enabled write cache in blk_new(), Kevin Wolf, 2016/05/25
- [Qemu-block] [PATCH v3 05/15] block: Convert block job core to BlockBackend, Kevin Wolf, 2016/05/25
- [Qemu-block] [PATCH v3 07/15] stream: Use BlockBackend for I/O, Kevin Wolf, 2016/05/25
- [Qemu-block] [PATCH v3 06/15] block: Make blk_co_preadv/pwritev() public, Kevin Wolf, 2016/05/25