block: Remove blk_set_bs()

The function is unused since commit f21d96d0 ('block: Use BdrvChild in
BlockBackend').

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Kevin Wolf 2016-03-22 13:54:08 +01:00
parent d0855f1235
commit 72f41b6fbd
2 changed files with 0 additions and 19 deletions

View File

@ -371,23 +371,6 @@ BlockDriverState *blk_bs(BlockBackend *blk)
return blk->root ? blk->root->bs : NULL;
}
/*
* 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.
*/

View File

@ -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);