[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 09/35] block: Don't acquire AioContext in hmp_qemu
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL v3 09/35] block: Don't acquire AioContext in hmp_qemu_io() |
Date: |
Fri, 22 Dec 2017 16:18:20 +0100 |
Commit 15afd94a047 added code to acquire and release the AioContext in
qemuio_command(). This means that the lock is taken twice now in the
call path from hmp_qemu_io(). This causes BDRV_POLL_WHILE() to hang for
any requests issued to nodes in a non-mainloop AioContext.
Dropping the first locking from hmp_qemu_io() fixes the problem.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
---
hmp.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/hmp.c b/hmp.c
index 35a7041824..2d72f94193 100644
--- a/hmp.c
+++ b/hmp.c
@@ -2318,7 +2318,6 @@ void hmp_qemu_io(Monitor *mon, const QDict *qdict)
{
BlockBackend *blk;
BlockBackend *local_blk = NULL;
- AioContext *aio_context;
const char* device = qdict_get_str(qdict, "device");
const char* command = qdict_get_str(qdict, "command");
Error *err = NULL;
@@ -2338,9 +2337,6 @@ void hmp_qemu_io(Monitor *mon, const QDict *qdict)
}
}
- aio_context = blk_get_aio_context(blk);
- aio_context_acquire(aio_context);
-
/*
* Notably absent: Proper permission management. This is sad, but it seems
* almost impossible to achieve without changing the semantics and thereby
@@ -2368,8 +2364,6 @@ void hmp_qemu_io(Monitor *mon, const QDict *qdict)
*/
qemuio_command(blk, command);
- aio_context_release(aio_context);
-
fail:
blk_unref(local_blk);
hmp_handle_error(mon, &err);
--
2.13.6
- [Qemu-devel] [PULL v3 00/35] Block layer patches, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 02/35] iotests: fix 197 for vpc, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 01/35] block: Formats don't need CONSISTENT_READ with NO_IO, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 03/35] block: Make bdrv_drain_invoke() recursive, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 04/35] block: Call .drain_begin only once in bdrv_drain_all_begin(), Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 08/35] block: Unify order in drain functions, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 05/35] test-bdrv-drain: Test BlockDriver callbacks for drain, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 07/35] block: Don't wait for requests in bdrv_drain*_end(), Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 06/35] block: bdrv_drain_recurse(): Remove unused begin parameter, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 10/35] qcow2: get rid of qcow2_backing_read1 routine, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 09/35] block: Don't acquire AioContext in hmp_qemu_io(),
Kevin Wolf <=
- [Qemu-devel] [PULL v3 13/35] block: Open backing image in force share mode for size probe, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 11/35] block: Document that x-blockdev-change breaks quorum children list, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 14/35] block: Remove the obsolete -drive boot=on|off parameter, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 15/35] block: Remove the deprecated -hdachs option, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 12/35] nvme: Add tracing, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 19/35] block: Make bdrv_drain() driver callbacks non-recursive, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 16/35] block: Mention -drive cyls/heads/secs/trans/serial/addr in deprecation chapter, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 17/35] block: Remove unused bdrv_requests_pending, Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 24/35] block: Don't block_job_pause_all() in bdrv_drain_all(), Kevin Wolf, 2017/12/22
- [Qemu-devel] [PULL v3 25/35] block: Nested drain_end must still call callbacks, Kevin Wolf, 2017/12/22