]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tests-bdrv-drain: bdrv_replace_test driver: declare supports_backing
authorVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Tue, 26 Jul 2022 20:11:24 +0000 (23:11 +0300)
committerKevin Wolf <kwolf@redhat.com>
Thu, 27 Oct 2022 18:14:11 +0000 (20:14 +0200)
We do add COW child to the node.  In future we are going to forbid
adding COW child to the node that doesn't support backing. So, fix it
here now.

Don't worry about setting bs->backing itself: in further commit we'll
update the block-layer to automatically set/unset this field in generic
code.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-6-vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/unit/test-bdrv-drain.c

index 4924ceb562f1873d203d7b099d4870cdfa0695d4..84e09d7070da70bcda6aad8a693cf51a186e0398 100644 (file)
@@ -1970,6 +1970,7 @@ static void coroutine_fn bdrv_replace_test_co_drain_end(BlockDriverState *bs)
 static BlockDriver bdrv_replace_test = {
     .format_name            = "replace_test",
     .instance_size          = sizeof(BDRVReplaceTestState),
+    .supports_backing       = true,
 
     .bdrv_close             = bdrv_replace_test_close,
     .bdrv_co_preadv         = bdrv_replace_test_co_preadv,