From nobody Mon May 6 06:07:47 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 ARC-Seal: i=1; a=rsa-sha256; t=1566791977; cv=none; d=zoho.com; s=zohoarc; b=bMjGQeRbb+D97NGHOAn6NNWAYVWtRtrAWPXgGqlh8dWFQY3qJrFF0FYJk+IUxTQn99KV5FNy7Z7+qdIHfqD4AIa+GonUisb60BFBlVlsNQFIFgp8Xq2d+z8S6Lhz7NCS3fZnmYKbhdWvn+PqFkSPTA+CUTTt43Mgv4dnanxIDh0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566791977; 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=1OgWle9xb5Z64+L3geKt86clwmCANDjQ46w9Z+sJjI0=; b=SAvHq4HE1B/HmweLg/00jrN4ecyTtydmXSqyjgqzB06MJ26mWgAY1BZX/OCH4jMO5CVrxlVUL3PHTwOn721VoSlIIVmyLJEQ7kTgSsy24YHzC7d7S70tM1i4LBwMseIPb3UEoKWosbFDsIltML+dGX2M85ij+2Q8ogNK5m3sFYE= 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1566791977075244.55580930191877; Sun, 25 Aug 2019 20:59:37 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2FD5E4904; Mon, 26 Aug 2019 03:59:35 +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 2F8955D9CC; Mon, 26 Aug 2019 03:59:32 +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 0C20B2551B; Mon, 26 Aug 2019 03:59:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7Q3xQIP018515 for ; Sun, 25 Aug 2019 23:59:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8DA58600CE; Mon, 26 Aug 2019 03:59:26 +0000 (UTC) Received: from mx1.redhat.com (ext-mx15.extmail.prod.ext.phx2.redhat.com [10.5.110.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 880F6600C8 for ; Mon, 26 Aug 2019 03:59:23 +0000 (UTC) Received: from regular1.263xmail.com (regular1.263xmail.com [211.150.70.206]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B579F308338F for ; Mon, 26 Aug 2019 03:59:19 +0000 (UTC) Received: from yili?winhong.com (unknown [192.168.167.236]) by regular1.263xmail.com (Postfix) with ESMTP id ACE2422F for ; Mon, 26 Aug 2019 11:59:16 +0800 (CST) Received: from localhost.localdomain (unknown [14.18.236.69]) by smtp.263.net (postfix) whith ESMTP id P11120T140453731096320S1566791951186471_; Mon, 26 Aug 2019 11:59:16 +0800 (CST) X-263anti-spam: KSV:0;BIG:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ADDR-CHECKED4: 1 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ANTISPAM-LEVEL: 2 X-IP-DOMAINF: 1 X-UNIQUE-TAG: <56764fe1d41d310af924342b1b113e82> 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: 14.18.236.69 X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Yi Li To: libvir-list@redhat.com Date: Mon, 26 Aug 2019 11:59:06 +0800 Message-Id: <1566791946-21684-1-git-send-email-yili@winhong.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 238 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Mon, 26 Aug 2019 03:59:21 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Mon, 26 Aug 2019 03:59:21 +0000 (UTC) for IP:'211.150.70.206' DOMAIN:'regular1.263xmail.com' HELO:'regular1.263xmail.com' FROM:'yili@winhong.com' RCPT:'' X-RedHat-Spam-Score: 0 (RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS) 211.150.70.206 regular1.263xmail.com 211.150.70.206 regular1.263xmail.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.44 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: yili@winhong.com Subject: [libvirt] [PATCH] util: storage: drop VIR_STORAGE_FILE_AUTO_SAFE 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.71]); Mon, 26 Aug 2019 03:59:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" merge VIR_STORAGE_FILE_AUTO_SAFE/VIR_STORAGE_FILE_AUTO to VIR_STORAGE_FILE_= AUTO virStorageFileProbeFormatFromBuf will probe the backingStore format. Fix the booting issue when setting backingStore format (QCOW image) to RAW = image. Signed-off-by: Yi Li --- src/qemu/qemu_block.c | 2 -- src/util/virstoragefile.c | 4 +--- src/util/virstoragefile.h | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 66b1d11..0b99efc 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -1367,7 +1367,6 @@ qemuBlockStorageSourceGetBlockdevFormatProps(virStora= geSourcePtr src) driver =3D virStorageFileFormatTypeToString(src->format); break; =20 - case VIR_STORAGE_FILE_AUTO_SAFE: case VIR_STORAGE_FILE_AUTO: case VIR_STORAGE_FILE_NONE: case VIR_STORAGE_FILE_COW: @@ -2275,7 +2274,6 @@ qemuBlockStorageSourceCreateGetFormatProps(virStorage= SourcePtr src, case VIR_STORAGE_FILE_DIR: return 0; =20 - case VIR_STORAGE_FILE_AUTO_SAFE: case VIR_STORAGE_FILE_AUTO: case VIR_STORAGE_FILE_NONE: virReportError(VIR_ERR_INTERNAL_ERROR, diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 7288e18..2ebb2f1 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -692,7 +692,7 @@ qedGetBackingStore(char **res, if (flags & QED_F_BACKING_FORMAT_NO_PROBE) *format =3D VIR_STORAGE_FILE_RAW; else - *format =3D VIR_STORAGE_FILE_AUTO_SAFE; + *format =3D VIR_STORAGE_FILE_AUTO; =20 return BACKING_STORE_OK; } @@ -4916,8 +4916,6 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr = src, goto cleanup; =20 if (backingFormat =3D=3D VIR_STORAGE_FILE_AUTO) - backingStore->format =3D VIR_STORAGE_FILE_RAW; - else if (backingFormat =3D=3D VIR_STORAGE_FILE_AUTO_SAFE) backingStore->format =3D VIR_STORAGE_FILE_AUTO; else backingStore->format =3D backingFormat; diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index b65cd4c..c9deb6f 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -60,7 +60,6 @@ VIR_ENUM_DECL(virStorage); =20 =20 typedef enum { - VIR_STORAGE_FILE_AUTO_SAFE =3D -2, VIR_STORAGE_FILE_AUTO =3D -1, VIR_STORAGE_FILE_NONE =3D 0, VIR_STORAGE_FILE_RAW, --=20 2.7.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list