mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
block: Mark bdrv_co_eject/lock_medium() and callers GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_co_eject() and bdrv_co_lock_medium() need to hold a reader lock for the graph. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20230203152202.49054-20-kwolf@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
c73ff92c9d
commit
79a292e5ec
7 changed files with 23 additions and 10 deletions
|
@ -714,8 +714,10 @@ struct BlockDriver {
|
|||
/* removable device specific */
|
||||
bool coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_is_inserted)(
|
||||
BlockDriverState *bs);
|
||||
void coroutine_fn (*bdrv_co_eject)(BlockDriverState *bs, bool eject_flag);
|
||||
void coroutine_fn (*bdrv_co_lock_medium)(BlockDriverState *bs, bool locked);
|
||||
void coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_eject)(
|
||||
BlockDriverState *bs, bool eject_flag);
|
||||
void coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_lock_medium)(
|
||||
BlockDriverState *bs, bool locked);
|
||||
|
||||
/* to control generic scsi devices */
|
||||
BlockAIOCB *coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_aio_ioctl)(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue