Skip to content

backend/local: Ignore ENOTTY for fsync on Mac#4021

Merged
MichaelEischer merged 1 commit intorestic:masterfrom
greatroar:mac-fsync
Nov 11, 2022
Merged

backend/local: Ignore ENOTTY for fsync on Mac#4021
MichaelEischer merged 1 commit intorestic:masterfrom
greatroar:mac-fsync

Conversation

@greatroar
Copy link
Copy Markdown
Contributor

@greatroar greatroar commented Nov 11, 2022

What does this PR change? What problem does it solve?

Catches ENOTTY as an error from fsync to ignore, on the Mac.

Was the change previously discussed in an issue or on the forum?

Fixes #4016, I hope. Will add a changelog entry if it does.

Checklist

  • I have read the contribution guidelines.
  • I have enabled maintainer edits.
  • I have added tests for all code changes.
  • I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • 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.

@mgumz
Copy link
Copy Markdown

mgumz commented Nov 11, 2022

this PR works on my machine(s) with OSX Ventura and fixes the addressed problem.

Copy link
Copy Markdown
Member

@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, except for the missing changelog entry. I'll port the change to the rest-server (see restic/rest-server#199 )

MichaelEischer added a commit to MichaelEischer/rest-server that referenced this pull request Nov 11, 2022
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
@greatroar
Copy link
Copy Markdown
Contributor Author

Added the changelog entry.

@MichaelEischer
Copy link
Copy Markdown
Member

MichaelEischer commented Nov 11, 2022

I've slightly tweaked the wording in the changelog. This errno seems to only be returned by macOS Ventura, see e.g. restic/rest-server#198 .

@greatroar
Copy link
Copy Markdown
Contributor Author

Good. Wasn't my best writing ever.

@MichaelEischer MichaelEischer merged commit 7b4fe7b into restic:master Nov 11, 2022
@greatroar greatroar deleted the mac-fsync branch November 11, 2022 22:12
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.

inappropriate ioctl for device - macOS with External hard disc

3 participants