[OpenAFS-devel] The ihandle sync thing
chas williams - CONTRACTOR
chas@cmf.nrl.navy.mil
Fri, 29 Mar 2013 08:00:57 -0400
On Thu, 28 Mar 2013 13:47:18 -0400
Garrett Wollman <wollman@csail.mit.edu> wrote:
> I don't think that even with _POSIX_SYNCHRONIZED_IO the requirements
> are tight enough to be truly useful -- just in the past week there has
> been a discussion in the Austin Group about whether the Standard
> actually requires that fsync() on a newly-created file actually ensure
> that the directory entries for that file be committed to storage.
I doesn't really matter what you think it should be, Linux doesn't do
that. From the fsync() man page:
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.
So, I think that is mildly interesting when you think about the namei
fileserver's operation. I don't think it ever sync's the underlying
filesystem's parent directory for the vnode's (vnode's being either a
file or directory). It seems like this might be a problem for vnode
creation and deletion.