[Dovecot] 1.0.rc22 released

Timo Sirainen tss at iki.fi
Tue Feb 6 20:10:47 UTC 2007


On Tue, 2007-02-06 at 11:55 -0800, Dan Price wrote:
> Out of curiosity, why do you feel that the other fsyncs are more
> beneficial?  At least on ZFS, you don't have the problem of stale dirty
> data sitting around in memory (and not on the platter) for long periods
> of time.

Well it's not a real problem in many cases. Its only purpose is to
prevent problems that could happen in case the computer dies before the
data was written to disk. Dovecot uses it in two situations:

1. When mail is saved, it's fsync()ed before the client is told that the
save succeeded. This is probably more important with deliver than in
IMAP APPEND, because deliver would lose an incoming mail that was never
even seen by the user.

Actually I'm missing one fsync() here with maildir. I should open the
new/ directory and fsync() it too. Currently I'm just fsyncing the
individual maildir files.

2. There are several places in Dovecot where it updates the file by
first writing it to a temporary file, then fsyncs it, then rename()s it
over the destination file. The point here is that in case of a crash it
doesn't leave broken files lying around.

Looks like I'm not fsyncing enough in this case either. subscriptions
file and maildir-keywords file should be fsynced.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070206/cc5fada1/attachment.pgp 


More information about the dovecot mailing list