[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 20/24] qed: switch to *_co_* functions
From: |
Paolo Bonzini |
Subject: |
[PATCH 20/24] qed: switch to *_co_* functions |
Date: |
Thu, 13 Oct 2022 14:37:07 +0200 |
From: Alberto Faria <afaria@redhat.com>
Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
block/qed-table.c | 2 +-
block/qed.c | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/block/qed-table.c b/block/qed-table.c
index 1cc844b1a5..aa203f2627 100644
--- a/block/qed-table.c
+++ b/block/qed-table.c
@@ -100,7 +100,7 @@ static int coroutine_fn qed_write_table(BDRVQEDState *s,
uint64_t offset,
}
if (flush) {
- ret = bdrv_flush(s->bs);
+ ret = bdrv_co_flush(s->bs);
if (ret < 0) {
goto out;
}
diff --git a/block/qed.c b/block/qed.c
index bda00e6257..90682f7a15 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -387,7 +387,7 @@ static int coroutine_fn bdrv_qed_do_open(BlockDriverState
*bs, QDict *options,
int64_t file_size;
int ret;
- ret = bdrv_pread(bs->file, 0, sizeof(le_header), &le_header, 0);
+ ret = bdrv_co_pread(bs->file, 0, sizeof(le_header), &le_header, 0);
if (ret < 0) {
error_setg(errp, "Failed to read QED header");
return ret;
@@ -492,7 +492,7 @@ static int coroutine_fn bdrv_qed_do_open(BlockDriverState
*bs, QDict *options,
}
/* From here on only known autoclear feature bits are valid */
- bdrv_flush(bs->file->bs);
+ bdrv_co_flush(bs->file->bs);
}
s->l1_table = qed_alloc_table(s);
@@ -693,7 +693,7 @@ static int coroutine_fn
bdrv_qed_co_create(BlockdevCreateOptions *opts,
* The QED format associates file length with allocation status,
* so a new file (which is empty) must have a length of 0.
*/
- ret = blk_truncate(blk, 0, true, PREALLOC_MODE_OFF, 0, errp);
+ ret = blk_co_truncate(blk, 0, true, PREALLOC_MODE_OFF, 0, errp);
if (ret < 0) {
goto out;
}
@@ -712,18 +712,18 @@ static int coroutine_fn
bdrv_qed_co_create(BlockdevCreateOptions *opts,
}
qed_header_cpu_to_le(&header, &le_header);
- ret = blk_pwrite(blk, 0, sizeof(le_header), &le_header, 0);
+ ret = blk_co_pwrite(blk, 0, sizeof(le_header), &le_header, 0);
if (ret < 0) {
goto out;
}
- ret = blk_pwrite(blk, sizeof(le_header), header.backing_filename_size,
+ ret = blk_co_pwrite(blk, sizeof(le_header), header.backing_filename_size,
qed_opts->backing_file, 0);
if (ret < 0) {
goto out;
}
l1_table = g_malloc0(l1_size);
- ret = blk_pwrite(blk, header.l1_table_offset, l1_size, l1_table, 0);
+ ret = blk_co_pwrite(blk, header.l1_table_offset, l1_size, l1_table, 0);
if (ret < 0) {
goto out;
}
--
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 14/24] commit: 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 10/24] blkdebug: add missing coroutine_fn annotation for indirect-called functions, Paolo Bonzini, 2022/10/13
- [PATCH 11/24] qcow: manually add more coroutine_fn annotations, Paolo Bonzini, 2022/10/13
- [PATCH 12/24] qcow2: manually add more coroutine_fn annotations, Paolo Bonzini, 2022/10/13
- [PATCH 21/24] vdi: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 20/24] qed: switch to *_co_* functions,
Paolo Bonzini <=
- [PATCH 16/24] mirror: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 19/24] qcow2: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 15/24] block: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 22/24] vhdx: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 18/24] qcow: switch to *_co_* functions, Paolo Bonzini, 2022/10/13
- [PATCH 23/24] vmdk: 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