[Dovecot] Avoiding Hardlinks (was: Something other than dotlock for uidlist locking?)

Ben Schumacher me at benschumacher.com
Thu Aug 10 00:06:46 EEST 2006


On 8/9/06, James Berry <james at jberry.us> wrote:
> maildir-save.c: [NEED HELP]
>
>         In maildir_file_move(), there seems to be no fallback case, and I'm
> unsure of the desired  symantics, so I could use some suggestions
> here: can we just fall back into something like the code in file-copy.c?

James-

This probably has to do with the way that Maildir's work. Check out
this links for details:

http://cr.yp.to/proto/maildir.html
http://en.wikipedia.org/wiki/Maildir

The use of hardlinks give you a level of atomicity and efficiency that
I'm not sure you're going to achieve using a standard copy, but I
suppose if HFS+ doesn't handle hardlinks well then it's not doing much
for you. Basically the hardlink solution gives you good atomicity even
through a process crash/kill... something that a straight data copy
and delete can't easily ensure.

It's really unfortunate that Apple made such an enormously poor
decision in the implementation of HFS+. Any chance you could just use
a UFS1 or UFS2 formatted drive for your mail storage?

Good luck,
Ben


More information about the dovecot mailing list