diff options
author | Kevin Wolf <kwolf@redhat.com> | 2023-02-03 16:21:56 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-02-23 19:49:24 +0100 |
commit | c38270692593602c4f57449c802c6cbfc16c6108 (patch) | |
tree | 1767bb318883c5ed320e958d3369c5799676a8a5 /block/io.c | |
parent | 4ec8df0183d0906ae6704d65ef6d8082c970ecdf (diff) | |
download | qemu-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 'block/io.c')
-rw-r--r-- | block/io.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -3153,6 +3153,7 @@ void coroutine_fn bdrv_co_io_plug(BlockDriverState *bs) { BdrvChild *child; IO_CODE(); + assert_bdrv_graph_readable(); QLIST_FOREACH(child, &bs->children, next) { bdrv_co_io_plug(child->bs); @@ -3170,6 +3171,7 @@ void coroutine_fn bdrv_co_io_unplug(BlockDriverState *bs) { BdrvChild *child; IO_CODE(); + assert_bdrv_graph_readable(); assert(bs->io_plugged); if (qatomic_fetch_dec(&bs->io_plugged) == 1) { |