From nobody Mon Feb 9 02:12:31 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; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1598623863; cv=none; d=zohomail.com; s=zohoarc; b=YlJK9oh1pNlERu+Lzm2THcCayZHj3xYCZ+hLzHcqWB1eXfQQbPg7sDrdbx6NDe+dHzSKoTDUYe4Mu4VZsTpiZh8Xq6nUp6R6BV5kIx35GbBH3MbaFKhTKtFKo5p1B1+zQvSHSXVWguM1wQMJnXjjLxtlV/9oD1mOkdfgJGSXqHQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598623863; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=mN8t7KTWFusBaRgwd1+S47I+3N18tMxXQf3FSgOe2rE=; b=J9hFaJk8MRlieuunKoOkgFK0ZuG7R+Qaguijvh0Id8ZBR0eiSh46PuuZbPpwyAricrenC3n71aoS5IOqsadiAWkXsMzg7vo74MQk57AMdF2SgGoz5HVVsz/yckZaCV1mnNiTme6HHuVrg6GRm/34m70y8FIIHF0DMGAg1CCh+34= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail 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 1598623863507153.67661490195974; Fri, 28 Aug 2020 07:11:03 -0700 (PDT) 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-74-KZRvs0fDM3-rPw4tQLgp_Q-1; Fri, 28 Aug 2020 10:10:59 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 88530AE40D; Fri, 28 Aug 2020 14:10:52 +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 42B4010027A6; Fri, 28 Aug 2020 14:10:52 +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 D66E3181A06B; Fri, 28 Aug 2020 14:10:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 07SEAm6o028106 for ; Fri, 28 Aug 2020 10:10:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 37BAD110C573; Fri, 28 Aug 2020 14:10:48 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 31503110C576 for ; Fri, 28 Aug 2020 14:10:45 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DB0B418AE953 for ; Fri, 28 Aug 2020 14:10:45 +0000 (UTC) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-98-HmEU3g6YMfqcfkqRFoESHg-1; Fri, 28 Aug 2020 10:10:42 -0400 Received: by mail-qk1-f193.google.com with SMTP id o64so1013131qkb.10; Fri, 28 Aug 2020 07:10:42 -0700 (PDT) Received: from localhost (209-6-122-159.s2973.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [209.6.122.159]) by smtp.gmail.com with ESMTPSA id f92sm1079616qtd.9.2020.08.28.07.10.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Aug 2020 07:10:41 -0700 (PDT) X-MC-Unique: KZRvs0fDM3-rPw4tQLgp_Q-1 X-MC-Unique: HmEU3g6YMfqcfkqRFoESHg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mN8t7KTWFusBaRgwd1+S47I+3N18tMxXQf3FSgOe2rE=; b=GsaIAoWrF6XJsQosBnv5NF45si5TdGkrqTqk2uBoxGtlZkDYpEyN7aVBz2P6YYrdsd n+mkt7vuWao+hTtbYLoMgUZE8nCEI62xIMuxF96gWmKtM+NeteHRrAUVQ/WRV8hThP3+ GX1Urses3kp3DR2Kpwe58CGkhEiIpmBhvnmycZ7RQrW4iFF/nli8OY8BP/G/ZnsjCM4X RyKEeJnH0ApQ0GqB4+rwT+lRHn4n7YnbLAdugjq1DPB2G1pqq+NnqfWJWgwMfSS1YvVB qFGHkK3YJGvLguQjE9YQtpmzGcC/TdeMehU0QX/fjzmsaUAUR8R7yzagWILTwn3OhpAm xMZg== X-Gm-Message-State: AOAM533XGcXb4cP1iusUf7/gBMUvP3L0FuolpiyyL/xd4MbYyEeYgZ/j Oi/vHXNEbhnqXNCalT+gPD3Zv/dVlMob X-Google-Smtp-Source: ABdhPJypQFZ9vrKy6+SX8YbAPzbsTTxxtBhnwQWeJxfcw3P2B0NZgOtkoQA5Y3Zr6moMTzwDftMiEg== X-Received: by 2002:a37:97c5:: with SMTP id z188mr1316718qkd.185.1598623842190; Fri, 28 Aug 2020 07:10:42 -0700 (PDT) From: Masayoshi Mizuma To: libvirt-list@redhat.com, Eric Blake , Peter Krempa Subject: [PATCH v2 1/7] qemuSnapshotDiskPrepareOne: Get available even if snapdisk is NULL Date: Fri, 28 Aug 2020 10:08:30 -0400 Message-Id: <20200828140836.14266-2-msys.mizuma@gmail.com> In-Reply-To: <20200828140836.14266-1-msys.mizuma@gmail.com> References: <20200828140836.14266-1-msys.mizuma@gmail.com> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false; X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Masayoshi Mizuma , Masayoshi Mizuma , qemu-block@nongnu.org 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.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 2.002 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Masayoshi Mizuma Get available even if snapdisk argument is NULL at qemuSnapshotDiskPrepareO= ne() so that the caller can setup dd->src. Signed-off-by: Masayoshi Mizuma --- src/qemu/qemu_snapshot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 1e8ea80b22..d310e6ff02 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -953,8 +953,9 @@ qemuSnapshotDiskPrepareOne(virQEMUDriverPtr driver, if (qemuDomainStorageSourceValidateDepth(disk->src, 1, disk->dst) < 0) return -1; =20 - if (!(dd->src =3D virStorageSourceCopy(snapdisk->src, false))) - return -1; + if (snapdisk) + if (!(dd->src =3D virStorageSourceCopy(snapdisk->src, false))) + return -1; =20 if (virStorageSourceInitChainElement(dd->src, dd->disk->src, false) < = 0) return -1; --=20 2.27.0