[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 53/58] qed: switch to *_co_* functions
From: |
Kevin Wolf |
Subject: |
[PULL 53/58] qed: switch to *_co_* functions |
Date: |
Thu, 27 Oct 2022 20:31:41 +0200 |
From: Alberto Faria <afaria@redhat.com>
Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-21-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@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 4627169348..d7f2c6fc7c 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
- [PULL 33/58] block/nfs: Fix 32-bit Windows build, (continued)
- [PULL 33/58] block/nfs: Fix 32-bit Windows build, Kevin Wolf, 2022/10/27
- [PULL 42/58] qcow2: add coroutine_fn annotation for indirect-called functions, Kevin Wolf, 2022/10/27
- [PULL 41/58] block: add missing coroutine_fn annotation to BlockDriverState callbacks, Kevin Wolf, 2022/10/27
- [PULL 52/58] qcow2: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 48/58] block: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 36/58] monitor: add missing coroutine_fn annotation, Kevin Wolf, 2022/10/27
- [PULL 50/58] parallels: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 29/58] block: use the new _change_ API instead of _can_set_ and _set_, Kevin Wolf, 2022/10/27
- [PULL 43/58] blkdebug: add missing coroutine_fn annotation for indirect-called functions, Kevin Wolf, 2022/10/27
- [PULL 55/58] vhdx: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 53/58] qed: switch to *_co_* functions,
Kevin Wolf <=
- [PULL 27/58] block: implement .change_aio_ctx in child_of_bds, Kevin Wolf, 2022/10/27
- [PULL 49/58] mirror: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 37/58] ssh: add missing coroutine_fn annotation, Kevin Wolf, 2022/10/27
- [PULL 26/58] blockjob: implement .change_aio_ctx in child_job, Kevin Wolf, 2022/10/27
- [PULL 23/58] block.c: assert bs->aio_context is written under BQL and drains, Kevin Wolf, 2022/10/27
- [PULL 38/58] block: add missing coroutine_fn annotation to prototypes, Kevin Wolf, 2022/10/27
- [PULL 44/58] qcow: manually add more coroutine_fn annotations, Kevin Wolf, 2022/10/27
- [PULL 47/58] commit: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 46/58] vmdk: manually add more coroutine_fn annotations, Kevin Wolf, 2022/10/27
- [PULL 40/58] coroutine-io: add missing coroutine_fn annotation to prototypes, Kevin Wolf, 2022/10/27