From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwTZi-0006m7-0q for qemu-devel@nongnu.org; Wed, 01 Aug 2012 03:42:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwTZg-0003GF-UB for qemu-devel@nongnu.org; Wed, 01 Aug 2012 03:42:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwTZg-0003G7-M5 for qemu-devel@nongnu.org; Wed, 01 Aug 2012 03:42:32 -0400 Message-ID: <5018DDE2.20500@redhat.com> Date: Wed, 01 Aug 2012 09:42:26 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1343127865-16608-1-git-send-email-pbonzini@redhat.com> <1343127865-16608-7-git-send-email-pbonzini@redhat.com> In-Reply-To: <1343127865-16608-7-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 06/47] qmp: add block-job-pause and block-job-resume List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: jcody@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Am 24.07.2012 13:03, schrieb Paolo Bonzini: > Add QMP commands matching the functionality. > > Paused jobs cannot be canceled without first resuming them. This > ensures that I/O errors are never missed by management. However, an > optional force argument can be specified to allow that. Right now, > jobs do not see the difference between a forced and a normal resume. > This can be changed in the future if needed. > > Signed-off-by: Paolo Bonzini > +## > +# @block-job-pause: > +# > +# Pause an active background block operation. > +# > +# This command returns immediately after marking the active background block > +# operation for pausing. It is an error to call this command if no > +# operation is in progress. > +# > +# The operation will pause as soon as possible. No event is emitted when > +# the operation is actually paused. Cancelling a paused job automatically > +# resumes it. > +# > +# @device: the device name > +# > +# Returns: Nothing on success > +# If no background operation is active on this device, DeviceNotActive > +# > +# Since: 1.2 > +## > +{ 'command': 'block-job-pause', 'data': { 'device': 'str' } } > + > +## > +# @block-job-resume: > +# > +# Resume an active background block operation. > +# > +# This command returns immediately after resuming a paused background block > +# operation for cancellation. It is an error to call this command if no > +# operation is in progress. > +# > +# @device: the device name > +# > +# Returns: Nothing on success > +# If no background operation is active on this device, DeviceNotActive > +# If cancellation already in progress, DeviceInUse > +# > +# Since: 1.2 > +## > +{ 'command': 'block-job-resume', 'data': { 'device': 'str' } } We should document what happens when you pause an already paused job, or resume a running one. Currently, a second pause is completely ignored, and a second resume is mostly ignored as well, but can shorten the rate-limiting delay (the latter isn't worth to be documented, but if we should be clear about whether it's allowed) Kevin