]> git.ipfire.org Git - thirdparty/qemu.git/commit
blkverify: Add locking for request_fn
authorKevin Wolf <kwolf@redhat.com>
Fri, 27 Oct 2023 15:53:27 +0000 (17:53 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 8 Nov 2023 16:56:17 +0000 (17:56 +0100)
commit244b26d259bc56097b2d82690847cb7657e22830
tree0471f52374e62ed91513436df99ebcb2fba458b6
parent004915a96a7a40e942ac85e6d22518cbcd283506
blkverify: Add locking for request_fn

This is either bdrv_co_preadv() or bdrv_co_pwritev() which both need to
have the graph locked. Annotate the function pointer accordingly and add
locking to its callers.

This shouldn't actually have resulted in a bug because the graph lock is
already held by blkverify_co_prwv(), which waits for the coroutines to
terminate. Annotate with GRAPH_RDLOCK as well to make this clearer.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20231027155333.420094-19-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/blkverify.c