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

Ignore fsync errors #199

Merged
merged 2 commits into from Dec 16, 2022

Conversation

MichaelEischer
Copy link
Member

What is the purpose of this change? What does it change?

Storing a repository on a filesystem that does not support fsync is currently not possible. This PR syncs the ignored fsync errors from the restic backend to also allow storing a repository on these filesystems. However, this is not recommended as without fsync it is not possible to guarantee the integrity of uploaded data.

In addition, macOS Ventura seems to have introduced an additional error code, see #198.

Was the change discussed in an issue or in the forum before?

Fixes #198.

Checklist

  • I have enabled maintainer edits for this PR
  • I have added tests for all changes in this PR
  • I have added documentation for the changes (in the manual)
  • There's a new file in changelog/unreleased/ that describes the changes for our users (template here)
  • I have run gofmt on the code in all commits
  • All commit messages are formatted in the same style as the other commits in the repo
  • I'm done, this Pull Request is ready for review

repo/repo.go Outdated Show resolved Hide resolved
This ignores several different combinations of errnos which are returned
if the storage destination is not able to fsync correctly.

See also restic/restic#4021
@MichaelEischer
Copy link
Member Author

MichaelEischer commented Nov 11, 2022

I've replaced the implementation in the PR with the changes made for restic in restic/restic#4021 . The fsync handling is now largely copy & paste from restic, which should make it easier to maintain this error handling mess.

Copy link
Contributor

@wojas wojas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping it the same as in restic sounds like a good idea.

@bdillahu
Copy link

For what it's worth, it works for me as I was having the errors.

Copy link
Member Author

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. As nobody has complained about the warning message, I'll leave it as it is at the moment.

@MichaelEischer MichaelEischer merged commit a8cd3f2 into restic:master Dec 16, 2022
@MichaelEischer MichaelEischer deleted the support-macos-ventura branch December 16, 2022 22:13
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.

Mac OS Ventura 13.0 - fails to write files
3 participants