diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2012-04-12 14:00:51 +0200 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2012-04-19 16:29:33 +0200 |
| commit | a5a5238ee49cd6a0f598f6f63a4a43dbe18d12b7 (patch) | |
| tree | 4d428ab821c3ca99ea7f595e89ce451bdb693a92 /qemu-io.c | |
| parent | 3ed9902528d0ffd244310014f7dcdcb3df3e2a04 (diff) | |
| download | focaccia-qemu-a5a5238ee49cd6a0f598f6f63a4a43dbe18d12b7.tar.gz focaccia-qemu-a5a5238ee49cd6a0f598f6f63a4a43dbe18d12b7.zip | |
qemu-io: use main_loop_wait
This will let timers run during aio_read and aio_write commands, though not during synchronous commands. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-io.c')
| -rw-r--r-- | qemu-io.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qemu-io.c b/qemu-io.c index 3095a22be3..b48364f1b3 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -15,6 +15,7 @@ #include <libgen.h> #include "qemu-common.h" +#include "main-loop.h" #include "block_int.h" #include "cmd.h" #include "trace/control.h" @@ -295,7 +296,7 @@ static int do_aio_readv(QEMUIOVector *qiov, int64_t offset, int *total) bdrv_aio_readv(bs, offset >> 9, qiov, qiov->size >> 9, aio_rw_done, &async_ret); while (async_ret == NOT_DONE) { - qemu_aio_wait(); + main_loop_wait(false); } *total = qiov->size; @@ -309,7 +310,7 @@ static int do_aio_writev(QEMUIOVector *qiov, int64_t offset, int *total) bdrv_aio_writev(bs, offset >> 9, qiov, qiov->size >> 9, aio_rw_done, &async_ret); while (async_ret == NOT_DONE) { - qemu_aio_wait(); + main_loop_wait(false); } *total = qiov->size; @@ -352,7 +353,7 @@ static int do_aio_multiwrite(BlockRequest* reqs, int num_reqs, int *total) } while (async_ret.num_done < num_reqs) { - qemu_aio_wait(); + main_loop_wait(false); } return async_ret.error < 0 ? async_ret.error : 1; |