소스 검색

tests-bdrv-drain: bdrv_replace_test driver: declare supports_backing

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>
Vladimir Sementsov-Ogievskiy 3 년 전
부모
커밋
9ebfc111a1
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      tests/unit/test-bdrv-drain.c

+ 1 - 0
tests/unit/test-bdrv-drain.c

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