diff options
| author | Peter Maydell | 2015-11-09 12:20:51 +0100 |
|---|---|---|
| committer | Peter Maydell | 2015-11-09 12:20:51 +0100 |
| commit | 9d5c1dc117d1ad881bbc76f6990ee1f9e9f8ef7f (patch) | |
| tree | 90d4dace696dbff6d0414de85353fdc6b6d39bc6 /blockdev.c | |
| parent | Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into st... (diff) | |
| parent | blockdev: acquire AioContext in hmp_commit() (diff) | |
| download | qemu-9d5c1dc117d1ad881bbc76f6990ee1f9e9f8ef7f.tar.gz qemu-9d5c1dc117d1ad881bbc76f6990ee1f9e9f8ef7f.tar.xz qemu-9d5c1dc117d1ad881bbc76f6990ee1f9e9f8ef7f.zip | |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
# gpg: Signature made Mon 09 Nov 2015 10:08:17 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
* remotes/stefanha/tags/block-pull-request:
blockdev: acquire AioContext in hmp_commit()
monitor: add missed aio_context_acquire into vm_completion call
aio: Introduce aio-epoll.c
aio: Introduce aio_context_setup
aio: Introduce aio_external_disabled
dataplane: support non-contigious s/g
dataplane: simplify indirect descriptor read
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'blockdev.c')
| -rw-r--r-- | blockdev.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/blockdev.c b/blockdev.c index 8b8bfa992c..97be42f6cd 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1120,6 +1120,9 @@ void hmp_commit(Monitor *mon, const QDict *qdict) if (!strcmp(device, "all")) { ret = bdrv_commit_all(); } else { + BlockDriverState *bs; + AioContext *aio_context; + blk = blk_by_name(device); if (!blk) { monitor_printf(mon, "Device '%s' not found\n", device); @@ -1129,7 +1132,14 @@ void hmp_commit(Monitor *mon, const QDict *qdict) monitor_printf(mon, "Device '%s' has no medium\n", device); return; } - ret = bdrv_commit(blk_bs(blk)); + + bs = blk_bs(blk); + aio_context = bdrv_get_aio_context(bs); + aio_context_acquire(aio_context); + + ret = bdrv_commit(bs); + + aio_context_release(aio_context); } if (ret < 0) { monitor_printf(mon, "'commit' error for '%s': %s\n", device, |
