block: Mark bdrv_has_zero_init() and callers GRAPH_RDLOCK
commit067179868ec8cd467d9810143339e882cb60e388
authorKevin Wolf <kwolf@redhat.com>
Fri, 27 Oct 2023 15:53:11 +0000 (27 17:53 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 7 Nov 2023 18:14:19 +0000 (7 19:14 +0100)
tree54c38cedf3e8f2433846a664bbd11b01cdaa1895
parent221caadcc5129d3ec5ad9ecfd7374de0f7050316
block: Mark bdrv_has_zero_init() and callers GRAPH_RDLOCK

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

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20231027155333.420094-3-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/qcow2.c
block/raw-format.c
block/vdi.c
block/vhdx.c
block/vmdk.c
block/vpc.c
blockdev.c
include/block/block-global-state.h
include/block/block_int-common.h
qemu-img.c