refactor: Apply further sdm improvements — device-path unmount and remove redundant syncs#110
Closed
Copilot wants to merge 4 commits intodebug/fix-make-testsfrom
Closed
refactor: Apply further sdm improvements — device-path unmount and remove redundant syncs#110Copilot wants to merge 4 commits intodebug/fix-make-testsfrom
Copilot wants to merge 4 commits intodebug/fix-make-testsfrom
Conversation
Agent-Logs-Url: https://github.com/MaxG87/ButterBackup/sessions/ad709da7-175c-40a9-9c3d-24ea27cb80c0 Co-authored-by: MaxG87 <5477952+MaxG87@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MaxG87/ButterBackup/sessions/ad709da7-175c-40a9-9c3d-24ea27cb80c0 Co-authored-by: MaxG87 <5477952+MaxG87@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MaxG87/ButterBackup/sessions/ad709da7-175c-40a9-9c3d-24ea27cb80c0 Co-authored-by: MaxG87 <5477952+MaxG87@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
MaxG87
April 27, 2026 19:36
View session
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.
After the recent
storage-device-managersupdate, a few more manual operations can be delegated to sdm.Changes
closecommand — device path for unmount:sdm.unmount_device()was called with the mount directory, which causedsync_deviceinside it to fall back to a genericsync -f(sinceblkidfails on directories). Now passescfg.map_name()(the/dev/mapper/<UUID>path), enabling proper filesystem-aware sync — including BtrFS-specificbtrfs filesystem sync. The now-unnecessarymount_dirextraction is removed.Remove
BtrFSRsyncBackend.sync_filesystem_changes: The explicitbtrfs filesystem syncat the end ofdo_backupis redundant —sdm.mounted_devicealready callsunmount_device(decrypted)on exit, which runssync_devicewith the actual device path, covering both the BtrFS-specific sync andsync -f.Remove
ResticBackend.sync_filesystem_changes: Same reasoning — thesync -f backup_repositoryat the end ofcopy_filesis covered by the context manager's teardown sequence.