svn commit: samba r10253 - in branches/SAMBA_4_0/source/lib: . ldb/ldb_tdb tdb tdb/common tdb/include tdb/tools

tridge at samba.org tridge at samba.org
Fri Sep 16 03:52:46 GMT 2005


Author: tridge
Date: 2005-09-16 03:52:42 +0000 (Fri, 16 Sep 2005)
New Revision: 10253

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10253

Log:

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.


Added:
   branches/SAMBA_4_0/source/lib/tdb/common/dump.c
   branches/SAMBA_4_0/source/lib/tdb/common/error.c
   branches/SAMBA_4_0/source/lib/tdb/common/freelist.c
   branches/SAMBA_4_0/source/lib/tdb/common/io.c
   branches/SAMBA_4_0/source/lib/tdb/common/lock.c
   branches/SAMBA_4_0/source/lib/tdb/common/open.c
   branches/SAMBA_4_0/source/lib/tdb/common/tdb_private.h
   branches/SAMBA_4_0/source/lib/tdb/common/traverse.c
   branches/SAMBA_4_0/source/lib/tdb/include/tdbconfig.h.in
Removed:
   branches/SAMBA_4_0/source/lib/tdb/common/spinlock.c
   branches/SAMBA_4_0/source/lib/tdb/include/spinlock.h
Modified:
   branches/SAMBA_4_0/source/lib/db_wrap.c
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c
   branches/SAMBA_4_0/source/lib/tdb/Makefile.in
   branches/SAMBA_4_0/source/lib/tdb/autogen.sh
   branches/SAMBA_4_0/source/lib/tdb/common/tdb.c
   branches/SAMBA_4_0/source/lib/tdb/common/tdbutil.c
   branches/SAMBA_4_0/source/lib/tdb/config.m4
   branches/SAMBA_4_0/source/lib/tdb/config.mk
   branches/SAMBA_4_0/source/lib/tdb/configure.in
   branches/SAMBA_4_0/source/lib/tdb/include/tdb.h
   branches/SAMBA_4_0/source/lib/tdb/include/tdbutil.h
   branches/SAMBA_4_0/source/lib/tdb/tools/tdbdump.c
   branches/SAMBA_4_0/source/lib/tdb/tools/tdbtest.c
   branches/SAMBA_4_0/source/lib/tdb/tools/tdbtool.c
   branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c


Changeset:
Sorry, the patch is too large (5586 lines) to include; please use WebSVN to see it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10253


More information about the samba-cvs mailing list