From a00e70c01241590b6c80dca4ee39b9de0b10097e Mon Sep 17 00:00:00 2001 From: Emanuele Giuseppe Esposito Date: Thu, 4 May 2023 13:57:44 +0200 Subject: block: Mark bdrv_co_get_info() and callers GRAPH_RDLOCK This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_co_get_info() need to hold a reader lock for the graph. Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Message-Id: <20230504115750.54437-15-kwolf@redhat.com> Signed-off-by: Kevin Wolf --- include/block/block-io.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/block/block-io.h') diff --git a/include/block/block-io.h b/include/block/block-io.h index fb2adb31c7..bba7f957e1 100644 --- a/include/block/block-io.h +++ b/include/block/block-io.h @@ -167,8 +167,11 @@ const char *bdrv_get_node_name(const BlockDriverState *bs); const char *bdrv_get_device_name(const BlockDriverState *bs); const char *bdrv_get_device_or_node_name(const BlockDriverState *bs); -int coroutine_fn bdrv_co_get_info(BlockDriverState *bs, BlockDriverInfo *bdi); -int co_wrapper_mixed bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi); +int coroutine_fn GRAPH_RDLOCK +bdrv_co_get_info(BlockDriverState *bs, BlockDriverInfo *bdi); + +int co_wrapper_mixed_bdrv_rdlock +bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi); ImageInfoSpecific *bdrv_get_specific_info(BlockDriverState *bs, Error **errp); -- cgit v1.2.3