[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 03/37] block: Make bdrv_states public
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 03/37] block: Make bdrv_states public |
Date: |
Thu, 5 Nov 2015 19:17:31 +0100 |
From: Max Reitz <address@hidden>
When inserting a BDS tree into a BB, we will need to add the root BDS to
this list. Since we will want to do that in the blockdev-insert-medium
implementation in blockdev.c, we will need access to it there.
This patch is not exactly elegant, but bdrv_states will be removed in
the future anyway because we no longer need it since we have BBs.
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block.c | 3 +--
include/block/block_int.h | 2 ++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index eb8158a..a99e6d8 100644
--- a/block.c
+++ b/block.c
@@ -73,8 +73,7 @@ struct BdrvDirtyBitmap {
#define NOT_DONE 0x7fffffff /* used while emulated sync operation in progress
*/
-static QTAILQ_HEAD(, BlockDriverState) bdrv_states =
- QTAILQ_HEAD_INITIALIZER(bdrv_states);
+struct BdrvStates bdrv_states = QTAILQ_HEAD_INITIALIZER(bdrv_states);
static QTAILQ_HEAD(, BlockDriverState) graph_bdrv_states =
QTAILQ_HEAD_INITIALIZER(graph_bdrv_states);
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 3ceeb5a..6a3f64d 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -473,6 +473,8 @@ extern BlockDriver bdrv_file;
extern BlockDriver bdrv_raw;
extern BlockDriver bdrv_qcow2;
+extern QTAILQ_HEAD(BdrvStates, BlockDriverState) bdrv_states;
+
/**
* bdrv_setup_io_funcs:
*
--
1.8.3.1
- [Qemu-block] [PULL 00/37] Block layer patches, Kevin Wolf, 2015/11/05
- [Qemu-block] [PULL 02/37] block: Add blk_remove_bs(), Kevin Wolf, 2015/11/05
- [Qemu-block] [PULL 03/37] block: Make bdrv_states public,
Kevin Wolf <=
- [Qemu-block] [PULL 01/37] block: Don't call blk_bs() twice in bdrv_lookup_bs(), Kevin Wolf, 2015/11/05
- [Qemu-block] [PULL 05/37] blockdev: Add blockdev-open-tray, Kevin Wolf, 2015/11/05
- [Qemu-block] [PULL 04/37] block: Add functions for inheriting a BBRS, Kevin Wolf, 2015/11/05
- [Qemu-block] [PULL 06/37] blockdev: Add blockdev-close-tray, Kevin Wolf, 2015/11/05
- [Qemu-block] [PULL 07/37] blockdev: Add blockdev-remove-medium, Kevin Wolf, 2015/11/05
- [Qemu-block] [PULL 08/37] blockdev: Add blockdev-insert-medium, Kevin Wolf, 2015/11/05
- [Qemu-block] [PULL 10/37] blockdev: Implement change with basic operations, Kevin Wolf, 2015/11/05
- [Qemu-block] [PULL 11/37] block: Inquire tray state before tray-moved events, Kevin Wolf, 2015/11/05
- [Qemu-block] [PULL 12/37] qmp: Introduce blockdev-change-medium, Kevin Wolf, 2015/11/05
- [Qemu-block] [PULL 14/37] blockdev: read-only-mode for blockdev-change-medium, Kevin Wolf, 2015/11/05