qcow2: Don't call bdrv_getlength() in coroutine_fns
commit0050c163ff6d8167e07c9fc4be7f728316140cb6
authorKevin Wolf <kwolf@redhat.com>
Thu, 4 May 2023 11:57:31 +0000 (4 13:57 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 10 May 2023 12:16:53 +0000 (10 14:16 +0200)
tree142b9df901980625171517d9a024676fa61edf31
parent6dab4c93ecfae48e2e67b984d1032c1e988d3005
qcow2: Don't call bdrv_getlength() in coroutine_fns

There is a bdrv_co_getlength() now, which should be used in coroutine
context.

This requires adding GRAPH_RDLOCK to some functions so that this still
compiles with TSA because bdrv_co_getlength() is GRAPH_RDLOCK.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-2-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-refcount.c
block/qcow2.c
block/qcow2.h