* [Qemu-devel] [PATCH] block: Remove blk_set_bs()
@ 2016-03-22 12:55 Kevin Wolf
2016-03-22 16:05 ` Eric Blake
0 siblings, 1 reply; 2+ messages in thread
From: Kevin Wolf @ 2016-03-22 12:55 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, qemu-devel
The function is unused since commit f21d96d0 ('block: Use BdrvChild in
BlockBackend').
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/block-backend.c | 17 -----------------
include/block/block_int.h | 2 --
2 files changed, 19 deletions(-)
diff --git a/block/block-backend.c b/block/block-backend.c
index dca21d1..4b44d46 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -371,23 +371,6 @@ BlockDriverState *blk_bs(BlockBackend *blk)
}
/*
- * Changes the BlockDriverState attached to @blk
- */
-void blk_set_bs(BlockBackend *blk, BlockDriverState *bs)
-{
- bdrv_ref(bs);
-
- if (blk->root) {
- blk->root->bs->blk = NULL;
- bdrv_root_unref_child(blk->root);
- }
- assert(bs->blk == NULL);
-
- blk->root = bdrv_root_attach_child(bs, "root", &child_root);
- bs->blk = blk;
-}
-
-/*
* Return @blk's DriveInfo if any, else null.
*/
DriveInfo *blk_legacy_dinfo(BlockBackend *blk)
diff --git a/include/block/block_int.h b/include/block/block_int.h
index ba6e9ac..a33b0de 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -704,8 +704,6 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs,
const BdrvChildRole *child_role);
void bdrv_root_unref_child(BdrvChild *child);
-void blk_set_bs(BlockBackend *blk, BlockDriverState *bs);
-
void blk_dev_change_media_cb(BlockBackend *blk, bool load);
bool blk_dev_has_removable_media(BlockBackend *blk);
bool blk_dev_has_tray(BlockBackend *blk);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Remove blk_set_bs()
2016-03-22 12:55 [Qemu-devel] [PATCH] block: Remove blk_set_bs() Kevin Wolf
@ 2016-03-22 16:05 ` Eric Blake
0 siblings, 0 replies; 2+ messages in thread
From: Eric Blake @ 2016-03-22 16:05 UTC (permalink / raw)
To: Kevin Wolf, qemu-block; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 481 bytes --]
On 03/22/2016 06:55 AM, Kevin Wolf wrote:
> The function is unused since commit f21d96d0 ('block: Use BdrvChild in
> BlockBackend').
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block/block-backend.c | 17 -----------------
> include/block/block_int.h | 2 --
> 2 files changed, 19 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-22 16:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-22 12:55 [Qemu-devel] [PATCH] block: Remove blk_set_bs() Kevin Wolf
2016-03-22 16:05 ` Eric Blake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).