Age | Commit message (Collapse) | Author | Files | Lines |
|
(This used to be commit 9b867d2acffdfdcd5dc1dd5341db19daf11b5e96)
|
|
more portable. tdb is used in more than just Samba4, and I think the
portability/readability balance is a bit different
(This used to be commit fc692dc61f06d61cb9126d2a8ccc240cecd11da6)
|
|
- more workarounds for aix not handling malloc of size 0
(This used to be commit c2b1739c6389503854f55fa8407c55071781eff4)
|
|
(This used to be commit 0177c6ca3e9baa223b5f7b29adc12d862dcb19d8)
|
|
don't end up doing a mmap read only
(This used to be commit 294ccfd46a0c4e1af9365d028acdabec03c41ad3)
|
|
allowing searches to proceed while another process is in a
transaction, then only upgrading the transaction lock to a write lock
on commit.
The solution is:
- split tdb_traverse() into two calls, called tdb_traverse() and
tdb_traverse_read(). The _read() version only gets read locks, and
will fail any write operations made in the callback from the
traverse.
- the normal tdb_traverse() call allows for read or write operations
in the callback, but gets the transaction lock, preventing
transastions from starting inside the traverse
In addition we enforce the following rule that you may not start a
transaction within a traverse callback, although you can start a
traverse within a transaction
With these rules in place I believe all the deadlock possibilities are
removed, and we can now allow for searches to happen in parallel with
transactions
(This used to be commit 7dd31288a701d772e45b1960ac4ce4cc1be782ed)
|
|
samba-technical posting for more details on the transactions design.
This also adds a number of command line arguments to tdbtorture,
making it more flexible, and fixes some lock deadlock conditions in
the tdbtorture code.
(This used to be commit 06bd8abba942ec9f1e23f5c5d546cbb71ca3a701)
|
|
(This used to be commit 360be7028c2244391cdd9ed6d156cec8dab9e9e9)
|
|
just involves splitting up the core tdb.c code into separate files on
logical boundaries, but there are some minor functional changes as well:
- move the 'struct tdb_context' into tdb_private.h, hiding it from
users. This was done to allow the structure to change without
breaking code that uses tdb.
- added accessor functions tdb_fd(), tdb_name(), and tdb_log_fn() to
access the elements of struct tdb_context that were used by
external code but are no longer visible
- simplied tdb_append() to use tdb_fetch()/tdb_store(), which is just
as good due to the way tdb locks work
- changed some of the types (such as tdb_off to tdb_off_t) to make
syntax highlighting work better
- removed the old optional spinlock code. It was a bad idea.
- fixed a bug in tdb_reopen_all() that caused tdbtorture to sometimes
fail or report nasty looking errors. This is the only real bug
fixed in this commit. Jeremy/Jerry, you might like to pickup this
change for Samba3, as that could definately affect smbd in
Samba3.
The aim of all of these changes is to make the tdb
transactions/journaling code I am working on easier to write. I
started to write it on top of the existing tdb.c code and it got very
messy. Splitting up the code makes it much easier to follow.
There are more cleanups we could do in tdb, such as using uint32_t
instead of u32 (suggested by metze). I'll leave those for another day.
(This used to be commit 4673cdd0d261614e707b72a7a348bb0e7dbb2482)
|