mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
block: Mark bdrv_(un)register_buf() GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_register_buf() and bdrv_unregister_buf() need to hold a reader lock for the graph. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20230203152202.49054-21-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
79a292e5ec
commit
d9249c253c
2 changed files with 14 additions and 7 deletions
|
@ -445,9 +445,10 @@ struct BlockDriver {
|
|||
*
|
||||
* Returns: true on success, false on failure
|
||||
*/
|
||||
bool (*bdrv_register_buf)(BlockDriverState *bs, void *host, size_t size,
|
||||
Error **errp);
|
||||
void (*bdrv_unregister_buf)(BlockDriverState *bs, void *host, size_t size);
|
||||
bool GRAPH_RDLOCK_PTR (*bdrv_register_buf)(
|
||||
BlockDriverState *bs, void *host, size_t size, Error **errp);
|
||||
void GRAPH_RDLOCK_PTR (*bdrv_unregister_buf)(
|
||||
BlockDriverState *bs, void *host, size_t size);
|
||||
|
||||
/*
|
||||
* This field is modified only under the BQL, and is part of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue