mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
block: Mark bdrv_get_parent_name() and callers GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_get_parent_name() need to hold a reader lock for the graph because it accesses the parents list of a node. For some places, we know that they will hold the lock, but we don't have the GRAPH_RDLOCK annotations yet. In this case, add assume_graph_lock() with a FIXME comment. These places will be removed once everything is properly annotated. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20230929145157.45443-13-kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
@@ -33,9 +33,10 @@ BlockDeviceInfo * GRAPH_RDLOCK
|
||||
bdrv_block_device_info(BlockBackend *blk, BlockDriverState *bs,
|
||||
bool flat, Error **errp);
|
||||
|
||||
int bdrv_query_snapshot_info_list(BlockDriverState *bs,
|
||||
SnapshotInfoList **p_list,
|
||||
Error **errp);
|
||||
int GRAPH_RDLOCK
|
||||
bdrv_query_snapshot_info_list(BlockDriverState *bs,
|
||||
SnapshotInfoList **p_list,
|
||||
Error **errp);
|
||||
void GRAPH_RDLOCK
|
||||
bdrv_query_image_info(BlockDriverState *bs, ImageInfo **p_info, bool flat,
|
||||
bool skip_implicit_filters, Error **errp);
|
||||
|
||||
Reference in New Issue
Block a user