mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06: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:
parent
c0fc5123ad
commit
4026f1c4f3
17 changed files with 55 additions and 14 deletions
|
@ -99,7 +99,7 @@ BlockDriver *bdrv_probe_all(const uint8_t *buf, int buf_size,
|
|||
*/
|
||||
void bdrv_wakeup(BlockDriverState *bs);
|
||||
|
||||
const char *bdrv_get_parent_name(const BlockDriverState *bs);
|
||||
const char * GRAPH_RDLOCK bdrv_get_parent_name(const BlockDriverState *bs);
|
||||
bool blk_dev_has_tray(BlockBackend *blk);
|
||||
bool blk_dev_is_tray_open(BlockBackend *blk);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue