mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
block: Mark bdrv_refresh_filename() and callers GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_refresh_filename() 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> Message-ID: <20230929145157.45443-11-kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
@@ -132,7 +132,7 @@ int bdrv_reopen_set_read_only(BlockDriverState *bs, bool read_only,
|
||||
Error **errp);
|
||||
BlockDriverState *bdrv_find_backing_image(BlockDriverState *bs,
|
||||
const char *backing_file);
|
||||
void bdrv_refresh_filename(BlockDriverState *bs);
|
||||
void GRAPH_RDLOCK bdrv_refresh_filename(BlockDriverState *bs);
|
||||
|
||||
void GRAPH_RDLOCK
|
||||
bdrv_refresh_limits(BlockDriverState *bs, Transaction *tran, Error **errp);
|
||||
@@ -216,8 +216,11 @@ void bdrv_next_cleanup(BdrvNextIterator *it);
|
||||
BlockDriverState *bdrv_next_monitor_owned(BlockDriverState *bs);
|
||||
void bdrv_iterate_format(void (*it)(void *opaque, const char *name),
|
||||
void *opaque, bool read_only);
|
||||
char *bdrv_get_full_backing_filename(BlockDriverState *bs, Error **errp);
|
||||
char *bdrv_dirname(BlockDriverState *bs, Error **errp);
|
||||
|
||||
char * GRAPH_RDLOCK
|
||||
bdrv_get_full_backing_filename(BlockDriverState *bs, Error **errp);
|
||||
|
||||
char * GRAPH_RDLOCK bdrv_dirname(BlockDriverState *bs, Error **errp);
|
||||
|
||||
void bdrv_img_create(const char *filename, const char *fmt,
|
||||
const char *base_filename, const char *base_fmt,
|
||||
|
||||
Reference in New Issue
Block a user