From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw9cO-0000cm-UX for qemu-devel@nongnu.org; Tue, 10 Nov 2015 09:09:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zw9cN-0003rL-Mg for qemu-devel@nongnu.org; Tue, 10 Nov 2015 09:09:52 -0500 From: Kevin Wolf Date: Tue, 10 Nov 2015 15:09:03 +0100 Message-Id: <1447164580-31094-4-git-send-email-kwolf@redhat.com> In-Reply-To: <1447164580-31094-1-git-send-email-kwolf@redhat.com> References: <1447164580-31094-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL v2 03/40] block: Make bdrv_states public List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Max Reitz 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 Reviewed-by: Alberto Garcia Signed-off-by: Kevin Wolf --- 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