From nobody Fri Mar 29 01:53:20 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1557499389; cv=none; d=zoho.com; s=zohoarc; b=Nzxhxc277QGGVxMxrnVdKcb3/nkhNLdiZ2VxYkHxrYqBqeSfXavT4fqKbun95mAdcuqVclwmzkOZmDJSMzy+ogu09yh7nYGB2X9pNWOFT7suj3UyX2TYyF73qcvTfCMzXTd/PbxVpvSuRK+6Cg4flXDasN43uEbtV4uz6Sk4Hs4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557499389; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=E8FoGdfem/hY1lB4pRPR896zLCmWpHZGbDr560eBPYI=; b=WUZvgSuDBZAJ7OKgbwirec/0N3roKLQ1X+gP/HRGy0hE7ui8HzTxXwFQo57IOblZ5sj4Xu1ZS/MSEYFjLL2O+QmeXQegc3/Ol195ITku/qsjmXUHzZ09bl7AuRPb+X5xQ2teGedZBYZoVKdiKgKDR6IQd8kgyZz84PcNi+Gs3PE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1557499389295789.41989839598; Fri, 10 May 2019 07:43:09 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B8670306D32B; Fri, 10 May 2019 14:42:56 +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 DE63F10027BB; Fri, 10 May 2019 14:42:48 +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 D8F1941F5A; Fri, 10 May 2019 14:42:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4AEg9WE014863 for ; Fri, 10 May 2019 10:42:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 153BD10027CC; Fri, 10 May 2019 14:42:09 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-15.phx2.redhat.com [10.3.116.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id BE13310027BB; Fri, 10 May 2019 14:42:06 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Fri, 10 May 2019 09:42:05 -0500 Message-Id: <20190510144205.13352-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com Subject: [libvirt] [PATCH] qemu: Fix regression with undefine --snapshots-metadata 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 10 May 2019 14:43:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" In refactoring the snapshot code to prepare for checkpoints, I changed qemuDomainMomentDiscardAll to take a callback that would handle the cleanup of either a snapshot or a checkpoint, but failed to set the callback on one of the two snapshot callers. As a result, 'virsh undefine $dom --snapshots-metadata' crashed on a NULL function dereference. Fixes: a487890d371b8cc3662c1717dfe07eea3f1ef1c0 Signed-off-by: Eric Blake --- src/qemu/qemu_domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 2af17816c6..3290c5d490 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8664,7 +8664,8 @@ qemuDomainSnapshotDiscardAllMetadata(virQEMUDriverPtr= driver, virQEMUMomentRemove rem =3D { .driver =3D driver, .vm =3D vm, - .metadata_only =3D true + .metadata_only =3D true, + .momentDiscard =3D qemuDomainSnapshotDiscard, }; virDomainSnapshotForEach(vm->snapshots, qemuDomainMomentDiscardAll, &r= em); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list