[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svn_io_file_flush_to_disk fails on AFS filesystems on Darwin

From: Quentin Smith <quentin_at_mit.edu>
Date: Tue, 25 Jun 2019 22:52:28 -0400 (EDT)


svn_io_file_flush_to_disk in subversion/libsvn_subr/io.c fails to flush
files on AFS filesystems on Darwin. The user-visible experience is:

$ svn commit
svn: E000025: Commit failed (details follow):
svn: E000025: Can't write '/afs/path/db/txn-current' atomically
svn: E000025: Can't flush file '/afs/path/db/svn-CNFY6N' to disk: Inappropriate ioctl for device

This is because Darwin defines F_FULLFSYNC, which on AFS (and maybe other
filesystems?) returns ENOTTY.

The code ignores EINVAL with a comment about filesystems that don't
support it; evidently on Darwin this also needs to include ENOTTY.

(Also, I suspect it should fall back from fcntl to fsync, since I suspect
fsync /does/ work on AFS filesystems.)

I repro'd this with svn 1.10.3 (r1842928), but inspection of trunk
confirms the code has not changed.

Received on 2019-06-26 08:29:02 CEST

This is an archived mail posted to the Subversion Dev mailing list.