1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/lib/tdb/common
Rusty Russell fde694274e lib/tdb: fix OpenBSD incoherent mmap.
This comment appears in two places in the code (commit
4c6a8273c6 from 2001):

	/*
	 * We must ensure the file is unmapped before doing this
	 * to ensure consistency with systems like OpenBSD where
	 * writes and mmaps are not consistent.
	 */

But this doesn't help, because if one process is using mmap and another
using pwrite, we get incoherent results.  As demonstrated by OpenBSD's
failure on the tdb unit tests.

Rather than disable mmap on OpenBSD, we test for this issue and force mmap
to be enabled.  This means that we will fail on very large TDBs on 32-bit
systems, but it's better than the horrendous performance penalty on every
OpenBSD system.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-22 01:57:37 +01:00
..
check.c tdb: be more careful on 4G files. 2011-12-19 07:52:01 +01:00
dump.c tdb: Set _PUBLIC_ in C file rather than header files (Debian bug 600898) 2010-10-21 11:47:22 +00:00
error.c tdb: Set _PUBLIC_ in C file rather than header files (Debian bug 600898) 2010-10-21 11:47:22 +00:00
freelist.c tdb: be more careful on 4G files. 2011-12-19 07:52:01 +01:00
freelistcheck.c tdb: Set _PUBLIC_ in C file rather than header files (Debian bug 600898) 2010-10-21 11:47:22 +00:00
hash.c tdb: enable VALGRIND to remove valgrind noise. 2011-06-08 11:05:47 +02:00
io.c lib/tdb: fix OpenBSD incoherent mmap. 2012-03-22 01:57:37 +01:00
lock.c tdb: Set _PUBLIC_ in C file rather than header files (Debian bug 600898) 2010-10-21 11:47:22 +00:00
open.c lib/tdb: fix OpenBSD incoherent mmap. 2012-03-22 01:57:37 +01:00
summary.c tdb: make sure we skip over recovery area correctly. 2011-04-19 14:15:22 +02:00
tdb_private.h lib/tdb: fix OpenBSD incoherent mmap. 2012-03-22 01:57:37 +01:00
tdb.c Fix compile when TDB_TRACE is enabled. 2012-01-06 04:16:41 +01:00
transaction.c tdb: don't free old recovery area when expanding if already at EOF. 2011-12-21 06:25:40 +01:00
traverse.c tdb: Set _PUBLIC_ in C file rather than header files (Debian bug 600898) 2010-10-21 11:47:22 +00:00