Re: imapd and synchronous writes

Alan Cox (alan@cymru.net)
Fri, 15 Mar 1996 10:40:17 +0000 (GMT)


> What other option do we application developers have? Until Linux came
> along, directory updates had always been committed before the call
> returned. There are no facilities provided to applications to let
> them specify that a directory update needs to be committed to disk.

Not true. If you have any modern disk controller that re-orders writes
from its internal cache then you potentially lose. There are file systems
other than the Linux one that do async writes and will have the same
properties.

> "Sorry, you're just screwed" is not an acceptable answer.

Thats a reasonable argument.

> "Theodore Ts'o" <tytso@MIT.EDU> writes:
> > Actually, there is, but it's not portable. If you open the directory
> > using open, and then call fsync on the resulting file descriptor, you
> > will forcibly commit the directory change. This is *not* guaranteed to
> > work on all POSIX systems, and indeed it may not work on many. But it
> > will work under Linux.
>
> How is an application, written to compile on a broad range of unix
> systems, to know it has to take this particular set of steps?

Add it to gnu autoconf