]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- use .snapshots dir for 'btrfs qgroup clear-stale' (bsc#1229904) 928/head
authorArvin Schnell <aschnell@suse.de>
Thu, 29 Aug 2024 15:43:31 +0000 (17:43 +0200)
committerArvin Schnell <aschnell@suse.de>
Thu, 29 Aug 2024 15:43:31 +0000 (17:43 +0200)
client/systemd-helper.cc
package/snapper.changes

index 8f36e5c1ec9885ef0385d310806028a0a14b6aac..a1f2bc96b7a17ee7ac1b4d486f3b66252869a1a2 100644 (file)
@@ -179,16 +179,18 @@ cleanup(ProxySnappers* snappers)
            string subvolume;
            if (proxy_config.getValue(KEY_SUBVOLUME, subvolume))
            {
-               cout << "Running 'btrfs qgroup clear-stale " << subvolume << "'." << endl;
+               string general_dir = (subvolume == "/" ? "" : subvolume) + "/" SNAPSHOTS_NAME;
 
-               SystemCmd cmd({ BTRFS_BIN, "qgroup", "clear-stale", subvolume });
+               cout << "Running 'btrfs qgroup clear-stale " << general_dir << "'." << endl;
+
+               SystemCmd cmd({ BTRFS_BIN, "qgroup", "clear-stale", general_dir });
                if (cmd.retcode() != 0)
                {
                    // This fails more often than not since qgroups of just deleted
                    // subvolume are busy. So do not set an error code here. Still log the
                    // failure to help people understand this stuff.
 
-                   cerr << "'btrfs qgroup clear-stale " << subvolume << "' failed." << endl;
+                   cerr << "'btrfs qgroup clear-stale " << general_dir << "' failed." << endl;
                }
            }
        }
index 522b54a3e87d265793ce2208bdf67c3772aefcba..0f302fca50b8fcdbe5d8a10e0f66597d36282ffe 100644 (file)
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Thu Aug 29 17:42:35 CEST 2024 - aschnell@suse.com
+
+- use .snapshots dir for 'btrfs qgroup clear-stale' (bsc#1229904)
+
 -------------------------------------------------------------------
 Fri Jul 05 16:03:42 CEST 2024 - aschnell@suse.com