TDB on OpenBSD problem.
tridge at samba.org
tridge at samba.org
Sun May 6 02:01:40 GMT 2001
> The application must ensure correct synchronization when using mmap()
> in conjunction with any other file access method, such as read() and
> write(), standard input/output, and shmat().
But does it say *how* that synchronisation can be done by the app??
This sounds like a cop-out to me. "we can't work out how to do it -
its the apps responsibility".
> So I added a call to msync() right before the call to test() to the test
> program, and with this I resolve the inconsistency on the 11.0 box I was
> seeing the error on.
an msync() is potentially very expensive. It might even be faster to
drop mmap support on HPUX and use read/write.
The patch jeremy committed seems to work for simple cases, but I'm
concerned that it leaves us with a potential problem if the database
grows beyond the size allowed for mmap by the rlimits for the
process. In that case some of the smbds will drop back to read/write
IO and thus will become inconsistent with the ones that are still
using mmap.
Is this a serious enough problem to worry about? I'm not sure. Can
someone tell me what limits apply to mmap size on HPUX? I tested on
OpenBSD 2.5 and it appears that none of the limits from "ulimit -a"
affect mmap size, so the fix should be OK there.
Cheers, Tridge
More information about the samba-technical
mailing list