summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-03-22 18:38:44 +0100
committerKevin Wolf <kwolf@redhat.com>2016-05-19 16:45:31 +0200
commit1f0c461b82d5ec2664ca0cfc9548f80da87a8f8a (patch)
treecaa8f8dc2ec1f34ad7ffecf3f6926005f2720e8b /include
parent79c719b755134da3dd2ba2a63a9a7db765f68e53 (diff)
downloadfocaccia-qemu-1f0c461b82d5ec2664ca0cfc9548f80da87a8f8a.tar.gz
focaccia-qemu-1f0c461b82d5ec2664ca0cfc9548f80da87a8f8a.zip
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 'include')
-rw-r--r--include/block/block_int.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 80e2da519a..b6f4755725 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -418,8 +418,6 @@ struct BlockDriverState {
     BlockDriver *drv; /* NULL means no media */
     void *opaque;
 
-    BlockBackend *blk;          /* owning backend, if any */
-
     AioContext *aio_context; /* event loop used for fd handlers, timers, etc */
     /* long-running tasks intended to always use the same AioContext as this
      * BDS may register themselves in this list to be notified of changes
@@ -724,6 +722,7 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs,
                                   const BdrvChildRole *child_role);
 void bdrv_root_unref_child(BdrvChild *child);
 
+const char *bdrv_get_parent_name(const 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);