]> git.proxmox.com Git - mirror_qemu.git/commit - block/crypto.c
block: Convert bdrv_get_info() to co_wrapper_mixed
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>
Fri, 13 Jan 2023 20:42:08 +0000 (21:42 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 1 Feb 2023 15:52:32 +0000 (16:52 +0100)
commit3d47eb0a2a42b13734d1beb75c4310b3881f906f
treedccfa2e6cac772fe8c38cecca7d69c077c89d90d
parent82618d7bc341cb93b9ce9c206d7ec84cebe83d00
block: Convert bdrv_get_info() to co_wrapper_mixed

bdrv_get_info() is categorized as an I/O function, and it currently
doesn't run in a coroutine. We should let it take a graph rdlock since
it traverses the block nodes graph, which however is only possible in a
coroutine.

Therefore turn it into a co_wrapper to move the actual function into a
coroutine where the lock can be taken.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230113204212.359076-11-kwolf@redhat.com>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
18 files changed:
block.c
block/blkio.c
block/crypto.c
block/file-posix.c
block/io.c
block/iscsi.c
block/mirror.c
block/qcow.c
block/qcow2.c
block/qed.c
block/raw-format.c
block/rbd.c
block/vdi.c
block/vhdx.c
block/vmdk.c
block/vpc.c
include/block/block-io.h
include/block/block_int-common.h