[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 11/13] block: Add list of children to BlockDr
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 11/13] block: Add list of children to BlockDriverState |
Date: |
Wed, 10 Jun 2015 17:26:50 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 06/10/2015 07:47 AM, Kevin Wolf wrote:
> This allows iterating over all children of a given BDS, not only
> including bs->file and bs->backing_hd, but also driver-specific
> ones like VMDK extents or Quorum children.
>
> For bdrv_swap(), the list of children of the swapped BDS stays at that
> BDS (because that's where the pointers stay as well). The list head
> moves and pointers to it must be fixed up therefore.
>
> The list of children in the parent of the swapped BDS is not affected by
> the swap. The contents of the BDS objects is swapped, so the existing
> pointer in the parent automatically points to the newly swapped in BDS.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block.c | 37 +++++++++++++++++++++++++++++++++++++
> include/block/block_int.h | 8 ++++++++
> 2 files changed, 45 insertions(+)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v2 07/13] block: Use QemuOpts in bdrv_open_common(), (continued)
- [Qemu-devel] [PATCH v2 04/13] quorum: Use bdrv_open_image(), Kevin Wolf, 2015/06/10
- [Qemu-devel] [PATCH v2 09/13] block: Drain requests before swapping nodes in bdrv_swap(), Kevin Wolf, 2015/06/10
- [Qemu-devel] [PATCH v2 10/13] queue.h: Add QLIST_FIX_HEAD_PTR(), Kevin Wolf, 2015/06/10
- [Qemu-devel] [PATCH v2 12/13] block: Add BlockDriverState.inherits_from, Kevin Wolf, 2015/06/10
- [Qemu-devel] [PATCH v2 11/13] block: Add list of children to BlockDriverState, Kevin Wolf, 2015/06/10
- [Qemu-devel] [PATCH v2 08/13] block: Move flag inheritance to bdrv_open_inherit(), Kevin Wolf, 2015/06/10
- [Qemu-devel] [PATCH v2 13/13] block: Fix reopen flag inheritance, Kevin Wolf, 2015/06/10