[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 20/45] block: make permission update functions public
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v5 20/45] block: make permission update functions public |
Date: |
Thu, 31 Mar 2022 00:28:37 +0300 |
We'll need them in further commits in blockdev.c for new transaction
block-graph modifying API.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>
---
block.c | 7 +++----
include/block/block-global-state.h | 4 ++++
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/block.c b/block.c
index 9009f73534..be19964f89 100644
--- a/block.c
+++ b/block.c
@@ -2519,8 +2519,8 @@ static int bdrv_do_refresh_perms(GSList *list,
BlockReopenQueue *q,
* topologically sorted. It's not a problem if some node occurs in the @list
* several times.
*/
-static int bdrv_list_refresh_perms(GSList *list, BlockReopenQueue *q,
- Transaction *tran, Error **errp)
+int bdrv_list_refresh_perms(GSList *list, BlockReopenQueue *q,
+ Transaction *tran, Error **errp)
{
g_autoptr(GHashTable) found = g_hash_table_new(NULL, NULL);
g_autoptr(GSList) refresh_list = NULL;
@@ -2580,8 +2580,7 @@ char *bdrv_perm_names(uint64_t perm)
/* @tran is allowed to be NULL. In this case no rollback is possible */
-static int bdrv_refresh_perms(BlockDriverState *bs, Transaction *tran,
- Error **errp)
+int bdrv_refresh_perms(BlockDriverState *bs, Transaction *tran, Error **errp)
{
int ret;
Transaction *local_tran = NULL;
diff --git a/include/block/block-global-state.h
b/include/block/block-global-state.h
index 600afcf5bd..c307b48b2a 100644
--- a/include/block/block-global-state.h
+++ b/include/block/block-global-state.h
@@ -253,4 +253,8 @@ void bdrv_unregister_buf(BlockDriverState *bs, void *host);
void bdrv_cancel_in_flight(BlockDriverState *bs);
+int bdrv_list_refresh_perms(GSList *list, BlockReopenQueue *q,
+ Transaction *tran, Error **errp);
+int bdrv_refresh_perms(BlockDriverState *bs, Transaction *tran, Error **errp);
+
#endif /* BLOCK_GLOBAL_STATE_H */
--
2.35.1
- [PATCH v5 00/45] Transactional block-graph modifying API, Vladimir Sementsov-Ogievskiy, 2022/03/30
- [PATCH v5 01/45] block: BlockDriver: add .filtered_child_is_backing field, Vladimir Sementsov-Ogievskiy, 2022/03/30
- [PATCH v5 07/45] block: document connection between child roles and bs->backing/bs->file, Vladimir Sementsov-Ogievskiy, 2022/03/30
- [PATCH v5 20/45] block: make permission update functions public,
Vladimir Sementsov-Ogievskiy <=
- [PATCH v5 31/45] qapi: block: add blockdev-add transaction action, Vladimir Sementsov-Ogievskiy, 2022/03/30
- [PATCH v5 37/45] qapi: add x-blockdev-replace command, Vladimir Sementsov-Ogievskiy, 2022/03/30
- [PATCH v5 02/45] block: introduce bdrv_open_file_child() helper, Vladimir Sementsov-Ogievskiy, 2022/03/30
- [PATCH v5 04/45] test-bdrv-graph-mod: update test_parallel_perm_update test case, Vladimir Sementsov-Ogievskiy, 2022/03/30
- [PATCH v5 05/45] tests-bdrv-drain: bdrv_replace_test driver: declare supports_backing, Vladimir Sementsov-Ogievskiy, 2022/03/30
- [PATCH v5 08/45] block/snapshot: stress that we fallback to primary child, Vladimir Sementsov-Ogievskiy, 2022/03/30
- [PATCH v5 14/45] block/snapshot: drop indirection around bdrv_snapshot_fallback_ptr, Vladimir Sementsov-Ogievskiy, 2022/03/30
- [PATCH v5 17/45] block: drop bdrv_remove_filter_or_cow_child, Vladimir Sementsov-Ogievskiy, 2022/03/30
- [PATCH v5 28/45] qapi: block: add blockdev-del transaction action, Vladimir Sementsov-Ogievskiy, 2022/03/30
- [PATCH v5 35/45] block: make bdrv_find_child() function public, Vladimir Sementsov-Ogievskiy, 2022/03/30