mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
block: Mark bdrv_*_dirty_bitmap() and callers GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_*_dirty_bitmap() need to hold a reader lock for the graph. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20230203152202.49054-23-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
48aef79440
commit
167f748d8c
4 changed files with 18 additions and 16 deletions
|
@ -394,6 +394,7 @@ int coroutine_fn
|
|||
bdrv_co_remove_persistent_dirty_bitmap(BlockDriverState *bs, const char *name,
|
||||
Error **errp)
|
||||
{
|
||||
assert_bdrv_graph_readable();
|
||||
if (bs->drv && bs->drv->bdrv_co_remove_persistent_dirty_bitmap) {
|
||||
return bs->drv->bdrv_co_remove_persistent_dirty_bitmap(bs, name, errp);
|
||||
}
|
||||
|
@ -415,6 +416,7 @@ bdrv_co_can_store_new_dirty_bitmap(BlockDriverState *bs, const char *name,
|
|||
uint32_t granularity, Error **errp)
|
||||
{
|
||||
BlockDriver *drv = bs->drv;
|
||||
assert_bdrv_graph_readable();
|
||||
|
||||
if (!drv) {
|
||||
error_setg_errno(errp, ENOMEDIUM,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue