block: Remove blk_set_bs()
PATCH 1/1 block: Remove blk_set_bs()
The function is unused since commit f21d96d0 ('block: Use BdrvChild in BlockBackend').
Signed-off-by Kevin Wolf <[email protected]>
--- block/block-backend.c | 17 ----------------- include/block/block_int.h | 2 -- 2 files changed, 19 deletions(-)
block/block-backend.c +0 -17
@@ -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)
include/block/block_int.h +0 -2
@@ -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);
Signature · 1 line
1.8.3.1
Quoted 8 lines · Kevin Wolf
The function is unused since commit
f21d96d0('block: Use BdrvChild in BlockBackend').Signed-off-by Kevin Wolf <[email protected]>--- block/block-backend.c | 17 ----------------- include/block/block_int.h | 2 -- 2 files changed, 19 deletions(-)
Reviewed-by Eric Blake <[email protected]>
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org