]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
block: prefer aio_poll to qemu_aio_wait
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 7 Jul 2014 13:18:01 +0000 (15:18 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 9 Jul 2014 13:50:11 +0000 (15:50 +0200)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
blockjob.c
qemu-io-cmds.c

diff --git a/block.c b/block.c
index c9629a44b99c8adf0de3c58e879c73118e8559f8..510430de3529dfe81d9dda9ac7e1311ba61f5fed 100644 (file)
--- 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);
         }
     }
 
index 67a64ea318b59a3f6ecd08d4f10ba5ffa62c753d..ca0b4e25d066d66cfd6a00fa987b276787dc088d 100644 (file)
@@ -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;
 }
index 60c1cebffca6385376fe626daa9bb110a2a9fd1e..c503fc66aac3572a9b4db0686e2ad01d3c0c0a32 100644 (file)
@@ -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;