From ab49e1ffc2ee74a1d6c0ccead4401de046506c09 Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Thu, 29 Aug 2024 17:43:31 +0200 Subject: [PATCH] - use .snapshots dir for 'btrfs qgroup clear-stale' (bsc#1229904) --- client/systemd-helper.cc | 8 +++++--- package/snapper.changes | 5 +++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/client/systemd-helper.cc b/client/systemd-helper.cc index 8f36e5c1..a1f2bc96 100644 --- a/client/systemd-helper.cc +++ b/client/systemd-helper.cc @@ -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; } } } diff --git a/package/snapper.changes b/package/snapper.changes index 522b54a3..0f302fca 100644 --- a/package/snapper.changes +++ b/package/snapper.changes @@ -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