1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-08 16:23:49 +03:00
Commit Graph

17 Commits

Author SHA1 Message Date
Jelmer Vernooij
f90a698387 r24336: Use standard data type uint32_t rather than tdb-specific u32. 2007-10-10 15:01:39 -05:00
Michael Adam
eb524df0a5 r23979: Fix another occurence of (written != requested) as an
error condition to write. This is in tdb_new_database.

Fix one call to tdb_new_database in tdb_open_ex to not
overwrite the newly propagated errno (typically ENOSPC).

Michael
2007-10-10 15:01:14 -05:00
Michael Adam
868cdb1781 r23978: Merge r23161 from Samba3:
Add TDB_VOLATILE as open_flag to activate the per-hashchain dead record
optimization.
2007-10-10 15:01:14 -05:00
Andrew Tridgell
40c0919aaa r23798: updated old Temple Place FSF addresses to new URL 2007-10-10 14:59:15 -05:00
Andrew Tridgell
84b468b2f8 r23795: more v2->v3 conversion 2007-10-10 14:59:14 -05:00
Stefan Metzmacher
902a76ca70 r22041: merge trivial changes from samba3
metze
2007-10-10 14:49:45 -05:00
Volker Lendecke
98a27ab28a r21722: Add the dead record functionality presented on samba-technical@samba.org. If
you do a tdb_set_max_dead(tdb, n), then for this tdb a delete operation will
only mark a record as dead and re-use it if a new record is created. The
parameter n allows for at most n dead records per hash chain. If this number
is exceeded, all dead records are put on the central freelist.

Volker
2007-10-10 14:49:18 -05:00
Volker Lendecke
7b5db2e472 r21303: As discussed on samba-technical: Change the static array for the in-memory
mirrors of the hash chain locks to a dynamically allocated one.

Jeremy, I count on you to revert it if the build farm freaks out, it's after
midnight here :-)

Volker
2007-10-10 14:48:06 -05:00
Andrew Tridgell
db3211079f r19423: merge some tdb changes from SAMBA_3_0 to SAMBA_4_0
this is in preparation of a merge in the other direction
2007-10-10 14:21:29 -05:00
Andrew Tridgell
de664ec1f8 r19401: make tdb_lockall() much more efficient, and add a tdb_lockall_read()
call which does a read lock on all chains. These will be used to make
ldb searches more efficient
2007-10-10 14:21:26 -05:00
Andrew Bartlett
5d5503e8d8 r16916: Implement metze's proposed changes to the tdb logging API.
This clearly links the log function with its private pointer, and
makes the argument list for tdb_open_ex a bit shorter.

Andrew Bartlett
2007-10-10 14:09:59 -05:00
Stefan Metzmacher
249bf24a40 r16776: fix typo
metze
2007-10-10 14:09:45 -05:00
Andrew Bartlett
58898092c1 r16774: This patch modifies the tdb API to allow the logging function to be used
as part of ldb.

This allows tdb failures to be passed all the way up to Samba's DEBUG
system, which allowed easier debugging.

Unfortunately I had to extend the tdb API, as the logging function
didn't have a context pointer.

I've worked over the 'debug levels' in TDB.  Most of them were 0,
which didn't seem right, as some were trace-like messages.  We didn't
see any of these previously, except when accessing TDB directly.

Andrew Bartlett
2007-10-10 14:09:45 -05:00
Volker Lendecke
5f1d52f232 r15100: Port the bugfix for #3569 to Samba4 2007-10-10 14:04:09 -05:00
Andrew Tridgell
83168c7e76 r10461: fixed tdb build on systems without stdint.h 2007-10-10 13:38:48 -05:00
Andrew Tridgell
06bd8abba9 r10405: added transactions into tdb, and hook them into ldb. See my
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.
2007-10-10 13:38:41 -05:00
Andrew Tridgell
4673cdd0d2 r10253: a fairly large tdb cleanup and re-organise. Nearly all of this change
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.
2007-10-10 13:38:12 -05:00