This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 812085 - use the name block-job-cancel to indicate async cancel support
use the name block-job-cancel to indicate async cancel support
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.3
All Linux
medium Severity medium
: rc
: 6.3
Assigned To: Paolo Bonzini
Virtualization Bugs
:
Depends On: 582475 783950
Blocks: 525307 580954 638506 638508 638509 748534 756082 769496 786141 799055 802284 806280 806432 811683 813953 815791 830861 831532 835344 835345 835722 865384
  Show dependency treegraph
 
Reported: 2012-04-12 13:23 EDT by Eric Blake
Modified: 2013-01-09 19:51 EST (History)
29 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.278.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed
Story Points: ---
Clone Of: 582475
: 813953 (view as bug list)
Environment:
Last Closed: 2012-06-20 07:46:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 3 Eric Blake 2012-04-12 17:55:12 EDT
Per the upstream patch, libvirt expects that all three commands are changed as a group.  Either we have the old synchronous cancel interface with no partial streaming:

block_job_set_speed
block_job_cancel
block_stream

or we have the new asynchronous cancel interface and partial streaming:

block-job-set-speed
block-job-cancel
block-stream
Comment 5 Eric Blake 2012-04-18 13:03:53 EDT
Upstream raised another issue where a semantic difference would be desirable:

https://lists.gnu.org/archive/html/qemu-devel/2012-04/msg02273.html

If upstream indeed goes with block-job-set-speed being callable at any time, and not just when a block job is active, then this semantic change from block_job_set_speed would be another thing that libvirt would like to differentiate on based on the spelling of the monitor command.  I'm not sure whether to clone this into another BZ, but it should be fixed before both qemu 1.1 and RHEL 6.3 if we decide to go with this semantic change, to make libvirt's life easier.  (I suppose that libvirt could blindly try to set speed in advance, and fall back to setting it after the job, as a mitigation if we cannot rely on the spelling of the command to tell the difference).
Comment 9 Dor Laor 2012-04-22 07:32:44 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed
Comment 10 daiwei 2012-04-26 04:00:39 EDT
Verified this issue with steps and environment as follows:

# uname -r;rpm -q qemu-kvm-rhev
2.6.32-262.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.282.el6.x86_64

Test both HMP and QMP , command works fine.

HMP:

(qemu) snapshot_blkdev drive-virtio-disk0 /root/sn1 qcow2
(qemu) block-stream drive-virtio-disk0
(qemu) block-job-set-speed drive-virtio-disk0 200M
(qemu) info block-jobs
Streaming device drive-virtio-disk0: Completed 679477248 of 21474836480 bytes, speed limit 209715200 bytes/s
(qemu) block-job-cancel drive-virtio-disk0
(qemu) info block-jobs
No active jobs

QMP:


{ 'execute' : 'qmp_capabilities' }
{"return": {}}
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-virtio-disk0","snapshot-file":"/root/sn1","format": "qcow2" } }
{"return": {}}
{ "execute": "block-stream", "arguments": { "device": "drive-virtio-disk0" } }
{"return": {}}
{ "execute": "block-job-set-speed", "arguments": { "device": "drive-virtio-disk0", "value": 1024 } }
{"return": {}}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"device": "drive-virtio-disk0", "len": 21474836480, "offset": 605028352, "speed": 1024, "type": "stream"}]}
{ "execute": "block-job-cancel", "arguments": { "device": "drive-virtio-disk0" } }
{"timestamp": {"seconds": 1335426669, "microseconds": 715579}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "drive-virtio-disk0", "len": 21474836480, "offset": 656932864, "speed": 1024, "type": "stream"}}
{"return": {}}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": []}

So, this bug has been fixed.
Comment 12 errata-xmlrpc 2012-06-20 07:46:31 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0746.html

Note You need to log in before you can comment on or make changes to this bug.