diff options
author | Anthony Liguori <aliguori@amazon.com> | 2014-01-10 11:05:05 -0800 |
---|---|---|
committer | Anthony Liguori <aliguori@amazon.com> | 2014-01-10 11:05:05 -0800 |
commit | debe40fbc5f112672d0ab8f7f393e483304059f4 (patch) | |
tree | e7d0447fed7945171068b78af6301e188aa5ea4d /blockdev.c | |
parent | d1819762fcf5d50f30df603eb606eb31bf62e29d (diff) | |
parent | 18da7f94cdce130f2a71387de4980ffa817181a1 (diff) |
Merge remote-tracking branch 'stefanha/block' into staging
* stefanha/block:
commit: Remove unused check
qemu-iotests: Update test cases for commit active
commit: Support commit active layer
block: Add commit_active_start()
mirror: Move base to MirrorBlockJob
mirror: Don't close target
qemu-iotests: drop duplicate virtio-blk initialization failure
vmdk: Allow vmdk_create to work with protocol
vmdk: Check VMFS extent line field number
docs: updated qemu-img man page and qemu-doc to reflect VHDX support.
block: vhdx - improve error message, and .bdrv_check implementation
block/iscsi: Fix compilation for libiscsi 1.4.0 (API change)
qapi-schema: fix QEMU 1.8 references
dataplane: replace hostmem with memory_region_find
dataplane: change vring API to use VirtQueueElement
vring: factor common code for error exits
vring: create a common function to parse descriptors
sheepdog: fix dynamic grow for running qcow2 format
Message-id: 1387554416-5837-1-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/blockdev.c b/blockdev.c index 6a85961af2..2c3242b87a 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1820,8 +1820,13 @@ void qmp_block_commit(const char *device, return; } - commit_start(bs, base_bs, top_bs, speed, on_error, block_job_cb, bs, - &local_err); + if (top_bs == bs) { + commit_active_start(bs, base_bs, speed, on_error, block_job_cb, + bs, &local_err); + } else { + commit_start(bs, base_bs, top_bs, speed, on_error, block_job_cb, bs, + &local_err); + } if (local_err != NULL) { error_propagate(errp, local_err); return; |