aboutsummaryrefslogtreecommitdiff
path: root/tests/test-bdrv-drain.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2020-05-13 13:05:44 +0200
committerKevin Wolf <kwolf@redhat.com>2020-05-18 19:05:25 +0200
commite5d8a4068526d3fb692e3402485edd03bc11c084 (patch)
treee1ec36109c0c771cae4e98be562724b7e1be21c3 /tests/test-bdrv-drain.c
parent1f38f04eacd4c3b9409dcb411525f203cce168a1 (diff)
downloadqemu-e5d8a4068526d3fb692e3402485edd03bc11c084.zip
qemu-e5d8a4068526d3fb692e3402485edd03bc11c084.tar.gz
qemu-e5d8a4068526d3fb692e3402485edd03bc11c084.tar.bz2
block: Drop @child_class from bdrv_child_perm()
Implementations should decide the necessary permissions based on @role. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200513110544.176672-35-mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/test-bdrv-drain.c')
-rw-r--r--tests/test-bdrv-drain.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c
index 655fd0d..1107271 100644
--- a/tests/test-bdrv-drain.c
+++ b/tests/test-bdrv-drain.c
@@ -85,23 +85,6 @@ static int coroutine_fn bdrv_test_co_preadv(BlockDriverState *bs,
return 0;
}
-static void bdrv_test_child_perm(BlockDriverState *bs, BdrvChild *c,
- const BdrvChildClass *child_class,
- BdrvChildRole role,
- BlockReopenQueue *reopen_queue,
- uint64_t perm, uint64_t shared,
- uint64_t *nperm, uint64_t *nshared)
-{
- /*
- * bdrv_default_perms() accepts nothing else, so disguise
- * detach_by_driver_cb_parent.
- */
- child_class = &child_of_bds;
-
- bdrv_default_perms(bs, c, child_class, role, reopen_queue,
- perm, shared, nperm, nshared);
-}
-
static int bdrv_test_change_backing_file(BlockDriverState *bs,
const char *backing_file,
const char *backing_fmt)
@@ -119,7 +102,7 @@ static BlockDriver bdrv_test = {
.bdrv_co_drain_begin = bdrv_test_co_drain_begin,
.bdrv_co_drain_end = bdrv_test_co_drain_end,
- .bdrv_child_perm = bdrv_test_child_perm,
+ .bdrv_child_perm = bdrv_default_perms,
.bdrv_change_backing_file = bdrv_test_change_backing_file,
};