aboutsummaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2023-05-04 13:57:48 +0200
committerKevin Wolf <kwolf@redhat.com>2023-05-10 14:16:54 +0200
commit4f0bef8b36eb33efbba0a216b233265d734bdbfb (patch)
treeb995bdf9d339ce44b3246a06f24793c84baae3d4 /include/block
parent6ec75a6a3ed9d6ff3161d1f97c497909906495bd (diff)
downloadqemu-4f0bef8b36eb33efbba0a216b233265d734bdbfb.zip
qemu-4f0bef8b36eb33efbba0a216b233265d734bdbfb.tar.gz
qemu-4f0bef8b36eb33efbba0a216b233265d734bdbfb.tar.bz2
block: Mark bdrv_query_block_graph_info() and callers GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_query_block_graph_info() need to hold a reader lock for the graph because it accesses the children list of a node. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20230504115750.54437-19-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/qapi.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/block/qapi.h b/include/block/qapi.h
index 8773b9b..18d48dd 100644
--- a/include/block/qapi.h
+++ b/include/block/qapi.h
@@ -25,6 +25,7 @@
#ifndef BLOCK_QAPI_H
#define BLOCK_QAPI_H
+#include "block/graph-lock.h"
#include "block/snapshot.h"
#include "qapi/qapi-types-block-core.h"
@@ -43,9 +44,9 @@ void bdrv_query_image_info(BlockDriverState *bs,
bool flat,
bool skip_implicit_filters,
Error **errp);
-void bdrv_query_block_graph_info(BlockDriverState *bs,
- BlockGraphInfo **p_info,
- Error **errp);
+void GRAPH_RDLOCK
+bdrv_query_block_graph_info(BlockDriverState *bs, BlockGraphInfo **p_info,
+ Error **errp);
void bdrv_snapshot_dump(QEMUSnapshotInfo *sn);
void bdrv_image_info_specific_dump(ImageInfoSpecific *info_spec,