Hi, On Tue, Feb 05, 2002 at 10:47:28AM -0500, Wietse Venema wrote: > Wietse Venema: > > maildir delivery requires that certain file system operations are > > atomic and synchronous. > [...] > > Translated into ext3 speak that means: the link and unlink operations > > are written to the log before the respective system call returns. > > Stephen C. Tweedie: > > Synchronous IO is *always* guaranteed to be persistent on disk on > > return, and ext3 also makes firm atomicity guarantees about all > > deletes, renames etc. > > Are the default mount options of ext3fs such that link() and rename() > are synchronous? No, but they will be if you chattr +S the directory, or if you fsync either the dir or any files in that dir. > If not, what hoop jumping do you recommend? Is fsync() on an open > file guaranteed to take care of all a file's directory entries In ext3, yes. fsync syncs the inode and all metadata it depends on, and that will always include directory information (you can't sync the inode without syncing directory references or you'd risk having the inode i_nlinks field incorrect, which violates ext3's consistency guarantees on recovery.) Cheers, Stephen