[dovecot] Re: Architectural questions

Timo Sirainen tss at iki.fi
Mon Oct 21 16:15:28 EEST 2002


On Mon, 2002-10-21 at 14:51, Thomas Wouters wrote:
> Hmm. I'm not sure what kind of behaviour you're looking for, but here's what
> I see, using a little Python script on our FreeBSD servers with a
> netapp-mounted filesystem. Mapping MAP_SHARED and PROT_READ|PROT_WRITE, two
> different machines mounting the same directory, two processes on each
> machine mmap()ing the same file.
> 
> When one process alters the data, the other process on the same machine sees
> it instantly. The processes on the other machine do not see it at all, not
> even when re-opening the mmap or being restarted. After doing an msync() in
> the process that altered the data, the processes on the other machine still
> don't see the change; they have to re-open the mmap or be restarted before
> they see the change -- but when one of the processes re-opens or restarts,
> the other does see the change without doing anything.

Requiring msync() is fine, that's done after each change, but there
should be better solution than re-mmap()ing to notice the changes. I
think FreeBSD checked the changes after fcntl() locking changes :)




More information about the dovecot mailing list