Age | Commit message (Collapse) | Author | Files | Lines |
|
lock-tracking.c mirrors the in-kernel fcntl structures to detect
unexpected use of fcntl calls. During my mutex work I changed our fcntl
use so that we unlock the allrecord_lock in two pieces: The range covering
the hash locks and the range covering the data area for the individual
traverse record locks. Splitting locks is not covered by lock-tracking.c.
This patch extends lock-tracking.c with this little piece. It's still
far from complete to track the full range of fcntl semantics. It is not
strictly needed right now, but it does not hurt either.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
This allows for an emergency best-effort dump. It's a little better than
strings(1).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Aug 10 23:33:20 CEST 2012 on sn-devel-104
|
|
|
|
Commit 3c4263e7580143c69225729f5b67f09c00add2fd said it removed err.h
from tdb, unfortuntely it didn't: tap-interface.h still included it.
This finishes it properly!
Reported-by:Stefan Metzmacher <metze@samba.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Tue Jun 26 10:22:03 CEST 2012 on sn-devel-104
|
|
It's not portable. While we could use ccan/err, it seems overkill since
we actually only use it in one test (I obviously cut & paste the #include).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Fri Jun 22 09:22:28 CEST 2012 on sn-devel-104
|
|
(As suggested by Stefan Metzmacher, based on the change to ntdb.)
Since commit ec96ea690edbe3398d690b4a953d487ca1773f1c, we handle the case
where a process dies during a transaction commit. Unfortunately, TDB_NOSYNC
means this no longer works, as it disables the recovery area as well as the
actual msync/fsync. We should do everything except the syncs.
This also means we can do a complete test with $TDB_NO_FSYNC set; just
to get more complete coverage, we disable it explicitly for one test
(where we override the actual sync calls anyway).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Since we force mmap on, we don't intercept writes to the db, so we never
see it in an inconsistent state. #ifdef over the check that we should have
recovered it at least once.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
This comment appears in two places in the code (commit
4c6a8273c6dd3e2aeda5a63c4a62aa55bc133099 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>
|
|
By using a different include order, we end up with a different version of
FILE_OFFSET_BITS (and probably other things) in parts of the test. The
different variants get linked together, and the result is weird: the stat
returns 0 size.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
These were relics: they don't need to be defined here as long as we are
careful to include the replace headers before any standard headers (we are).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Wed Mar 14 10:12:26 CET 2012 on sn-devel-104
|
|
1) Make sure we include "tdb_private.h" first, to get the right headers
(esp. the correct setting of _FILE_OFFSET_BITS before unistd.h).
2) Fix 3G file test since expand logic has changed.
3) Fix nested transaction test, since default is to allow nesting.
4) Capture fdatasync, which was slowing down transaction expand.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
We could use subunit, but that's overkill. Just print messages when
we fail, and use exit status.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
I pulled tdb into CCAN as an experiment a while ago; it doesn't belong
there, but it has accumulated some important unit tests.
These are copied from CCAN version init-1486-gc438ec1 with #include "../"
changed to #include "../common/".
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|