maildir with softupdates

David Schultz das at FreeBSD.ORG
Wed Jul 23 17:20:14 PDT 2003


On Wed, Jul 23, 2003, Brad Knowles wrote:
> > The statement is FUD; this is a topic that mailer people love to
> > complain about.  It's only true if your MTA doesn't call fsync()
> > when it wants to guarantee that the file it just wrote is on
> > stable storage.
> 
> 	The MTA does not know anything about maildir.  This would be a 
> local delivery agent (LDA) issue, not an MTA issue.

Brain fart.  Thanks for the correction.

> 	Moreover, the software not only needs to issue an fsync() on the 
> file, it also needs to issue an fsync() on the directory, in order to 
> have reasonable guarantees that the date has been safely written.

Softupdates automatically syncs the parent directory (and its
parent, etc) when you fsync() the file.  The bug that I mentioned
ext3 had was that it didn't do this.  Actually, it may be too
harsh to call it a bug, given that POSIX has rather lax
requirements regarding what fsync() is required to do, but most
applications I've looked at in regards to this issue assume the
behavior that softupdates has.


More information about the freebsd-chat mailing list