aboutsummaryrefslogtreecommitdiff
path: root/include/block/block_int-common.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2023-02-03 16:21:56 +0100
committerKevin Wolf <kwolf@redhat.com>2023-02-23 19:49:24 +0100
commitc38270692593602c4f57449c802c6cbfc16c6108 (patch)
tree1767bb318883c5ed320e958d3369c5799676a8a5 /include/block/block_int-common.h
parent4ec8df0183d0906ae6704d65ef6d8082c970ecdf (diff)
downloadqemu-c38270692593602c4f57449c802c6cbfc16c6108.zip
qemu-c38270692593602c4f57449c802c6cbfc16c6108.tar.gz
qemu-c38270692593602c4f57449c802c6cbfc16c6108.tar.bz2
block: Mark bdrv_co_io_(un)plug() and callers GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_co_io_plug() and bdrv_co_io_unplug() need to hold a reader lock for the graph. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20230203152202.49054-18-kwolf@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block/block_int-common.h')
-rw-r--r--include/block/block_int-common.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h
index 6b8fd22..61f894b 100644
--- a/include/block/block_int-common.h
+++ b/include/block/block_int-common.h
@@ -735,8 +735,9 @@ struct BlockDriver {
BlkdebugEvent event);
/* io queue for linux-aio */
- void coroutine_fn (*bdrv_co_io_plug)(BlockDriverState *bs);
- void coroutine_fn (*bdrv_co_io_unplug)(BlockDriverState *bs);
+ void coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_io_plug)(BlockDriverState *bs);
+ void coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_io_unplug)(
+ BlockDriverState *bs);
/**
* bdrv_drain_begin is called if implemented in the beginning of a