Skip to content

Ignore fsync errors - #199

Merged
MichaelEischer merged 2 commits into
restic:masterfrom
MichaelEischer:support-macos-ventura
Dec 16, 2022
Merged

MichaelEischer merged 2 commits into
restic:masterfrom
MichaelEischer:support-macos-ventura

Conversation

@MichaelEischer

Copy link
Copy Markdown
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

Comment thread repo/repo.go 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

MichaelEischer commented Nov 11, 2022 •

Copy link
Copy Markdown
Member Author

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.

@wojas wojas left a comment

Copy link
Copy Markdown
Contributor

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.

@ghost

ghost commented Nov 16, 2022

Copy link
Copy Markdown

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

@MichaelEischer MichaelEischer left a comment

Copy link
Copy Markdown
Member Author

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

2 participants