]> git.proxmox.com Git - mirror_qemu.git/commit
block: GRAPH_RDLOCK for functions only called by co_wrappers
authorKevin Wolf <kwolf@redhat.com>
Wed, 7 Dec 2022 13:18:38 +0000 (14:18 +0100)
committerKevin Wolf <kwolf@redhat.com>
Thu, 15 Dec 2022 15:08:23 +0000 (16:08 +0100)
commit1b3ff9feb942c2ad0b01ac931e99ad451ab0ef39
tree858cc22574ca231ebc61c3e1cc90bcb69097d210
parent90830f595062ecf0d2c96049f5e01f3d37a2107f
block: GRAPH_RDLOCK for functions only called by co_wrappers

The generated coroutine wrappers already take care to take the lock in
the non-coroutine path, and assume that the lock is already taken in the
coroutine path.

The only thing we need to do for the wrapped function is adding the
GRAPH_RDLOCK annotation. Doing so also allows us to mark the
corresponding callbacks in BlockDriver as GRAPH_RDLOCK_PTR.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221207131838.239125-19-kwolf@redhat.com>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/coroutines.h
block/io.c
include/block/block_int-common.h