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 <kw...@redhat.com> > --- > block.c | 37 +++++++++++++++++++++++++++++++++++++ > include/block/block_int.h | 8 ++++++++ > 2 files changed, 45 insertions(+) >
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature