aboutsummaryrefslogtreecommitdiff
path: root/block/qed.c
diff options
context:
space:
mode:
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>2023-01-13 21:42:06 +0100
committerKevin Wolf <kwolf@redhat.com>2023-02-01 16:52:32 +0100
commitbd53086e824397a7bf0e875eaa9b339cf8394d75 (patch)
treed889faddc024078e45f0d7a72a8389d59e1da0da /block/qed.c
parentd886257d84dd7c3d3f04c3b1e2e4749b47541ee5 (diff)
downloadqemu-bd53086e824397a7bf0e875eaa9b339cf8394d75.zip
qemu-bd53086e824397a7bf0e875eaa9b339cf8394d75.tar.gz
qemu-bd53086e824397a7bf0e875eaa9b339cf8394d75.tar.bz2
block: use bdrv_co_refresh_total_sectors when possible
In some places we are sure we are always running in a coroutine, therefore it's useless to call the generated_co_wrapper, instead call directly the _co_ function. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20230113204212.359076-9-kwolf@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qed.c')
-rw-r--r--block/qed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qed.c b/block/qed.c
index c8f9045..16bf0cb 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -424,7 +424,7 @@ static int coroutine_fn bdrv_qed_do_open(BlockDriverState *bs, QDict *options,
}
/* Round down file size to the last cluster */
- file_size = bdrv_getlength(bs->file->bs);
+ file_size = bdrv_co_getlength(bs->file->bs);
if (file_size < 0) {
error_setg(errp, "Failed to get file length");
return file_size;