[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 13/16] block: Implement bdrv_append() without
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH v2 13/16] block: Implement bdrv_append() without bdrv_swap() |
Date: |
Fri, 2 Oct 2015 19:32:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 01.10.2015 15:13, Kevin Wolf wrote:
> Remember all parent nodes and just change the pointers there instead of
> swapping the contents of the BlockDriverState.
>
> Handling of snapshot=on must be moved further down in bdrv_open()
> because *pbs (which is the bs pointer in the BlockBackend) must already
> be set before bdrv_append() is called. Otherwise bdrv_append() changes
> the BB's pointer to the temporary snapshot, but bdrv_open() overwrites
> it with the read-only original image.
>
> We also need to be careful to update callers as the interface changes
> (becomes less insane): Previously, the meaning of the two parameters was
> inverted when bdrv_append() returns. Now any BDS pointers keep pointing
> to the same node.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block.c | 112
> +++++++++++++++++++++++++++++++++++++++++++++----------------
> blockdev.c | 2 +-
> 2 files changed, 85 insertions(+), 29 deletions(-)
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-block] [PATCH v2 07/16] block: Convert bs->backing_hd to BdrvChild, (continued)
- [Qemu-block] [PATCH v2 08/16] block: Manage backing file references in bdrv_set_backing_hd(), Kevin Wolf, 2015/10/08
- [Qemu-block] [PATCH v2 10/16] block/io: Make bdrv_requests_pending() public, Kevin Wolf, 2015/10/08
- [Qemu-block] [PATCH v2 12/16] block: Introduce parents list, Kevin Wolf, 2015/10/08
- [Qemu-block] [PATCH v2 13/16] block: Implement bdrv_append() without bdrv_swap(), Kevin Wolf, 2015/10/08
- [Qemu-block] [PATCH v2 02/16] vmdk: Use BdrvChild instead of BDS for references to extents, Kevin Wolf, 2015/10/08
- [Qemu-block] [PATCH v2 01/16] block: Introduce BDS.file_child, Kevin Wolf, 2015/10/08
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 00/16] block: Get rid of bdrv_swap(), Fam Zheng, 2015/10/08
- Re: [Qemu-block] [PATCH v2 00/16] block: Get rid of bdrv_swap(), Stefan Hajnoczi, 2015/10/09