mirror: Deal with filters
commit3f072a7fb747413bbf6a63fd6476888b6b671a04
authorMax Reitz <mreitz@redhat.com>
Wed, 12 Jun 2019 14:27:32 +0000 (12 16:27 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 7 Sep 2020 10:31:31 +0000 (7 12:31 +0200)
treee72f22faeb1c0c1f5524af5e62d951d533fbdea5
parentc6f6d8462cecda0b9c390831904f1346c01f75ee
mirror: Deal with filters

This includes some permission limiting (for example, we only need to
take the RESIZE permission for active commits where the base is smaller
than the top).

base_overlay is introduced so we can query bdrv_is_allocated_above() on
it - we cannot do that with base itself, because a filter's block_status
is the same as its child node, so if there are filters on base,
bdrv_is_allocated_above() on base would return information including
base.

Use this opportunity to rename qmp_drive_mirror()'s "source" BDS to
"target_backing_bs", because that is what it really refers to.

Signed-off-by: Max Reitz <mreitz@redhat.com>
block/mirror.c
blockdev.c
qapi/block-core.json