QMail and SoftUpdates

Nikita Danilov Nikita at Namesys.COM
Mon May 17 10:56:17 PDT 2004

Xin LI writes:
 > On Mon, May 17, 2004 at 01:18:15PM -0400, Mikhail Teterin wrote:
 > > The link at
 > > 
 > > 	http://cr.yp.to/qmail/faq/reliability.html#filesystems
 > > 
 > > claims, using SoftUpdates for mailqueue is dangerous. Is that still
 > > true? Thanks!
 > Yes, it is dangerous. Same is true for any journalling file systems,
 > which essentially does the same thing: delayed write of data/metadata.
 > Delayed write will make it possible for the Operating System to group
 > several writes together and write them once, or at least, in a better
 > order in order to improve performance. However, for the mail case, once
 > it responds "250", then the remote peer is allowed to remove the message
 > from its queue. If the system crashes, and the data was not written into
 > disk, then your message is lost.

Unless mail-server did fsync(2) which is guaranteed to return only after
data reached stable storage. If file-system doesn't provide such
guarantee it's broken, if mail server doesn't call fsync, or
fdatasync---it is. Even without any journalling involved.


More information about the freebsd-fs mailing list