[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 29/33] block: Make bdrv_filter_default_perms() static
From: |
Max Reitz |
Subject: |
[PATCH v2 29/33] block: Make bdrv_filter_default_perms() static |
Date: |
Tue, 4 Feb 2020 18:08:44 +0100 |
Signed-off-by: Max Reitz <address@hidden>
---
block.c | 12 ++++++------
include/block/block_int.h | 10 ----------
2 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/block.c b/block.c
index 747a2973f5..091e9cc16a 100644
--- a/block.c
+++ b/block.c
@@ -2194,12 +2194,12 @@ int bdrv_child_refresh_perms(BlockDriverState *bs,
BdrvChild *c, Error **errp)
return bdrv_child_try_set_perm(c, perms, shared, errp);
}
-void bdrv_filter_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)
+static void bdrv_filter_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)
{
*nperm = perm & DEFAULT_PERM_PASSTHROUGH;
*nshared = (shared & DEFAULT_PERM_PASSTHROUGH) | DEFAULT_PERM_UNCHANGED;
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 7b51866678..5e3f512ae8 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -1254,16 +1254,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
- * block filters: Forward CONSISTENT_READ, WRITE, WRITE_UNCHANGED and RESIZE to
- * all children */
-void bdrv_filter_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);
-
/* 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
--
2.24.1
- Re: [PATCH v2 23/33] block: Drop child_backing, (continued)
- [PATCH v2 24/33] block: Make format drivers use child_of_bds, Max Reitz, 2020/02/04
- [PATCH v2 25/33] block: Make filter drivers use child_of_bds, Max Reitz, 2020/02/04
- [PATCH v2 26/33] block: Use child_of_bds in remaining places, Max Reitz, 2020/02/04
- [PATCH v2 27/33] tests: Use child_of_bds instead of child_file, Max Reitz, 2020/02/04
- [PATCH v2 29/33] block: Make bdrv_filter_default_perms() static,
Max Reitz <=
- [PATCH v2 30/33] block: Drop bdrv_format_default_perms(), Max Reitz, 2020/02/04
- [PATCH v2 28/33] block: Use bdrv_default_perms(), Max Reitz, 2020/02/04
- [PATCH v2 31/33] block: Drop child_file, Max Reitz, 2020/02/04
- [PATCH v2 32/33] block: Pass BdrvChildRole in remaining cases, Max Reitz, 2020/02/04