From nobody Fri May 3 07:04:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.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 207.211.31.120 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=1596616422; cv=none; d=zohomail.com; s=zohoarc; b=au3xU39DPf5TjHtEbLd2a/3PxYZq+RhZSFQbIKAWNtpqx/ZnAc6RTK8NjyeNzenKX4appeUzZFAyhSgMiP3Do9tOadEesHxfJg0M+egzDmbQ1wEHJRPNcBsMHdKbgcFDfPM6Y59iQ6J4pzsFpaquoY3gRVQsmIwGitmh7cZCiHo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596616422; 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=gmNJCQXKCUQhiwwkMaPQYaum7T4iOQItywoOSCOuISY=; b=PwOuYtlHcrMQsf4B46avy6FtLx0BgccohOHC+Ol+OmyknhZdKn3qVHQhMzi9rXxi5LPLT7rmjh5KjJwYQxcN3r27N3TFYN76UvDm62JxviCwiBE26r8UIHGoFtVPXnfZwP7uu91lzdY0MaX/pRCWhVq0HducSDPeUZyYfjwN2fI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1596616422950201.67271123164085; Wed, 5 Aug 2020 01:33:42 -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-359-2F7m_nbUOlqDgbpmWCwFvw-1; Wed, 05 Aug 2020 04:33:39 -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 687B48014D7; Wed, 5 Aug 2020 08:33:32 +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 45A0210013C4; Wed, 5 Aug 2020 08:33: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 1779296921; Wed, 5 Aug 2020 08:33:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0758XVdh015572 for ; Wed, 5 Aug 2020 04:33:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 82DFB71797; Wed, 5 Aug 2020 08:33:31 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.192.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5540C71764 for ; Wed, 5 Aug 2020 08:33:28 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id F2F8524898A; Wed, 5 Aug 2020 10:33:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596616421; 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=gmNJCQXKCUQhiwwkMaPQYaum7T4iOQItywoOSCOuISY=; b=JtBpvZ3WVziXdJS9YkrU0iwPic407DZ/Spenf/Bz4MoEm0i1W2o+tIKaqcuATMWMHYDBNL uw/1qzdzIP9PIISFk0o2hHHrsTjb/5Yy7TtIDT2++qaYsC7YTLaZ5bAhjIBnGqI0Ipab43 P69SZTeDT3SVQViqHaDhQYkZlgJfKXA= X-MC-Unique: 2F7m_nbUOlqDgbpmWCwFvw-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH] util: Fix logic in virFileSetCOW Date: Wed, 5 Aug 2020 10:33:21 +0200 Message-Id: <9d9409be903871c29c8709ca7532ac7bcfdf2546.1596616401.git.jdenemar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.84 on 10.5.11.22 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 COW is not explicitly requested to be disabled or enabled, the function is supposed to do nothing on non-BTRFS file systems. Fixes commit 7230bc95aa78379c9ee20cf59394c5fc4305b75b. https://bugzilla.redhat.com/show_bug.cgi?id=3D1866157 Signed-off-by: Jiri Denemark Reviewed-by: Daniel P. Berrang=C3=A9 --- src/util/virfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 6ada3a708c..7f22884b07 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -4522,7 +4522,7 @@ virFileSetCOW(const char *path, } =20 if (buf.f_type !=3D BTRFS_SUPER_MAGIC) { - if (state =3D=3D VIR_TRISTATE_BOOL_ABSENT) { + if (state !=3D VIR_TRISTATE_BOOL_ABSENT) { virReportSystemError(ENOSYS, _("unable to control COW flag on '%s', no= t btrfs"), path); --=20 2.27.0