Skip to content

two patches for btrfsmaintenance #130

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

two patches for btrfsmaintenance #130

wants to merge 2 commits into from

Conversation

ldzhong
Copy link

@ldzhong ldzhong commented Feb 6, 2025

For the first patch, when this package was first installed, the timer will be scheduled as monthly for btrfs-balance.service. However if the user modifies configuration options other than BTRFS_BALANCE_PERIOD in /etc/sysconfig/btrfsmaintenance, the timer will be changed to weekly without being noticed. To avoid such a case, it's better to keep the value in the .timer file and the configuration file same.
For the second patch, it tries to fix a timing window when editing the configuration file /etc/sysconfig/btrfsmaintenance. Please refer to the patch description for more detail.

monthly

make it align with the value in btrfs-balance.timer
configuration file exists

When tuning the value BTRFS_BALANCE_PERIOD in
/etc/sysconfig/btrfsmaintenance, btrfsmaintenance-refresh.service will
be triggered. But sometimes it will fail because the script
/usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh claims the
file /etc/sysconfig/btrfsmaintenance does not exist. Because there's a
timing window between the service is triggered and the configuration
file is checked.
"""
Setting up watches.
Watches established.

/etc/sysconfig/ OPEN
/etc/sysconfig/ CLOSE_NOWRITE,CLOSE
/etc/sysconfig/ OPEN
/etc/sysconfig/ ACCESS
/etc/sysconfig/ CLOSE_NOWRITE,CLOSE
/etc/sysconfig/ MOVE_SELF
/etc/sysconfig/ ATTRIB
/etc/sysconfig/ DELETE_SELF
"""
As a result it will be chaos after the service file finishes.

Reference: bsc#1235954
@eku
Copy link

eku commented Feb 6, 2025

What's your motivation for the changes? What problems do they fix?

@ldzhong
Copy link
Author

ldzhong commented Feb 7, 2025

What's your motivation for the changes? What problems do they fix?

I have updated the description for these two unrelated patches. Thanks for your reminding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants