]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- disable qgroup if it does not exist 896/head
authorArvin Schnell <aschnell@suse.de>
Tue, 16 Apr 2024 16:03:25 +0000 (18:03 +0200)
committerArvin Schnell <aschnell@suse.de>
Tue, 16 Apr 2024 16:03:25 +0000 (18:03 +0200)
LIBVERSION
package/snapper.changes
snapper/Btrfs.cc

index f8cb1fa110dac50fc24a3cc8169e2030ed2d9aa1..0f4a1d6e34efc432b9d32741a0a15a7b7648d36e 100644 (file)
@@ -1 +1 @@
-7.4.2
+7.4.3
index 853b535abd7ef51b4a1580efcdc87fef1effe00e..b967ee17cdf109a3e758531caed92d1f3f5118b4 100644 (file)
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Tue Apr 16 17:59:58 CEST 2024 - aschnell@suse.com
+
+- disable qgroup if it does not exist to avoid failure creating
+  snapshots with kernel 6.8.4 (gh#openSUSE/snapper#894)
+
 -------------------------------------------------------------------
 Mon Apr 08 08:54:07 CEST 2024 - aschnell@suse.com
 
index b7b3a8d81ff3b1d188c873fb307e2c58ce0cc4fb..7659e4ec49c8bcad6c54350f51fd1180775dd619 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2011-2015] Novell, Inc.
- * Copyright (c) [2016-2023] SUSE LLC
+ * Copyright (c) [2016-2024] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -103,6 +103,19 @@ namespace snapper
                y2err("failed to parse qgroup '" << qgroup_str << "'");
                SN_THROW(InvalidConfigException());
            }
+
+           if (get_level(qgroup) == 0)
+           {
+               y2err("invalid level of qgroup '" << qgroup_str << "'");
+               SN_THROW(InvalidConfigException());
+           }
+
+           SDir general_dir = openGeneralDir();
+           if (!does_qgroup_exist(general_dir.fd(), qgroup))
+           {
+               y2err("qgroup '" << qgroup_str << "' does not exist");
+               qgroup = no_qgroup;
+           }
        }
        else
        {