From de335638a399b614d510b978b5c6d1b237e0ac79 Mon Sep 17 00:00:00 2001 From: Emanuele Giuseppe Esposito Date: Thu, 4 May 2023 13:57:43 +0200 Subject: block: Mark bdrv_co_get_allocated_file_size() and callers GRAPH_RDLOCK This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_co_get_allocated_file_size() need to hold a reader lock for the graph. Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Message-Id: <20230504115750.54437-14-kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- include/block/block_int-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/block/block_int-common.h') diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h index 6fb28cd8fa..6e0365d8f2 100644 --- a/include/block/block_int-common.h +++ b/include/block/block_int-common.h @@ -685,7 +685,7 @@ struct BlockDriver { int64_t coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_getlength)( BlockDriverState *bs); - int64_t coroutine_fn (*bdrv_co_get_allocated_file_size)( + int64_t coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_get_allocated_file_size)( BlockDriverState *bs); BlockMeasureInfo *(*bdrv_measure)(QemuOpts *opts, BlockDriverState *in_bs, -- cgit v1.2.3