Package: libvirt
Version: 6.6.0-2

The virt-manager fails to create a new dir pool on ext4. The bug is
already fixed upstream as 2edd63a0dbd445112db23596ee0128521e8f1ff
From 2edd63a0dbd445112db23596ee0128521e8f1ff5 Mon Sep 17 00:00:00 2001
From: Jiri Denemark <jdene...@redhat.com>
Date: Wed, 5 Aug 2020 10:01:45 +0200
Subject: [PATCH] util: Fix logic in virFileSetCOW
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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=1866157

Signed-off-by: Jiri Denemark <jdene...@redhat.com>
Reviewed-by: Daniel P. Berrangé <berra...@redhat.com>
---
 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 6ada3a708c28..7f22884b07d6 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -4522,7 +4522,7 @@ virFileSetCOW(const char *path,
     }
 
     if (buf.f_type != BTRFS_SUPER_MAGIC) {
-        if (state == VIR_TRISTATE_BOOL_ABSENT) {
+        if (state != VIR_TRISTATE_BOOL_ABSENT) {
             virReportSystemError(ENOSYS,
                                  _("unable to control COW flag on '%s', not btrfs"),
                                  path);
-- 
2.28.0

Attachment: pgplSdglBqa5z.pgp
Description: OpenPGP digital signature

Reply via email to