aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2015-06-16 14:19:22 +0200
committerKevin Wolf <kwolf@redhat.com>2015-10-16 15:34:29 +0200
commit9a4f4c31563b96a075f3deae83e72c726e0c84f8 (patch)
treefff2c5ee459c07b728c452f8afbe6412bd29611c /include
parent0bd6e91a7e00129764afb9bed83ae5519e18a111 (diff)
downloadqemu-9a4f4c31563b96a075f3deae83e72c726e0c84f8.zip
qemu-9a4f4c31563b96a075f3deae83e72c726e0c84f8.tar.gz
qemu-9a4f4c31563b96a075f3deae83e72c726e0c84f8.tar.bz2
block: Convert bs->file to BdrvChild
This patch removes the temporary duplication between bs->file and bs->file_child by converting everything to BdrvChild. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/block/block.h8
-rw-r--r--include/block/block_int.h3
2 files changed, 8 insertions, 3 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 2dd6630..c5d9620 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -585,7 +585,13 @@ typedef enum {
BLKDBG_EVENT_MAX,
} BlkDebugEvent;
-#define BLKDBG_EVENT(bs, evt) bdrv_debug_event(bs, evt)
+#define BLKDBG_EVENT(child, evt) \
+ do { \
+ if (child) { \
+ bdrv_debug_event(child->bs, evt); \
+ } \
+ } while (0)
+
void bdrv_debug_event(BlockDriverState *bs, BlkDebugEvent event);
int bdrv_debug_breakpoint(BlockDriverState *bs, const char *event,
diff --git a/include/block/block_int.h b/include/block/block_int.h
index d0dd93e..98936c9 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -380,8 +380,7 @@ struct BlockDriverState {
BlockDriverState *backing_hd;
BdrvChild *backing_child;
- BlockDriverState *file;
- BdrvChild *file_child;
+ BdrvChild *file;
NotifierList close_notifiers;