summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Reitz2020-06-23 11:29:04 +0200
committerKevin Wolf2020-09-07 12:31:31 +0200
commitc6f6d8462cecda0b9c390831904f1346c01f75ee (patch)
tree3baf21d7eba54696af1397e94f999a969a5dcee2
parentblock: Use child access functions for QAPI queries (diff)
downloadqemu-c6f6d8462cecda0b9c390831904f1346c01f75ee.tar.gz
qemu-c6f6d8462cecda0b9c390831904f1346c01f75ee.tar.xz
qemu-c6f6d8462cecda0b9c390831904f1346c01f75ee.zip
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>
-rw-r--r--block/block-copy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/block-copy.c b/block/block-copy.c
index a30b9097ef..cd9bc47c8f 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
@@ -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;
}