[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 05/15] block: Convert block job core to Block
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH v3 05/15] block: Convert block job core to BlockBackend |
Date: |
Wed, 25 May 2016 16:51:46 +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:
> This adds a new BlockBackend field to the BlockJob struct, which
> coexists with the BlockDriverState while converting the individual jobs.
>
> When creating a block job, a new BlockBackend is created on top of the
> given BlockDriverState, and it is destroyed when the BlockJob ends. The
> reference to the BDS is now held by the BlockBackend instead of calling
> bdrv_ref/unref manually.
>
> We have to be careful when we use bdrv_replace_in_backing_chain() in
> block jobs because this changes the BDS that job->blk points to. At the
> moment block jobs are too tightly coupled with their BDS, so that moving
> a job to another BDS isn't easily possible; therefore, we need to just
> manually undo this change afterwards.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> Reviewed-by: Alberto Garcia <address@hidden>
> ---
> block/mirror.c | 3 +++
> blockjob.c | 37 ++++++++++++++++++++-----------------
> include/block/blockjob.h | 3 ++-
> 3 files changed, 25 insertions(+), 18 deletions(-)
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v3 03/15] block: Cancel jobs first in bdrv_close_all(), (continued)
- [Qemu-devel] [PATCH v3 03/15] block: Cancel jobs first in bdrv_close_all(), Kevin Wolf, 2016/05/25
- [Qemu-devel] [PATCH v3 04/15] block: Default to enabled write cache in blk_new(), Kevin Wolf, 2016/05/25
- [Qemu-devel] [PATCH v3 07/15] stream: Use BlockBackend for I/O, Kevin Wolf, 2016/05/25
- [Qemu-devel] [PATCH v3 06/15] block: Make blk_co_preadv/pwritev() public, Kevin Wolf, 2016/05/25
- [Qemu-devel] [PATCH v3 05/15] block: Convert block job core to BlockBackend, Kevin Wolf, 2016/05/25
- Re: [Qemu-devel] [PATCH v3 05/15] block: Convert block job core to BlockBackend,
Max Reitz <=
- [Qemu-devel] [PATCH v3 01/15] block: Rename blk_write_zeroes(), Kevin Wolf, 2016/05/25
- [Qemu-devel] [PATCH v3 08/15] mirror: Allow target that already has a BlockBackend, Kevin Wolf, 2016/05/25
- [Qemu-devel] [PATCH v3 10/15] backup: Don't leak BackupBlockJob in error path, Kevin Wolf, 2016/05/25
- [Qemu-devel] [PATCH v3 09/15] mirror: Use BlockBackend for I/O, Kevin Wolf, 2016/05/25
- [Qemu-devel] [PATCH v3 14/15] commit: Use BlockBackend for I/O, Kevin Wolf, 2016/05/25
- [Qemu-devel] [PATCH v3 12/15] backup: Remove bs parameter from backup_do_cow(), Kevin Wolf, 2016/05/25
- [Qemu-devel] [PATCH v3 11/15] backup: Pack Notifier within BackupBlockJob, Kevin Wolf, 2016/05/25