Skip to content

refactor: Apply further sdm improvements — device-path unmount and remove redundant syncs#110

Closed
Copilot wants to merge 4 commits intodebug/fix-make-testsfrom
copilot/improve-storage-device-managers
Closed

refactor: Apply further sdm improvements — device-path unmount and remove redundant syncs#110
Copilot wants to merge 4 commits intodebug/fix-make-testsfrom
copilot/improve-storage-device-managers

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 27, 2026

After the recent storage-device-managers update, a few more manual operations can be delegated to sdm.

Changes

  • close command — device path for unmount: sdm.unmount_device() was called with the mount directory, which caused sync_device inside it to fall back to a generic sync -f (since blkid fails on directories). Now passes cfg.map_name() (the /dev/mapper/<UUID> path), enabling proper filesystem-aware sync — including BtrFS-specific btrfs filesystem sync. The now-unnecessary mount_dir extraction is removed.

  • Remove BtrFSRsyncBackend.sync_filesystem_changes: The explicit btrfs filesystem sync at the end of do_backup is redundant — sdm.mounted_device already calls unmount_device(decrypted) on exit, which runs sync_device with the actual device path, covering both the BtrFS-specific sync and sync -f.

  • Remove ResticBackend.sync_filesystem_changes: Same reasoning — the sync -f backup_repository at the end of copy_files is covered by the context manager's teardown sequence.

@MaxG87 MaxG87 closed this Apr 27, 2026
@MaxG87 MaxG87 deleted the copilot/improve-storage-device-managers branch April 27, 2026 19:44
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