[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/24] qcow: manually add more coroutine_fn annotations
From: |
Paolo Bonzini |
Subject: |
[PATCH 11/24] qcow: manually add more coroutine_fn annotations |
Date: |
Thu, 13 Oct 2022 14:36:58 +0200 |
get_cluster_offset() and decompress_cluster() are only called from
the read and write paths.
The validity of these was double-checked with Alberto Faria's static analyzer.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
block/qcow.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/block/qcow.c b/block/qcow.c
index 311aaa8705..7f07c00c0f 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -92,7 +92,7 @@ typedef struct BDRVQcowState {
static QemuOptsList qcow_create_opts;
-static int decompress_cluster(BlockDriverState *bs, uint64_t cluster_offset);
+static int coroutine_fn decompress_cluster(BlockDriverState *bs, uint64_t
cluster_offset);
static int qcow_probe(const uint8_t *buf, int buf_size, const char *filename)
{
@@ -351,10 +351,10 @@ static int qcow_reopen_prepare(BDRVReopenState *state,
* return 0 if not allocated, 1 if *result is assigned, and negative
* errno on failure.
*/
-static int get_cluster_offset(BlockDriverState *bs,
- uint64_t offset, int allocate,
- int compressed_size,
- int n_start, int n_end, uint64_t *result)
+static int coroutine_fn get_cluster_offset(BlockDriverState *bs,
+ uint64_t offset, int allocate,
+ int compressed_size,
+ int n_start, int n_end, uint64_t
*result)
{
BDRVQcowState *s = bs->opaque;
int min_index, i, j, l1_index, l2_index, ret;
@@ -585,7 +585,7 @@ static int decompress_buffer(uint8_t *out_buf, int
out_buf_size,
return 0;
}
-static int decompress_cluster(BlockDriverState *bs, uint64_t cluster_offset)
+static int coroutine_fn decompress_cluster(BlockDriverState *bs, uint64_t
cluster_offset)
{
BDRVQcowState *s = bs->opaque;
int ret, csize;
--
2.37.3
- [PATCH 08/24] block: add missing coroutine_fn annotation to BlockDriverState callbacks, (continued)
- [PATCH 08/24] block: add missing coroutine_fn annotation to BlockDriverState callbacks, Paolo Bonzini, 2022/10/13
- [PATCH 06/24] coroutine-lock: add missing coroutine_fn annotation to prototypes, Paolo Bonzini, 2022/10/13
- [PATCH 07/24] coroutine-io: add missing coroutine_fn annotation to prototypes, Paolo Bonzini, 2022/10/13
- [PATCH 09/24] qcow2: add coroutine_fn annotation for indirect-called functions, Paolo Bonzini, 2022/10/13
- [PATCH 10/24] blkdebug: add missing coroutine_fn annotation for indirect-called functions, Paolo Bonzini, 2022/10/13
- [PATCH 12/24] qcow2: manually add more coroutine_fn annotations, Paolo Bonzini, 2022/10/13
- [PATCH 15/24] block: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 13/24] vmdk: manually add more coroutine_fn annotations, Paolo Bonzini, 2022/10/13
- [PATCH 22/24] vhdx: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 14/24] commit: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 11/24] qcow: manually add more coroutine_fn annotations,
Paolo Bonzini <=
- [PATCH 21/24] vdi: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 19/24] qcow2: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 24/24] monitor: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 17/24] parallels: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 16/24] mirror: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 23/24] vmdk: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 18/24] qcow: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 20/24] qed: switch to *_co_* functions, Paolo Bonzini, 2022/10/13