diff options
author | Kevin Wolf <kwolf@redhat.com> | 2016-03-22 18:38:44 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-05-19 16:45:31 +0200 |
commit | 1f0c461b82d5ec2664ca0cfc9548f80da87a8f8a (patch) | |
tree | caa8f8dc2ec1f34ad7ffecf3f6926005f2720e8b /block.c | |
parent | 79c719b755134da3dd2ba2a63a9a7db765f68e53 (diff) |
block: Remove BlockDriverState.blk
This patch removes the remaining users of bs->blk, which will allow us
to have multiple BBs on top of a single BDS. In the meantime, all checks
that are currently in place to prevent the user from creating such
setups can be switched to bdrv_has_blk() instead of accessing BDS.blk.
Future patches can allow them and e.g. enable users to mirror to a block
device that already has a BlockBackend on it.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -2226,14 +2226,6 @@ static void change_parent_backing_link(BlockDriverState *from, { BdrvChild *c, *next; - if (from->blk) { - /* FIXME We bypass blk_set_bs(), so we need to make these updates - * manually. The root problem is not in this change function, but the - * existence of BlockDriverState.blk. */ - to->blk = from->blk; - from->blk = NULL; - } - QLIST_FOREACH_SAFE(c, &from->parents, next_parent, next) { assert(c->role != &child_backing); c->bs = to; @@ -2875,7 +2867,7 @@ const char *bdrv_get_node_name(const BlockDriverState *bs) return bs->node_name; } -static const char *bdrv_get_parent_name(const BlockDriverState *bs) +const char *bdrv_get_parent_name(const BlockDriverState *bs) { BdrvChild *c; const char *name; |