From nobody Mon Feb 9 16:51:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.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=1574243750; cv=none; d=zoho.com; s=zohoarc; b=lX7n+QCPCaEne9WaSW+ayfLB0i+sW5s9zWvY3WM0eVLxfEzAoPHQHc8Saq09raJqMs+2rZA4GZPe95TyLL5YGEEFB/wY8zpyV3hZPTZ0ILEWg+c7Vhpo67nO9YWUnOYSag/0Jn2owQj5FOifJXFx892XGNTov/56tb9NiQxnBWE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1574243750; h=Content-Type:Content-Transfer-Encoding:Cc: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=hp+mICODXjn6dNdkTaM3z9E5odHjiGLD52yZGkDUIEE=; b=dhJgwi2z65o6Kx7OkklPl/SWpS8kmPpxzBb/M5ncV/4oYsGLUa38IkCs78G0RL2dnz4/hSoYEZ6XhCtU8qBmtmqVDsuJqi01PTOKN72CoMhRYcM1h/HcLtidvTXB8nIfxQ0zsQqiWXbEkNQaz86TDHxg3d88HlMZ1+kHZ5NNHxU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.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 [207.211.31.120]) by mx.zohomail.com with SMTPS id 1574243750021874.6663114202877; Wed, 20 Nov 2019 01:55:50 -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-343-p73CE28SOFORY9wkSKSyOw-1; Wed, 20 Nov 2019 04:55:46 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F373280268D; Wed, 20 Nov 2019 09:55:39 +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 CDBD9196AD; Wed, 20 Nov 2019 09:55:39 +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 895174E567; Wed, 20 Nov 2019 09:55:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAK9tcNl025757 for ; Wed, 20 Nov 2019 04:55:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1668566D50; Wed, 20 Nov 2019 09:55:38 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.43.2.54]) by smtp.corp.redhat.com (Postfix) with ESMTP id C203F4DA73; Wed, 20 Nov 2019 09:55:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574243748; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=hp+mICODXjn6dNdkTaM3z9E5odHjiGLD52yZGkDUIEE=; b=JbGMZG7bveSA5EQVL9jxRJ+8DKQdNoR164aqXxB7Iv8ubDdDTn8UHJzV4ccs1sx67aSNzJ IIhqBQJSXWWh+CQA1RC6wA39FzNTtW1kc3oGMB86AUQR6lbJoQ29nqeThHJed0BGCe8wVY K7FUDBd1I/thIBHYSpy0Bg/bsmQvIEA= From: Pavel Mores To: libvir-list@redhat.com Date: Wed, 20 Nov 2019 10:55:26 +0100 Message-Id: <20191120095527.18158-4-pmores@redhat.com> In-Reply-To: <20191120095527.18158-1-pmores@redhat.com> References: <20191120095527.18158-1-pmores@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Pavel Mores Subject: [libvirt] [PATCH 3/4] qemu: block: store the delete flag in libvirtd's status XML 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.12 X-MC-Unique: p73CE28SOFORY9wkSKSyOw-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" Since blockcommit is asynchronous, libvirtd can be restarted while the operation runs. To ensure the information necessary to finish up the job is not lost, serialisation to and deserialisation from the status XML is added. Signed-off-by: Pavel Mores --- src/qemu/qemu_domain.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 262b74d1ab..dba287973c 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2512,6 +2512,8 @@ qemuDomainObjPrivateXMLFormatBlockjobIterator(void *p= ayload, virBufferAsprintf(&childBuf, "\n", job->= data.commit.top->nodeformat); if (job->data.commit.topparent) virBufferAsprintf(&childBuf, "\n",= job->data.commit.topparent->nodeformat); + if (job->data.commit.deleteCommittedImages) + virBufferAddLit(&childBuf, "\n"); break; =20 case QEMU_BLOCKJOB_TYPE_CREATE: @@ -3069,6 +3071,8 @@ qemuDomainObjPrivateXMLParseBlockjobDataSpecific(qemu= BlockJobDataPtr job, "string(./base/@n= ode)", &job->data.commit= .base, ctxt); + if (virXPathNode("./deleteCommittedImages", ctxt)) + job->data.commit.deleteCommittedImages =3D true; if (!job->data.commit.top || !job->data.commit.base) goto broken; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list