[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL for-2.1 03/22] block: prefer aio_poll to qemu_aio_wai
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL for-2.1 03/22] block: prefer aio_poll to qemu_aio_wait |
Date: |
Thu, 10 Jul 2014 14:35:08 +0200 |
From: Paolo Bonzini <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block.c | 2 +-
blockjob.c | 2 +-
qemu-io-cmds.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/block.c b/block.c
index c9629a4..510430d 100644
--- a/block.c
+++ b/block.c
@@ -471,7 +471,7 @@ int bdrv_create(BlockDriver *drv, const char* filename,
co = qemu_coroutine_create(bdrv_create_co_entry);
qemu_coroutine_enter(co, &cco);
while (cco.ret == NOT_DONE) {
- qemu_aio_wait();
+ aio_poll(qemu_get_aio_context(), true);
}
}
diff --git a/blockjob.c b/blockjob.c
index 67a64ea..ca0b4e2 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -187,7 +187,7 @@ int block_job_cancel_sync(BlockJob *job)
job->opaque = &data;
block_job_cancel(job);
while (data.ret == -EINPROGRESS) {
- qemu_aio_wait();
+ aio_poll(bdrv_get_aio_context(bs), true);
}
return (data.cancelled && data.ret == 0) ? -ECANCELED : data.ret;
}
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
index 60c1ceb..c503fc6 100644
--- a/qemu-io-cmds.c
+++ b/qemu-io-cmds.c
@@ -483,7 +483,7 @@ static int do_co_write_zeroes(BlockDriverState *bs, int64_t
offset, int count,
co = qemu_coroutine_create(co_write_zeroes_entry);
qemu_coroutine_enter(co, &data);
while (!data.done) {
- qemu_aio_wait();
+ aio_poll(bdrv_get_aio_context(bs), true);
}
if (data.ret < 0) {
return data.ret;
@@ -2027,7 +2027,7 @@ static const cmdinfo_t resume_cmd = {
static int wait_break_f(BlockDriverState *bs, int argc, char **argv)
{
while (!bdrv_debug_is_suspended(bs, argv[1])) {
- qemu_aio_wait();
+ aio_poll(bdrv_get_aio_context(bs), true);
}
return 0;
--
1.8.3.1
- [Qemu-devel] [PULL for-2.1 00/22] Block patches for 2.1.0-rc2, Kevin Wolf, 2014/07/10
- [Qemu-devel] [PULL for-2.1 01/22] block/backup: Fix hang for unaligned image size, Kevin Wolf, 2014/07/10
- [Qemu-devel] [PULL for-2.1 03/22] block: prefer aio_poll to qemu_aio_wait,
Kevin Wolf <=
- [Qemu-devel] [PULL for-2.1 05/22] test-aio: fix GSource-based timer test, Kevin Wolf, 2014/07/10
- [Qemu-devel] [PULL for-2.1 04/22] block: drop aio functions that operate on the main AioContext, Kevin Wolf, 2014/07/10
- [Qemu-devel] [PULL for-2.1 02/22] block: Fix bdrv_is_allocated() return value, Kevin Wolf, 2014/07/10
- [Qemu-devel] [PULL for-2.1 06/22] AioContext: speed up aio_notify, Kevin Wolf, 2014/07/10
- [Qemu-devel] [PULL for-2.1 09/22] qed: Make qiov match request size until backing file EOF, Kevin Wolf, 2014/07/10
- [Qemu-devel] [PULL for-2.1 07/22] block: Make qiov match the request size until EOF, Kevin Wolf, 2014/07/10
- [Qemu-devel] [PULL for-2.1 08/22] qcow2: Make qiov match request size until backing file EOF, Kevin Wolf, 2014/07/10
- [Qemu-devel] [PULL for-2.1 10/22] block: Assert qiov length matches request length, Kevin Wolf, 2014/07/10
- [Qemu-devel] [PULL for-2.1 16/22] tests: Fix unterminated string output visitor enum human string, Kevin Wolf, 2014/07/10
- [Qemu-devel] [PULL for-2.1 11/22] virtio-blk: avoid dataplane VirtIOBlockReq early free, Kevin Wolf, 2014/07/10