Age | Commit message (Collapse) | Author | Files | Lines |
|
(This used to be commit 0177c6ca3e9baa223b5f7b29adc12d862dcb19d8)
|
|
(This used to be commit e615f36733966f9992670e3650fbe9b20d7d218c)
|
|
don't end up doing a mmap read only
(This used to be commit 294ccfd46a0c4e1af9365d028acdabec03c41ad3)
|
|
(This used to be commit 83168c7e76c7e3adcdb0eec1611827d4db09f858)
|
|
alignment constraints (like sparc)
(This used to be commit bce35ad237a55376b6af98416eec92a7c4b422a6)
|
|
(This used to be commit 03942dd54b31e7a4cf9c6270b26ccf68a3234b40)
|
|
tdb_traverse_read() for read only databases
(This used to be commit 9b53e04377d2ff652c4a9496798d2e3aa0dccab3)
|
|
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)
|
|
make sure we don't walk off the end of the hash array
(This used to be commit 3c32f24e2c6a99ec294fb16e1684cd22b08f2df4)
|
|
optimise this case a bit more. The total speedup using non-indexed
ldbtest is now around a factor of 80x. The code is ugly as hell, but
I think this speed is worth it.
Of course, if we only ever do indexed searches in ldb then this
doesn't help, but it seems all too common that we get unindexable
searches, so the optimisation is worthwhile
(This used to be commit 2e14fb893dd9815cdb2488c630131dc549e5c361)
|
|
added a tdb optimisation that speeds up non-indexed ldb by a large
margin (often 10x or more). I'd be interested in any comments on the
safety of this optimisation. See the comment in the code for an
explanation.
(This used to be commit 7f9efaceb6d6dfc0c82923344cc45ec34493f2ed)
|
|
(This used to be commit 8f222c8c7a750c739d3288da0b1edb1efc3b1ffc)
|
|
loops in corrupted tdb files.
Jeremy.
(This used to be commit f9f3037d6855259edd56fd5a23d63dbb37f0a751)
|
|
called from multiple backends. (ldb_sqlite3 needs it too.) Added parameter
for a callback function that determines whether an attribute needs case
folding.
- begin to prepare for sqlite3 in build process
- work-in-progress updates, on ldb_sqlite3
(This used to be commit a80bced0b96ffb655559a43cf7f4d7a34deb5a7d)
|
|
returning NULL/0, which is the same as we used for a failure. Having
to look at tdb->ecode (which we never do) is too error prone.
Instead, tdb_fetch() should behave like malloc() and talloc(), where
zero length is not special and malloc(0) returns a valid pointer.
- similarly in data_blob(), asking for data_blob(NULL, 0) should
return a zero blob, but asking for data_blob(ptr, 0) should return a
zero length blob with a valid pointer, just like talloc() and malloc()
This change fixes the SummaryInformation stream stored in the tdb
backend when manipulated from w2k. The w2k client was using
SET_EOF_INFORMATION to create a zero-length stream, which we return
STATUS_NOT_FOUND on, as the tdb_fetch() gave us back a NULL/0 blob,
which we returned as not-found
(This used to be commit 162bbe4402b9de6ac06103df904b9fc204fbff29)
|
|
tdb we fail gracefully.
Jeremy.
(This used to be commit d69f7c05468ae54e0474b188fedabe14e7297d53)
|
|
(This used to be commit 1ee84e373e2b44c96f9353f194b766d6a144e7ce)
|
|
(This used to be commit dbb56e9a59cf00d57b09ded6d60bf9424d5f1f4c)
|
|
Yaakobovich" <Shlomi@exanet.com>
Jeremy.
(This used to be commit 84f6d2b3dd29c1aa478708db9617a79382158f64)
|
|
less likely that anyone will use pstring for new code
- got rid of winbind_client.h from includes.h. This one triggered a
huge change, as winbind_client.h was including system/filesys.h and
defining the old uint32 and uint16 types, as well as its own
pstring and fstring.
(This used to be commit 9db6c79e902ec538108d6b7d3324039aabe1704f)
|
|
- removed the u32 hack in events.c as I think this was only needed as
tdb.h defines u32. Metze, can you check that this hack is indeed no
longer needed on your suse system?
(This used to be commit 6f79432fe656164d4770dbce114a30dda5e7bf9a)
|
|
outside the tree, instead defined _SAMBA_BUILD_ inside the Samba
build. This makes it easier to pull code out of Samba for external
use.
(This used to be commit 09e98c8745cca7ccb1ad7134c0c09b8e4c0f4f06)
|
|
(This used to be commit a954e707ef5b23af84ef8f622336e36379c4a373)
|
|
ioctl.h)
(This used to be commit b97e395c814762024336c1cf4d7c25be8da5813a)
|
|
include files.
this brings us down to about 11k lines of headers included with
includes.h, while still retaining the speed of building with pch
(This used to be commit 10188869ef072309ca580b8b933e172571fcdda7)
|
|
(This used to be commit 264ce9181089922547e8f6f67116f2d7277a5105)
|
|
they have been broken for 4 years (ever since they were added) and
have been never used, which makes them prime candidates for
destruction.
(This used to be commit 0b53ab85aae4569c04495f07c18a65fd6b47bf4c)
|
|
Spotted by Taj Khattra <taj.khattra@gmail.com>.
Jeremy.
(This used to be commit a7d92301bbf45cb9e475e4876fdbb37644ad5871)
|
|
(This used to be commit 56ecda2178e33508c55c6195ccec41c06e099d6f)
|
|
convert a ... varargs function to a va_list by just a cast!!)
also mark the tdb log function with PRINTF_ATTRIBUTE() and fixed some
bad format errors in tdb.c that jim found.
(This used to be commit c26c92eb8f538748fcbb2ae5a0a8a02bffbbbf86)
|
|
(This used to be commit 17a53eaac2d0d76413c8bb27a6f1c80536ccf3a7)
|
|
Jeremy.
(This used to be commit b43320ee5c9ac14c330e61ae62e0786b088e04fa)
|
|
- #include <stdint.h>
- uint_t isn't a valid type, change back to unsigned int
(This used to be commit f690325565d2393bba3cb9f6e7cdf3753cbd4423)
|
|
metze
(This used to be commit 57151e80eb1090281401930c8fe25b20a8cf3a38)
|
|
metze
(This used to be commit 18062d2ed9fc9224c43143c10efbf2f6f1f5bbe0)
|
|
metze
(This used to be commit b5378803fdcb3b3afe7c2932a38828e83470f61a)
|
|
metze
(This used to be commit 2986c5f08c8f0c26a2ea7b6ce20aae025183109f)
|
|
metze
(This used to be commit af6f1f8a01bebbecd99bc8c066519e89966e65e3)
|
|
metze
(This used to be commit f3b1d3bdc74f08ee2a1d22102d57bff94f71f5a5)
|
|
metze
(This used to be commit 0e5517d937a2eb7cf707991d1c7498c1ab456095)
|
|
metze
(This used to be commit bacab322ce89979f0ad0811cd15b73d81eceb69d)
|