From nobody Fri May 3 17:24:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1583769076; cv=none; d=zohomail.com; s=zohoarc; b=jlQQGHPYsQsoRstj7W9Z0oKPkaAvmJQjKa0iuN7UvIMtMwNxkBO1A89ICKdUQ8uvXFDNRJsyXgU11dlKc/MpYwA497mflDp0tQzyCcw6CWiwpoWmrNc46pcHF/JFnNmWP+cNkL/ZBui9xCz/8ktjciatqt5ZTQGbRfzKILro6Bs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583769076; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=IDq9nbf76+Kdv9bxSJfONz/bohW575iLJQuOSnXtxtI=; b=kfBdZMevRc9PPCF/hFtqDGY9TLluIkCFhzSHmSczo5IcqheoL1HRNHmYiDI4FnhwrO335AO1gIN88GgPAapVJnTM5LOT4/fBZ19UnoGGoJoPGOIC04xJPqyqdpYaMTTloTWfcE3+uHkq+Oi3Q5zRj6KOVFNihcG8vHnP5HExZ6g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1583769076657803.5423759008023; Mon, 9 Mar 2020 08:51:16 -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-225-Zg4Ba1IcPj6auMkydIPh7Q-1; Mon, 09 Mar 2020 11:51:13 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 07873801E66; Mon, 9 Mar 2020 15:51:07 +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 CBFF473890; Mon, 9 Mar 2020 15:51:06 +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 84C2686A04; Mon, 9 Mar 2020 15:51:06 +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 029Fp5HZ018960 for ; Mon, 9 Mar 2020 11:51:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 863D61001B0B; Mon, 9 Mar 2020 15:51:05 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0A5831001920 for ; Mon, 9 Mar 2020 15:51:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583769075; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=IDq9nbf76+Kdv9bxSJfONz/bohW575iLJQuOSnXtxtI=; b=eKjOnT6bnAPRxhSSoZgN1jqgpk94DGvGB/8ai50NCXv/jgqBbNHZOTikvZ5HzU90yWJ407 YPy9YBwufZ4LjUfYsOaEqUl/2iMxJ1d0IsFZrDS3NpIKJ5LrjYVBdJWM/9S1t8YmfT8BB7 2J85hMAAevVE6q9EOSX41y+g3t3cRIE= X-MC-Unique: Zg4Ba1IcPj6auMkydIPh7Q-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] virDomainDiskTranslateSourcePool: Check for disk type correctly Date: Mon, 9 Mar 2020 16:50:52 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.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.79 on 10.5.11.15 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" When rewriting the virDomainDiskTranslateSourcePool() function in v6.1.0-rc1~184 a typo was introduced. Previously, we allowed startup policy only for those volumes which translated to VIR_STORAGE_TYPE_FILE. But starting with the referenced commit, the value we checked for was changed to VIR_STORAGE_VOL_FILE which comes from a different enum and has a different value too. This is wrong, because virStorageSourceGetActualType() returns a value from the original enum. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1811728 Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d8471acd2d..d2d97daf80 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -31856,7 +31856,7 @@ virDomainDiskTranslateSourcePool(virDomainDiskDefPt= r def) } =20 if (def->startupPolicy !=3D 0 && - virStorageSourceGetActualType(def->src) !=3D VIR_STORAGE_VOL_FILE)= { + virStorageSourceGetActualType(def->src) !=3D VIR_STORAGE_TYPE_FILE= ) { virReportError(VIR_ERR_XML_ERROR, "%s", _("'startupPolicy' is only valid for " "'file' type volume")); --=20 2.24.1