[OpenAFS-devel] The ihandle sync thing

Garrett Wollman wollman@csail.mit.edu
Fri, 29 Mar 2013 13:29:02 -0400


<<On Fri, 29 Mar 2013 11:58:08 -0400 (EDT), Benjamin Kaduk <kaduk@MIT.EDU> said:

> On Fri, 29 Mar 2013, chas williams - CONTRACTOR wrote:
>> I doesn't really matter what you think it should be, Linux doesn't do
>> that. From the fsync() man page:

> The whole world is not linux...

>> Calling fsync() does not necessarily ensure that the entry in the
>> directory containing the file has  also  reached  disk.  For that
>> an explicit fsync() on a file descriptor for the directory is also
>> needed.

> The FreeBSD kernel fsync() implementation does not explicitly sync the 
> directory containing the file, either.

Actually, UFS/Soft Updates does effectively guarantee this, for
newly-created files, but other filesystem implementations do not, and
as I mentioned, POSIX makes few promises.  (It does prohibit calling
fsync() on a directory, so if you do that you're already invoking the
nasal demons.)

-GAWollman