svn commit: samba r14955 - in trunk/source: nsswitch smbd tdb

Gerald (Jerry) Carter jerry at samba.org
Sat Apr 8 12:37:05 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

jra at samba.org wrote:
> Modified: trunk/source/tdb/tdb.c
> ===================================================================
> --- trunk/source/tdb/tdb.c	2006-04-06 22:31:45 UTC (rev 14954)
> +++ trunk/source/tdb/tdb.c	2006-04-06 22:31:47 UTC (rev 14955)
> @@ -2098,11 +2098,27 @@
>  }
>  
>  /* reopen all tdb's */
> -int tdb_reopen_all(void)
> +int tdb_reopen_all(int parent_longlived)
>  {
>  	TDB_CONTEXT *tdb;
>  
>  	for (tdb=tdbs; tdb; tdb = tdb->next) {
> +		/*
> +		 * If the parent is longlived (ie. a
> +		 * parent daemon architecture), we know
> +		 * it will keep it's active lock on a
> +		 * tdb opened with CLEAR_IF_FIRST. Thus
> +		 * for child processes we don't have to
> +		 * add an active lock. This is essential
> +		 * to improve performance on systems that
> +		 * keep POSIX locks as a non-scalable data
> +		 * structure in the kernel.
> +		 */
> +		if (parent_longlived) {
> +			/* Ensure no clear-if-first. */
> +			tdb->flags &= ~TDB_CLEAR_IF_FIRST;
> +		}
> +
>  		if (tdb_reopen(tdb) != 0)
>  			return -1;
>  	}

Jeremy,

Just for clarity's sake, can we make this a BOOL
instead of tdb_reopen_all(1)?





cheers, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEN65xIR7qMdg1EfYRAtV/AJ4vCtupkb88k+jjLGECA+i29DRlMwCfRAa3
g3f8e6QcfzQ6Z7zaUDhqUDs=
=vWUL
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list