[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/51] block: drop bdrv_remove_filter_or_cow_child
From: |
Kevin Wolf |
Subject: |
[PULL 02/51] block: drop bdrv_remove_filter_or_cow_child |
Date: |
Wed, 14 Dec 2022 14:44:04 +0100 |
From: Vladimir Sementsov-Ogievskiy <vladimir.sementsov-ogievskiy@openvz.org>
Drop this simple wrapper used only in one place. We have too many graph
modifying functions even without it.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20221107163558.618889-3-vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/block.c b/block.c
index c0c1b3df91..dc761209ac 100644
--- a/block.c
+++ b/block.c
@@ -93,8 +93,6 @@ static bool bdrv_recurse_has_child(BlockDriverState *bs,
static void bdrv_replace_child_noperm(BdrvChild *child,
BlockDriverState *new_bs);
static void bdrv_remove_child(BdrvChild *child, Transaction *tran);
-static void bdrv_remove_filter_or_cow_child(BlockDriverState *bs,
- Transaction *tran);
static int bdrv_reopen_prepare(BDRVReopenState *reopen_state,
BlockReopenQueue *queue,
@@ -5065,17 +5063,6 @@ static void bdrv_remove_child(BdrvChild *child,
Transaction *tran)
tran_add(tran, &bdrv_remove_child_drv, child);
}
-/*
- * A function to remove backing-chain child of @bs if exists: cow child for
- * format nodes (always .backing) and filter child for filters (may be .file or
- * .backing)
- */
-static void bdrv_remove_filter_or_cow_child(BlockDriverState *bs,
- Transaction *tran)
-{
- bdrv_remove_child(bdrv_filter_or_cow_child(bs), tran);
-}
-
static int bdrv_replace_node_noperm(BlockDriverState *from,
BlockDriverState *to,
bool auto_skip, Transaction *tran,
@@ -5160,7 +5147,7 @@ static int bdrv_replace_node_common(BlockDriverState
*from,
}
if (detach_subchain) {
- bdrv_remove_filter_or_cow_child(to_cow_parent, tran);
+ bdrv_remove_child(bdrv_filter_or_cow_child(to_cow_parent), tran);
}
found = g_hash_table_new(NULL, NULL);
--
2.38.1
- [PULL 00/51] Block layer patches, Kevin Wolf, 2022/12/14
- [PULL 08/51] block: Remove drained_end_counter, Kevin Wolf, 2022/12/14
- [PULL 02/51] block: drop bdrv_remove_filter_or_cow_child,
Kevin Wolf <=
- [PULL 05/51] qed: Don't yield in bdrv_qed_co_drain_begin(), Kevin Wolf, 2022/12/14
- [PULL 07/51] block: Revert .bdrv_drained_begin/end to non-coroutine_fn, Kevin Wolf, 2022/12/14
- [PULL 03/51] block: bdrv_refresh_perms(): allow external tran, Kevin Wolf, 2022/12/14
- [PULL 04/51] block: refactor bdrv_list_refresh_perms to allow any list of nodes, Kevin Wolf, 2022/12/14
- [PULL 12/51] block: Don't use subtree drains in bdrv_drop_intermediate(), Kevin Wolf, 2022/12/14
- [PULL 15/51] block: Call drain callbacks only once, Kevin Wolf, 2022/12/14
- [PULL 13/51] stream: Replace subtree drain with a single node drain, Kevin Wolf, 2022/12/14
- [PULL 19/51] block: Remove poll parameter from bdrv_parent_drained_begin_single(), Kevin Wolf, 2022/12/14
- [PULL 01/51] block: Inline bdrv_detach_child(), Kevin Wolf, 2022/12/14
- [PULL 10/51] block: Fix locking for bdrv_reopen_queue_child(), Kevin Wolf, 2022/12/14