Align MAX_SNAPSHOT_ENTRIES with Snapper retention (off-by-one)#6175
Open
Pegorim wants to merge 1 commit into
Open
Align MAX_SNAPSHOT_ENTRIES with Snapper retention (off-by-one)#6175Pegorim wants to merge 1 commit into
Pegorim wants to merge 1 commit into
Conversation
Snapper is configured with NUMBER_LIMIT="5", but limine-snapper-sync also counts the freshly-created / currently-booted snapshot, so five retained snapshots are reported as six entries and it warns on every snapshot and update: Snapshot limit mismatch: 6 Snapper snapshots exceed configured MAX_SNAPSHOT_ENTRIES=5 Raise MAX_SNAPSHOT_ENTRIES to 6 (NUMBER_LIMIT + 1) so the boot-menu cap and Snapper's retention agree and the off-by-one warning stops. (An alternative is MAX_SNAPSHOT_ENTRIES=auto, which derives the cap from Snapper directly; kept an explicit value here to preserve the existing boot-menu limit.) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts Limine’s snapshot entry cap to match Snapper retention behavior, eliminating an off-by-one warning caused by counting the currently-booted snapshot as an additional entry.
Changes:
- Increase
MAX_SNAPSHOT_ENTRIESfrom 5 to 6 to align with Snapper’sNUMBER_LIMIT="5"plus the currently-booted snapshot. - Add inline documentation explaining the rationale for the
+1adjustment and the warning it prevents.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+16
to
+18
| # Keep this one above the Snapper limit so the counts do not mismatch: | ||
| # Snapshot limit mismatch: 6 Snapper snapshots exceed configured | ||
| # MAX_SNAPSHOT_ENTRIES=5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Snapper is configured with
NUMBER_LIMIT="5"(default/snapper/root), butlimine-snapper-syncalso counts the freshly-created / currently-booted snapshot, so five retained snapshots are reported as six entries. It warns on every snapshot and every update:(There is already migration
1782049344.shthat hides the desktop notification for this, but the underlying count mismatch and the journal warning remain.)Fix
Raise
MAX_SNAPSHOT_ENTRIESto6(NUMBER_LIMIT + 1) so the boot-menu cap and Snapper retention agree.Alternative:
MAX_SNAPSHOT_ENTRIES=autoderives the cap from Snapper directly and can never mismatch — happy to switch to that if you prefer it over an explicit value. I kept an explicit number here to preserve the existing boot-menu limit. NoteNUMBER_LIMIT_IMPORTANT="5"is separate, so heavy use of important snapshots could still exceed the cap;autowould also cover that case.Testing
Observed the warning on every
limine-snapper-sync/limine-snapper-watcherrun on a 4.0-alpha (quattro) system with 6 snapshots present.