block-copy: Use CAF to find sync=top base

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Max Reitz
2020-09-07 12:31:31 +02:00
committed by Kevin Wolf
parent 0a7585dbba
commit c6f6d8462c
+2 -2
View File
@@ -440,8 +440,8 @@ static int block_copy_block_status(BlockCopyState *s, int64_t offset,
BlockDriverState *base;
int ret;
if (s->skip_unallocated && s->source->bs->backing) {
base = s->source->bs->backing->bs;
if (s->skip_unallocated) {
base = bdrv_backing_chain_next(s->source->bs);
} else {
base = NULL;
}