[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 30/33] block: Drop bdrv_format_default_perms()
From: |
Max Reitz |
Subject: |
[PATCH v3 30/33] block: Drop bdrv_format_default_perms() |
Date: |
Tue, 18 Feb 2020 13:42:39 +0100 |
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
block.c | 19 -------------------
include/block/block_int.h | 11 -----------
2 files changed, 30 deletions(-)
diff --git a/block.c b/block.c
index a7c2ad6c5b..16eb790ea6 100644
--- a/block.c
+++ b/block.c
@@ -2344,25 +2344,6 @@ static void bdrv_default_perms_for_data(BlockDriverState
*bs, BdrvChild *c,
*nshared = shared;
}
-void bdrv_format_default_perms(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)
-{
- if (child_class == &child_of_bds) {
- bdrv_default_perms(bs, c, child_class, role, reopen_queue,
- perm, shared, nperm, nshared);
- return;
- }
-
- assert(child_class == &child_file);
-
- bdrv_default_perms_for_metadata(bs, c, child_class, role, reopen_queue,
- perm, shared, nperm, nshared);
-}
-
void bdrv_default_perms(BlockDriverState *bs, BdrvChild *c,
const BdrvChildClass *child_class, BdrvChildRole role,
BlockReopenQueue *reopen_queue,
diff --git a/include/block/block_int.h b/include/block/block_int.h
index c2fb6b8899..28a35cd5d1 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -1253,17 +1253,6 @@ int bdrv_child_try_set_perm(BdrvChild *c, uint64_t perm,
uint64_t shared,
*/
int bdrv_child_refresh_perms(BlockDriverState *bs, BdrvChild *c, Error **errp);
-/* Default implementation for BlockDriver.bdrv_child_perm() that can be used by
- * (non-raw) image formats: Like above for bs->backing, but for bs->file it
- * requires WRITE | RESIZE for read-write images, always requires
- * CONSISTENT_READ and doesn't share WRITE. */
-void bdrv_format_default_perms(BlockDriverState *bs, BdrvChild *c,
- const BdrvChildClass *child_class,
- BdrvChildRole child_role,
- BlockReopenQueue *reopen_queue,
- uint64_t perm, uint64_t shared,
- uint64_t *nperm, uint64_t *nshared);
-
bool bdrv_recurse_can_replace(BlockDriverState *bs,
BlockDriverState *to_replace);
--
2.24.1
- Re: [PATCH v3 20/33] block: Switch child_format users to child_of_bds, (continued)
- [PATCH v3 21/33] block: Drop child_format, Max Reitz, 2020/02/18
- [PATCH v3 22/33] block: Make backing files child_of_bds children, Max Reitz, 2020/02/18
- [PATCH v3 24/33] block: Make format drivers use child_of_bds, Max Reitz, 2020/02/18
- [PATCH v3 23/33] block: Drop child_backing, Max Reitz, 2020/02/18
- [PATCH v3 25/33] block: Make filter drivers use child_of_bds, Max Reitz, 2020/02/18
- [PATCH v3 26/33] block: Use child_of_bds in remaining places, Max Reitz, 2020/02/18
- [PATCH v3 27/33] tests: Use child_of_bds instead of child_file, Max Reitz, 2020/02/18
- [PATCH v3 29/33] block: Make bdrv_filter_default_perms() static, Max Reitz, 2020/02/18
- [PATCH v3 28/33] block: Use bdrv_default_perms(), Max Reitz, 2020/02/18
- [PATCH v3 30/33] block: Drop bdrv_format_default_perms(),
Max Reitz <=
- [PATCH v3 31/33] block: Drop child_file, Max Reitz, 2020/02/18
- [PATCH v3 32/33] block: Pass BdrvChildRole in remaining cases, Max Reitz, 2020/02/18
- [PATCH v3 33/33] block: Drop @child_class from bdrv_child_perm(), Max Reitz, 2020/02/18