On 10.06.2015 15:47, 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: Max Reitz <mre...@redhat.com>

Reply via email to