]> git.proxmox.com Git - mirror_qemu.git/commit - block.c
qcow2: Mark qcow2_signal_corruption() and callers GRAPH_RDLOCK
authorKevin Wolf <kwolf@redhat.com>
Fri, 29 Sep 2023 14:51:49 +0000 (16:51 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 12 Oct 2023 14:31:33 +0000 (16:31 +0200)
commit0bb79c97fd8e355aca433f4331d7d45e7e72b4b6
treef3fe385db7fe95942384ecc382ee644962b7a45d
parentbd131d6705b6996f2cdccee3db017af570ce91ad
qcow2: Mark qcow2_signal_corruption() and callers GRAPH_RDLOCK

This adds GRAPH_RDLOCK annotations to declare that callers of
qcow2_signal_corruption() need to hold a reader lock for the graph
because it calls bdrv_get_node_name(), which accesses the parents list
of a node.

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: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20230929145157.45443-15-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/block-backend.c
block/qcow2-bitmap.c
block/qcow2-cache.c
block/qcow2-cluster.c
block/qcow2-refcount.c
block/qcow2.c
block/qcow2.h
block/replication.c
include/block/block-global-state.h
include/block/block_int-common.h