From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THcPt-0005jb-Ou for qemu-devel@nongnu.org; Fri, 28 Sep 2012 11:23:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THcPo-0001Ag-57 for qemu-devel@nongnu.org; Fri, 28 Sep 2012 11:23:49 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:40969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THcPn-00017A-Vm for qemu-devel@nongnu.org; Fri, 28 Sep 2012 11:23:44 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp2so5308240pbb.4 for ; Fri, 28 Sep 2012 08:23:43 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 28 Sep 2012 17:22:49 +0200 Message-Id: <1348845782-15073-7-git-send-email-pbonzini@redhat.com> In-Reply-To: <1348845782-15073-1-git-send-email-pbonzini@redhat.com> References: <1348845782-15073-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 06/19] qmp: add 'busy' member to BlockJobInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com Because pausing a job is asynchronous, we need to know whether it has completed. This is described by the "busy" field of BlockJob; copy it to BlockJobInfo. Signed-off-by: Paolo Bonzini --- blockjob.c | 1 + qapi-schema.json | 5 ++++- 2 file modificati, 5 inserzioni(+). 1 rimozione(-) diff --git a/blockjob.c b/blockjob.c index dea63f8..64c9d2d 100644 --- a/blockjob.c +++ b/blockjob.c @@ -168,6 +168,7 @@ BlockJobInfo *block_job_query(BlockJob *job) info->type = g_strdup(job->job_type->job_type); info->device = g_strdup(bdrv_get_device_name(job->bs)); info->len = job->len; + info->busy = job->busy; info->offset = job->offset; info->speed = job->speed; return info; diff --git a/qapi-schema.json b/qapi-schema.json index 14e4419..add93f9 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1098,6 +1098,9 @@ # # @len: the maximum progress value # +# @busy: false if the job is known to be in a quiescent state, with +# no pending I/O. Since 1.3. +# # @offset: the current progress value # # @speed: the rate limit, bytes per second @@ -1106,7 +1109,7 @@ ## { 'type': 'BlockJobInfo', 'data': {'type': 'str', 'device': 'str', 'len': 'int', - 'offset': 'int', 'speed': 'int'} } + 'offset': 'int', 'busy': 'bool', 'speed': 'int'} } ## # @query-block-jobs: -- 1.7.12