On 8.4.2007, at 12.41, Miquel van Smoorenburg wrote:
On Sat, 2007-04-07 at 22:30 +0300, Timo Sirainen wrote:
Although Dovecot is already read-lockless and it uses only short- lived write locks, it's be really nice to just get rid of the locking completely. :)
I just figured out that O_APPEND is pretty great. If the operating system updates seek position after writing to a file opened with O_APPEND, writes to Dovecot's transaction log file can be made lockless.
Doest his mean there's even less chance of indexes working on NFS
(where O_APPEND doesn't really work) ?
No. I haven't forgotten NFS users. You missed this part:
The O_APPEND at least doesn't work with NFS, so it'll have to be
optional anyway.
I'm now trying to think of ways to simplify the index file handling.
That allows me to then implement NFS workarounds more easily, such as
forcing attribute cache flushing when it's needed.