svn commit: samba r23978 - in branches/SAMBA_4_0/source/lib/tdb: common include

obnox at samba.org obnox at samba.org
Fri Jul 20 14:52:48 GMT 2007


Author: obnox
Date: 2007-07-20 14:52:47 +0000 (Fri, 20 Jul 2007)
New Revision: 23978

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

Log:
Merge r23161 from Samba3:

Add TDB_VOLATILE as open_flag to activate the per-hashchain dead record
optimization.


Modified:
   branches/SAMBA_4_0/source/lib/tdb/common/open.c
   branches/SAMBA_4_0/source/lib/tdb/include/tdb.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/tdb/common/open.c
===================================================================
--- branches/SAMBA_4_0/source/lib/tdb/common/open.c	2007-07-20 14:23:12 UTC (rev 23977)
+++ branches/SAMBA_4_0/source/lib/tdb/common/open.c	2007-07-20 14:52:47 UTC (rev 23978)
@@ -164,6 +164,10 @@
 		tdb->page_size = 0x2000;
 	}
 
+	if (open_flags & TDB_VOLATILE) {
+		tdb->max_dead_records = 5;
+	}
+
 	if ((open_flags & O_ACCMODE) == O_WRONLY) {
 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: can't open tdb %s write-only\n",
 			 name));

Modified: branches/SAMBA_4_0/source/lib/tdb/include/tdb.h
===================================================================
--- branches/SAMBA_4_0/source/lib/tdb/include/tdb.h	2007-07-20 14:23:12 UTC (rev 23977)
+++ branches/SAMBA_4_0/source/lib/tdb/include/tdb.h	2007-07-20 14:52:47 UTC (rev 23978)
@@ -46,6 +46,7 @@
 #define TDB_BIGENDIAN 32 /* header is big-endian (internal use) */
 #define TDB_NOSYNC   64 /* don't use synchronous transactions */
 #define TDB_SEQNUM   128 /* maintain a sequence number */
+#define TDB_VOLATILE   256 /* Activate the per-hashchain freelist, default 5 */
 
 #define TDB_ERRCODE(code, ret) ((tdb->ecode = (code)), ret)
 



More information about the samba-cvs mailing list