From af4c1fb7a3f428ff704af22294ad955d05ed41dd Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Wed, 14 Oct 2020 00:35:16 +0200 Subject: syscallcompat: retry ops on EINTR Retry operations that have been shown to throw EINTR errors on CIFS. Todo: Solution for this pain in the back: warning: unix.Getdents returned errno 2 in the middle of data rm: cannot remove 'linux-3.0.old3/Documentation/ABI/removed': Input/output error Progress towards fixing https://github.com/rfjakob/gocryptfs/issues/483 . --- internal/nametransform/diriv.go | 1 + 1 file changed, 1 insertion(+) (limited to 'internal/nametransform') diff --git a/internal/nametransform/diriv.go b/internal/nametransform/diriv.go index cd20ca6..6dbf028 100644 --- a/internal/nametransform/diriv.go +++ b/internal/nametransform/diriv.go @@ -23,6 +23,7 @@ const ( // ReadDirIVAt reads "gocryptfs.diriv" from the directory that is opened as "dirfd". // Using the dirfd makes it immune to concurrent renames of the directory. +// Retries on EINTR. func ReadDirIVAt(dirfd int) (iv []byte, err error) { fdRaw, err := syscallcompat.Openat(dirfd, DirIVFilename, syscall.O_RDONLY|syscall.O_NOFOLLOW, 0) -- cgit v1.2.3