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

Re: svn_io_file_flush_to_disk fails on AFS filesystems on Darwin

From: Branko Čibej <brane_at_apache.org>
Date: Thu, 12 Nov 2020 17:38:06 +0100

On 26.06.2019 17:48, Branko Čibej wrote:
> On 26.06.2019 04:52, Quentin Smith wrote:
>> Hi,
>>
>> 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.
> First of all, thanks for the repor.
>
> Please provide a standalone reproduction script, using our command-line
> client.
>
> Last but not least, I do wish filesystems were consistent in their
> implementation ... what on earth is ENOTTY doing here?

Sometimes it's good to have ages old browser tabs lying around. This is
now fixed in apr_file_datasync on APR trunk and the 1.7.x branch.

-- Brane

https://svn.apache.org/viewvc?view=revision&revision=1883341
Received on 2020-11-12 17:38:11 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.