block: Mark bdrv_co_block_status() and callers GRAPH_RDLOCK
commit7ff9579e60a42e253c6bbbd7ba613f19cc007259
authorKevin Wolf <kwolf@redhat.com>
Fri, 3 Feb 2023 15:21:43 +0000 (3 16:21 +0100)
committerKevin Wolf <kwolf@redhat.com>
Thu, 23 Feb 2023 18:49:07 +0000 (23 19:49 +0100)
tree32478e144a9e57f32d024c781815c31d2de8175d
parentc2b8e315162bd5d5ab30c57bcc7bbb88b3ec4d54
block: Mark bdrv_co_block_status() and callers GRAPH_RDLOCK

This adds GRAPH_RDLOCK annotations to declare that callers of
bdrv_co_block_status() need to hold a reader lock for the graph.

For some places, we know that they will hold the lock, but we don't have
the GRAPH_RDLOCK annotations yet. In this case, add assume_graph_lock()
with a FIXME comment. These places will be removed once everything is
properly annotated.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230203152202.49054-5-kwolf@redhat.com>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
14 files changed:
block/backup.c
block/block-backend.c
block/block-copy.c
block/coroutines.h
block/io.c
block/mirror.c
block/qcow.c
block/quorum.c
block/stream.c
include/block/block-copy.h
include/block/block-io.h
include/block/block_int-common.h
qemu-img.c
tests/unit/test-block-iothread.c