[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 13/16] block: Implement bdrv_append() without
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [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
- [Qemu-devel] [PATCH v2 00/16] block: Get rid of bdrv_swap(), Kevin Wolf, 2015/10/08
- [Qemu-devel] [PATCH v2 11/16] block-backend: Add blk_set_bs(), Kevin Wolf, 2015/10/08
- [Qemu-devel] [PATCH v2 15/16] block: Add and use bdrv_replace_in_backing_chain(), Kevin Wolf, 2015/10/08
- [Qemu-devel] [PATCH v2 03/16] blkverify: Convert s->test_file to BdrvChild, Kevin Wolf, 2015/10/08
- [Qemu-devel] [PATCH v2 06/16] block: Remove bdrv_open_image(), Kevin Wolf, 2015/10/08
- [Qemu-devel] [PATCH v2 13/16] block: Implement bdrv_append() without bdrv_swap(), Kevin Wolf, 2015/10/08
- [Qemu-devel] [PATCH v2 16/16] block: Remove bdrv_swap(), Kevin Wolf, 2015/10/08
- [Qemu-devel] [PATCH v2 08/16] block: Manage backing file references in bdrv_set_backing_hd(), Kevin Wolf, 2015/10/08
- [Qemu-devel] [PATCH v2 07/16] block: Convert bs->backing_hd to BdrvChild, Kevin Wolf, 2015/10/08