[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 02/14] block: Cancel jobs first in bdrv_close_al
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH 02/14] block: Cancel jobs first in bdrv_close_all() |
Date: |
Fri, 13 May 2016 15:14:02 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
On 04.05.2016 11:39, 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>
> ---
> block.c | 23 +----------------------
> blockjob.c | 13 +++++++++++++
> include/block/blockjob.h | 7 +++++++
> 3 files changed, 21 insertions(+), 22 deletions(-)
I agree with Berto about the assertion because it was me who suggested
it. :-)
And because I didn't give Berto an R-b because of that I'm afraid I
can't give you one either. O:-)
Max
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH 01/14] block: keep a list of block jobs, (continued)
- [Qemu-block] [PATCH 01/14] block: keep a list of block jobs, Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 07/14] mirror: Use BlockBackend for I/O, Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 11/14] block: Add blk_co_readv/writev(), Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 02/14] block: Cancel jobs first in bdrv_close_all(), Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 10/14] backup: Remove bs parameter from backup_do_cow(), Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 13/14] commit: Use BlockBackend for I/O, Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 12/14] backup: Use BlockBackend for I/O, Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 14/14] blockjob: Remove BlockJob.bs, Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 09/14] backup: Pack Notifier within BackupBlockJob, Kevin Wolf, 2016/05/04