From bd53086e824397a7bf0e875eaa9b339cf8394d75 Mon Sep 17 00:00:00 2001 From: Emanuele Giuseppe Esposito Date: Fri, 13 Jan 2023 21:42:06 +0100 Subject: 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 Signed-off-by: Kevin Wolf Message-Id: <20230113204212.359076-9-kwolf@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf --- block/qed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/qed.c') diff --git a/block/qed.c b/block/qed.c index c8f9045b72..16bf0cb080 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; -- cgit v1.2.3