Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- use .snapshots dir for 'btrfs qgroup clear-stale' (bsc#1229904) #928

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions client/systemd-helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions package/snapper.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Aug 29 17:42:35 CEST 2024 - [email protected]

- use .snapshots dir for 'btrfs qgroup clear-stale' (bsc#1229904)

-------------------------------------------------------------------
Fri Jul 05 16:03:42 CEST 2024 - [email protected]

Expand Down
Loading