]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2-snapshot.c
qcow2: mark various functions as coroutine_fn and GRAPH_RDLOCK
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 9 Mar 2023 08:44:55 +0000 (09:44 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 25 Apr 2023 11:17:28 +0000 (13:17 +0200)
commita39bae4ecd61e9c62c7759ff41b00efbb39de46e
tree9781c68ec7c48c0aede375f8c3685abec31ba6b7
parent10bf10a8e30663ba59ad31918eaa0b9ee3885fac
qcow2: mark various functions as coroutine_fn and GRAPH_RDLOCK

Functions that can do I/O (including calling bdrv_is_allocated
and bdrv_block_status functions) are prime candidates for being
coroutine_fns.  Make the change for those that are themselves called
only from coroutine_fns.  Also annotate that they are called with the
graph rdlock taken, thus allowing them to call bdrv_co_*() functions
for I/O.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20230309084456.304669-9-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-bitmap.c
block/qcow2-cluster.c
block/qcow2-refcount.c
block/qcow2-snapshot.c
block/qcow2.c
block/qcow2.h