[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 12/31] block: Remove bdrv_move_feature_fields()
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 12/31] block: Remove bdrv_move_feature_fields() |
Date: |
Thu, 19 May 2016 17:21:50 +0200 |
bdrv_move_feature_fields() and swap_feature_fields() are empty now, they
can be removed.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
---
block.c | 30 ------------------------------
1 file changed, 30 deletions(-)
diff --git a/block.c b/block.c
index 98226fe..39f14c7 100644
--- a/block.c
+++ b/block.c
@@ -2210,13 +2210,6 @@ void bdrv_close_all(void)
}
}
-/* Fields that need to stay with the top-level BDS */
-static void bdrv_move_feature_fields(BlockDriverState *bs_dest,
- BlockDriverState *bs_src)
-{
- /* move some fields that need to stay attached to the device */
-}
-
static void change_parent_backing_link(BlockDriverState *from,
BlockDriverState *to)
{
@@ -2240,16 +2233,6 @@ static void change_parent_backing_link(BlockDriverState
*from,
}
}
-static void swap_feature_fields(BlockDriverState *bs_top,
- BlockDriverState *bs_new)
-{
- BlockDriverState tmp;
-
- bdrv_move_feature_fields(&tmp, bs_top);
- bdrv_move_feature_fields(bs_top, bs_new);
- bdrv_move_feature_fields(bs_new, &tmp);
-}
-
/*
* Add new bs contents at the top of an image chain while the chain is
* live, while keeping required fields on the top layer.
@@ -2273,9 +2256,6 @@ void bdrv_append(BlockDriverState *bs_new,
BlockDriverState *bs_top)
bdrv_ref(bs_top);
- /* Some fields always stay on top of the backing file chain */
- swap_feature_fields(bs_top, bs_new);
-
change_parent_backing_link(bs_top, bs_new);
bdrv_set_backing_hd(bs_new, bs_top);
bdrv_unref(bs_top);
@@ -2292,16 +2272,6 @@ void bdrv_replace_in_backing_chain(BlockDriverState
*old, BlockDriverState *new)
bdrv_ref(old);
- if (old->blk) {
- /* As long as these fields aren't in BlockBackend, but in the top-level
- * BlockDriverState, it's not possible for a BDS to have two BBs.
- *
- * We really want to copy the fields from old to new, but we go for a
- * swap instead so that pointers aren't duplicated and cause trouble.
- * (Also, bdrv_swap() used to do the same.) */
- assert(!new->blk);
- swap_feature_fields(old, new);
- }
change_parent_backing_link(old, new);
/* Change backing files if a previously independent node is added to the
--
1.8.3.1
- [Qemu-block] [PULL 06/31] block: Move actual I/O throttling to BlockBackend, (continued)
- [Qemu-block] [PULL 06/31] block: Move actual I/O throttling to BlockBackend, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 01/31] block: Make sure throttled BDSes always have a BB, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 02/31] block: Introduce BlockBackendPublic, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 04/31] block: Convert throttle_group_get_name() to BlockBackend, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 03/31] block: throttle-groups: Use BlockBackend pointers internally, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 08/31] block: Introduce BdrvChild.opaque, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 07/31] block: Move I/O throttling configuration functions to BlockBackend, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 14/31] block: Don't check throttled reqs in bdrv_requests_pending(), Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 09/31] block: Drain throttling queue with BdrvChild callback, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 10/31] block/io: Quiesce parents between drained_begin/end, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 12/31] block: Remove bdrv_move_feature_fields(),
Kevin Wolf <=
- [Qemu-block] [PULL 05/31] block: Move throttling fields from BDS to BB, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 16/31] block: User BdrvChild callback for device name, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 15/31] block: Use BdrvChild callbacks for change_media/resize, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 18/31] blockjob: Don't touch BDS iostatus, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 11/31] block: Decouple throttling from BlockDriverState, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 17/31] blockjob: Don't set iostatus of target, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 19/31] block: Remove bdrv_aio_multiwrite(), Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 13/31] Revert "block: Forbid I/O throttling on nodes with multiple parents for 2.6", Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 26/31] qcow2: Fix write_zeroes with partially allocated backing file cluster, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 20/31] block: Add bdrv_has_blk(), Kevin Wolf, 2016/05/19