block: Mark bdrv_(un)freeze_backing_chain() and callers GRAPH_RDLOCK
commit9275fc72bd0a1c35e915e4991c7d27209ecab923
authorKevin Wolf <kwolf@redhat.com>
Fri, 27 Oct 2023 15:53:18 +0000 (27 17:53 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 7 Nov 2023 18:14:19 +0000 (7 19:14 +0100)
tree36e8c741bc89c5db065e8c91dc11b4a7a6fd9136
parentad74751fc0ffdad7678224df0e752689ebb3f4b7
block: Mark bdrv_(un)freeze_backing_chain() and callers GRAPH_RDLOCK

This adds GRAPH_RDLOCK annotations to declare that callers of
bdrv_(un)freeze_backing_chain() need to hold a reader lock for the
graph because it calls bdrv_filter_or_cow_child(), which accesses
bs->file/backing.

Use the opportunity to make bdrv_is_backing_chain_frozen() static, it
has no external callers.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20231027155333.420094-10-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/commit.c
block/copy-on-read.c
block/copy-on-read.h
block/mirror.c
block/stream.c
include/block/block-global-state.h