[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 40/48] block: fix bdrv_ioctl called from coroutine
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 40/48] block: fix bdrv_ioctl called from coroutine |
Date: |
Fri, 18 Dec 2015 16:07:46 +0100 |
From: Paolo Bonzini <address@hidden>
When called from a coroutine, bdrv_ioctl must be asynchronous just like
e.g. bdrv_flush. The code was incorrectly making it synchronous, fix
it.
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/io.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/block/io.c b/block/io.c
index e00fb5d..841f5b5 100644
--- a/block/io.c
+++ b/block/io.c
@@ -2614,10 +2614,11 @@ int bdrv_ioctl(BlockDriverState *bs, unsigned long int
req, void *buf)
bdrv_co_ioctl_entry(&data);
} else {
Coroutine *co = qemu_coroutine_create(bdrv_co_ioctl_entry);
+
qemu_coroutine_enter(co, &data);
- }
- while (data.ret == -EINPROGRESS) {
- aio_poll(bdrv_get_aio_context(bs), true);
+ while (data.ret == -EINPROGRESS) {
+ aio_poll(bdrv_get_aio_context(bs), true);
+ }
}
return data.ret;
}
--
1.8.3.1
- [Qemu-block] [PULL 02/48] iotests: 124: move incremental failure test, (continued)
- [Qemu-block] [PULL 02/48] iotests: 124: move incremental failure test, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 45/48] block/qapi: always report full_backing_filename, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 43/48] qemu-iotests: s390x: fix test 068, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 44/48] block/qapi: do not redundantly print "actual path", Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 36/48] raw-posix: Make aio=native option binding, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 41/48] qemu-iotests: refine common.config, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 34/48] iotests: Extend test 112 for qemu-img amend, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 24/48] qemu-iotests: Test reopen with node-name/driver options, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 03/48] iotests: 124: don't reopen qcow2, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 33/48] qcow2: Point to amend function in check, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 40/48] block: fix bdrv_ioctl called from coroutine,
Kevin Wolf <=
- [Qemu-block] [PULL 39/48] block: use drained section around bdrv_snapshot_delete, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 35/48] qcow2: insert assert into qcow2_get_specific_info(), Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 31/48] qcow2: Add function for refcount order amendment, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 04/48] qcow2: Add .bdrv_join_options callback, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 06/48] mirror: Error out when a BDS would get two BBs, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 22/48] qemu-iotests: Try setting cache mode for children, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 38/48] iotests: Update comments for bdrv_swap() in 094, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 28/48] qcow2: Use abort() instead of assert(false), Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 25/48] progress: Allow regressing progress, Kevin Wolf, 2015/12/18
- [Qemu-block] [PULL 08/48] block: Consider all block layer options in append_open_options, Kevin Wolf, 2015/12/18