local: Ignore additional errors for directory syncing
Apparently SMB/CIFS on Linux/macOS returns somewhat random errnos when trying to sync a windows share which does not support calling fsync for a directory.
This commit is contained in:
parent
ac36fda155
commit
48a0d83143
2 changed files with 14 additions and 1 deletions
13
changelog/unreleased/issue-3720
Normal file
13
changelog/unreleased/issue-3720
Normal file
|
@ -0,0 +1,13 @@
|
|||
Bugfix: Fix directory sync errors related repositories accessed via SMB
|
||||
|
||||
On Linux and macOS accessing a repository via a SMB/CIFS mount resulted in
|
||||
restic failing to save the lock file:
|
||||
|
||||
Save(<lock/071fe833f0>) returned error, retrying after 552.330144ms: sync /repo/locks: no such file or directory
|
||||
Save(<lock/bf789d7343>) returned error, retrying after 552.330144ms: sync /repo/locks: invalid argument
|
||||
|
||||
This has been fixed by ignoring these error codes.
|
||||
|
||||
https://github.com/restic/restic/issues/3720
|
||||
https://github.com/restic/restic/issues/3751
|
||||
https://github.com/restic/restic/pull/3752
|
|
@ -19,7 +19,7 @@ func fsyncDir(dir string) error {
|
|||
}
|
||||
|
||||
err = d.Sync()
|
||||
if errors.Is(err, syscall.ENOTSUP) {
|
||||
if errors.Is(err, syscall.ENOTSUP) || errors.Is(err, syscall.ENOENT) || errors.Is(err, syscall.EINVAL) {
|
||||
err = nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue