From nobody Sun Feb 8 19:59:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1574694152; cv=none; d=zohomail.com; s=zohoarc; b=CYJsQjN+dsuSZco+RBr+JxHQTiWFkjDo6rkCWbSU1MCt+VGvikstyqRoA2WH6SZjxp+ebabxi1locQgYy7zKEZXeeS3UmRFjcwoSqTc8KLsZ9O/+XDvj4Ivqei0qn5IHn3NkpC7ttyw/+2ufWHtZoGnWEWuuNYCUxLlNhdd+n/o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574694152; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6XUeDaImLs68D/BylTYRyEZOWmfGDVwy+nfD9KgESYo=; b=Bx1TDVY/KyF0Sc0TMyndufJ0niz+OgM3ZjYm9xEHY54t/yb+J3vN/udkZjIyCgM2x85YETqCfJNDvvwp8UpPd3wxyQaJDVH6jfgQo1BNBJF8gFYR7js7div3RbRZ9bEXmnzh2bdYzERbV52NQfQe0WPbtVQ7QbvJPmHG9DNlCak= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1574694152929895.3204772887506; Mon, 25 Nov 2019 07:02:32 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-300-uG2P-m14P8uoZwg-CrYo-Q-1; Mon, 25 Nov 2019 10:02:24 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 533A71007246; Mon, 25 Nov 2019 15:02:18 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1A64C608C8; Mon, 25 Nov 2019 15:02:18 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B167141F02; Mon, 25 Nov 2019 15:02:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAPF1oVg022049 for ; Mon, 25 Nov 2019 10:01:50 -0500 Received: by smtp.corp.redhat.com (Postfix) id C14AD5D6B7; Mon, 25 Nov 2019 15:01:50 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 460C15D6A0 for ; Mon, 25 Nov 2019 15:01:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574694151; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=6XUeDaImLs68D/BylTYRyEZOWmfGDVwy+nfD9KgESYo=; b=VjQRWImC+KBkaw6YFVt9sOPg6HwFi+QNOQg2/T9ASEBL1pzKNLdc3kD0z4zxW30ai5D3jM QADXhOTd34W+O440dVz2TCv5OwIEOmKsR9ldwN7bRDUAzBcVhRwZRy9TpyA31wxqnwtwjs HAkhW3GFBktubG0AIdURls7nVgwqnPA= From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 25 Nov 2019 16:01:35 +0100 Message-Id: <680ee5357b4a1bbb5391d3ebced767f1237a038c.1574693959.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 8/9] API: Introduce VIR_DOMAIN_JOB_SUCCESS field for virDomainGetJobStats X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: uG2P-m14P8uoZwg-CrYo-Q-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The statistics fields are used in two places: 1) virDomainGetJobStats where the job type which ultimately holds whether the job was successful or not is returned via a different argument. 2) The virConnectDomainEventJobCompleted event where we report just the statistics via typed parameters. Since it might be useful to report the event also for jobs which completed unsuccessfully and we don't have the means to transport the state via a different variable with the event let's add a new field which will hold the success state. Since this is meant primarily for completed jobs a plain boolean is sufficient to convey whether the job was successful or not. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- include/libvirt/libvirt-domain.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 84b3cfdff7..0e490254fd 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -3578,6 +3578,13 @@ typedef enum { */ # define VIR_DOMAIN_JOB_AUTO_CONVERGE_THROTTLE "auto_converge_throttle" +/** + * VIR_DOMAIN_JOB_SUCCESS: + * + * virDomainGetJobStats field: Present only in statistics for a completed = job. + * Successful completion of the job as VIR_TYPED_PARAM_BOOLEAN. + */ +# define VIR_DOMAIN_JOB_SUCCESS "success" /** * virConnectDomainEventGenericCallback: --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list