From nobody Thu May 16 01:56:01 2024 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 ARC-Seal: i=1; a=rsa-sha256; t=1586261494; cv=none; d=zohomail.com; s=zohoarc; b=jdGPb+zZKhEKdrwg+91PzAuiIFA+yYHP7Djn31aEMoYf94NpvRuw8t94aq8VzijhD+iSnL+CR0gjj9/2HKuslDDwvnDqAlL2xlH5NfxlyGYMfkq6RXaILtFgojw53UBTnvQQO0NJVMIRr/eVq5/KKyNhPgvdO+HSMGCZfIBcoII= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586261494; 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; bh=jquxAsI2KexE5bDqT6KlCJw/FXeJSa2q56Ga2U05ssA=; b=df2nCJoIrPQpItrt/0Os20uYrmHoqiACPYr89QkfAkU2eydatQpMNgTpVqMbg4hggBdD/mk3W7+5u2voyC/bhp1i8TQcAxfHZ/XnGHCIgX0KiA+1OvmM337zhEq5p/eIulZQsgrkdEmUPMbWVp98HfuzYFYYqopSOL6f6MMDQx4= 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 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 1586261493879147.47991527405657; Tue, 7 Apr 2020 05:11:33 -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-210-7VMCz6d3N_2m7TqZxr76qA-1; Tue, 07 Apr 2020 08:11:30 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4882B18B5FA1; Tue, 7 Apr 2020 12:11:24 +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 CA5EA272C4; Tue, 7 Apr 2020 12:11:23 +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 D75A318089CD; Tue, 7 Apr 2020 12:11:21 +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 037CBK5u009583 for ; Tue, 7 Apr 2020 08:11:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id E802910AF9CF; Tue, 7 Apr 2020 12:11:19 +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 E384110AF9D3 for ; Tue, 7 Apr 2020 12:11:17 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (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 CF836185A78F for ; Tue, 7 Apr 2020 12:11:17 +0000 (UTC) Received: from regular1.263xmail.com (regular1.263xmail.com [211.150.70.203]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-74-FxWAfx2RPKaa7wKtbP0HSQ-1; Tue, 07 Apr 2020 08:11:14 -0400 Received: from localhost (unknown [192.168.167.16]) by regular1.263xmail.com (Postfix) with ESMTP id 5620A3DC for ; Tue, 7 Apr 2020 20:11:10 +0800 (CST) Received: from localhost.localdomain (unknown [120.230.125.5]) by smtp.263.net (postfix) whith ESMTP id P17480T139661185902336S1586261440082603_; Tue, 07 Apr 2020 20:11:05 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586261492; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=jquxAsI2KexE5bDqT6KlCJw/FXeJSa2q56Ga2U05ssA=; b=db+dRmmbovcifTj15Pv0bmGS8JblUXgSiiT1OWKO/uhbPRu7YpZT5VHVl9rVK5F685pHRb eVnsEl8mS8iWMwx12LTG5S7W7NAghNxa0D4p2SZ5lizTLwvyVBnUxlTrYIG1YPFGb5eMB6 oskZLV/N5yg+XGAVK2jM9LGFlpKma6k= X-MC-Unique: 7VMCz6d3N_2m7TqZxr76qA-1 X-MC-Unique: FxWAfx2RPKaa7wKtbP0HSQ-1 X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED4: 1 X-ABS-CHECKED: 1 X-UNIQUE-TAG: X-RL-SENDER: yili@winhong.com X-SENDER: yili@winhong.com X-LOGIN-NAME: yili@winhong.com X-FST-TO: libvir-list@redhat.com X-SENDER-IP: 120.230.125.5 X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 X-System-Flag: 0 From: Yi Li To: libvir-list@redhat.com Subject: [PATCH] storage: use local dom_disk parameter Date: Tue, 7 Apr 2020 20:10:29 +0800 Message-Id: <20200407121029.1697-1-yili@winhong.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 037CBK5u009583 X-loop: libvir-list@redhat.com Cc: yilikernel@gmail.com, yili@winhong.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.84 on 10.5.11.23 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" replace vm->def->disks[i] with dom_disk parameter Signed-off-by: Yi Li Reviewed-by: Michal Privoznik Reviewed-by: Pavel Mores --- src/qemu/qemu_driver.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index daa3cb397d..27f43124ac 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14841,14 +14841,13 @@ qemuDomainSnapshotPrepare(virDomainObjPtr vm, active) < 0) return -1; =20 - if (vm->def->disks[i]->src->format > 0 && - vm->def->disks[i]->src->format !=3D VIR_STORAGE_FILE_QCOW2= ) { + if (dom_disk->src->format > 0 && + dom_disk->src->format !=3D VIR_STORAGE_FILE_QCOW2) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("internal snapshot for disk %s unsupporte= d " "for storage type %s"), disk->name, - virStorageFileFormatTypeToString( - vm->def->disks[i]->src->format)); + virStorageFileFormatTypeToString(dom_disk->= src->format)); return -1; } break; --=20 2.13.6