From nobody Mon Feb 9 00:06:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1607094508; cv=none; d=zohomail.com; s=zohoarc; b=BAMElNwOqnvhd/97BWYp6++3/AG5v08m1qVnx8VvEqjcBmO5NYJi7GRGskNZ6q2S1DtSwAfC8lxMZsLwoFkousGF3pyp5s23xBMjA8wlfTMSAmvJtPstSI9mprrNyi0y5b3DfTJcvFSCKgc4iVPCbII/y46PcCDW5mZNBx6V+Aw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607094508; 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=BEsN+ajnu+O6ZJZPDgHjjX1u4i239dZmnzo5inzq1W4=; b=Q3aj75GVILY8mvJKMEHZJFyBfvcw17ElXsJrvIsUe5NenFPHx1k2u53PalFtmA6bmAKbxgLNoco4iVIW6z/YynT9EQ/+wVqr/L7L/Hrt/7aImw5Zcy/jYdsOQJxJCoV7d2oLNSBj2XbMdqWHvuQmSVYLpTRMhmerxXJ4LLULwGg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1607094506967632.6453595394942; Fri, 4 Dec 2020 07:08:26 -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-197-NsHK7mVGPOiTYpUkrKORCg-1; Fri, 04 Dec 2020 10:08:19 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7A5B1100F342; Fri, 4 Dec 2020 15:08:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2DE581349A; Fri, 4 Dec 2020 15:08:13 +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 396A51809C9F; Fri, 4 Dec 2020 15:08:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0B4F89PT031246 for ; Fri, 4 Dec 2020 10:08:09 -0500 Received: by smtp.corp.redhat.com (Postfix) id 63E765D9D7; Fri, 4 Dec 2020 15:08:09 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id AAED65D9CA for ; Fri, 4 Dec 2020 15:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607094502; 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=BEsN+ajnu+O6ZJZPDgHjjX1u4i239dZmnzo5inzq1W4=; b=WXR/AtrKwb2SdilBCUw/uJ3+rtpgVXG8kCPzWoIieCA677WPIxECifjQby2gRqPhBTbB9P ej7pGYig7w54GA/ZkQZ20Wdp0iEkJ+pVZVnRsc1ec1j4ndTQDKRxVeRzRX6VpMSq/MXCYx LZSZ0RuQKsFCNBuaZQUrUYf6NI6rdZY= X-MC-Unique: NsHK7mVGPOiTYpUkrKORCg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/7] virDomainGetBlockJobInfo: Discourage polling for block job completion detection Date: Fri, 4 Dec 2020 16:07:56 +0100 Message-Id: <17d34540160ab086e97adb4b026de5842f554ed4.1607094319.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Add a note saying that polling virDomainGetBlockJobInfo is not a good idea. Use events instead. Signed-off-by: Peter Krempa --- src/libvirt-domain.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index f5cd43ecea..5d3747fd39 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -9947,6 +9947,11 @@ virDomainBlockJobAbort(virDomainPtr dom, const char = *disk, * and was no-op. In this case libvirt reports cur =3D 1 and end =3D 1. * Since 2.3.0. * + * Applications looking for a reliable and low-overhead way to determine w= hether + * a block job already finished or reached synchronised phase should regis= ter a + * handler for the VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2 event instead of pollin= g this + * API. + * * Note that the progress reported for blockjobs corresponding to a pull-m= ode * backup don't report progress of the backup but rather usage of temporary * space required for the backup. --=20 2.28.0