From patchwork Fri Sep 28 15:22:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 187826 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1700B2C00CE for ; Sat, 29 Sep 2012 02:07:52 +1000 (EST) Received: from localhost ([::1]:42596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THcQI-0006m2-JK for incoming@patchwork.ozlabs.org; Fri, 28 Sep 2012 11:24:14 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=QPrVOdRiiOCq9kl4yhG2yQUsguOLCqRhuikFiLCqEN4=; b=OTmB7mo3drGTmX+KiEszbFF0I2X9Vs5MtvN9cO1XPZH52dYo6ORYCpKa462cFVSdC6 umzh2rwp8C6vRYv94EWBfL2yEQTvMVetBLms3quYHhit7tmbrkae0jnCXkKIET5so4Ra dmnBvdTgZfWedRBMIQayVVD+GYS8AVmiZt6z2hfqAVMXFuvBKqYVCQeh2hxiHca/iPUD ts0m3c2qi/C6p0tyyQanIeGXY0yWbqjpJKVRyEkfFmS7YcLuwKFgj2d+TG8BAbGijsA1 M7o8oKf4e2kJtIJPQOxsfZhagxAWVFD7lRKy2t/MPq80zGq4gu3gzeEPcoW2JFLzPNUD gi+w== Received: by 10.66.81.199 with SMTP id c7mr9454973pay.19.1348845823675; Fri, 28 Sep 2012 08:23:43 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-169-1.ip50.fastwebnet.it. [93.34.169.1]) by mx.google.com with ESMTPS id e9sm5648599pay.34.2012.09.28.08.23.40 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Sep 2012 08:23:42 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 28 Sep 2012 17:22:49 +0200 Message-Id: <1348845782-15073-7-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1348845782-15073-1-git-send-email-pbonzini@redhat.com> References: <1348845782-15073-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Cc: kwolf@redhat.com Subject: [Qemu-devel] [PATCH 06/19] qmp: add 'busy' member to BlockJobInfo X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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: