summaryrefslogtreecommitdiff
path: root/lib/tdb/common/traverse.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-03-25 10:19:48 +0100
committerVolker Lendecke <vl@samba.org>2010-03-25 10:24:45 +0100
commitea8e0d5d54b020c530e392c4edaeed43e20af303 (patch)
tree550ea6372e166df4b7d2fc02261a23012676f7a9 /lib/tdb/common/traverse.c
parent0a65bb57a18176a4aaa6972c025062577b124ee7 (diff)
downloadsamba-ea8e0d5d54b020c530e392c4edaeed43e20af303.tar.gz
samba-ea8e0d5d54b020c530e392c4edaeed43e20af303.tar.bz2
samba-ea8e0d5d54b020c530e392c4edaeed43e20af303.zip
Fix some nonempty blank lines
Diffstat (limited to 'lib/tdb/common/traverse.c')
-rw-r--r--lib/tdb/common/traverse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/tdb/common/traverse.c b/lib/tdb/common/traverse.c
index d329ef4da4..baaf58ae87 100644
--- a/lib/tdb/common/traverse.c
+++ b/lib/tdb/common/traverse.c
@@ -6,11 +6,11 @@
Copyright (C) Andrew Tridgell 1999-2005
Copyright (C) Paul `Rusty' Russell 2000
Copyright (C) Jeremy Allison 2000-2003
-
+
** NOTE! The following LGPL license applies to the tdb
** library. This does NOT imply that all of Samba is released
** under the LGPL
-
+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
@@ -44,7 +44,7 @@ static tdb_off_t tdb_next_lock(struct tdb_context *tdb, struct tdb_traverse_lock
common for the use of tdb with ldb, where large
hashes are used. In that case we spend most of our
time in tdb_brlock(), locking empty hash chains.
-
+
To avoid this, we do an unlocked pre-check to see
if the hash chain is empty before starting to look
inside it. If it is empty then we can avoid that
@@ -52,7 +52,7 @@ static tdb_off_t tdb_next_lock(struct tdb_context *tdb, struct tdb_traverse_lock
the value we get back, as we read it without a
lock, so instead we get the lock and re-fetch the
value below.
-
+
Notice that not doing this optimisation on the
first hash chain is critical. We must guarantee
that we have done at least one fcntl lock at the
@@ -62,7 +62,7 @@ static tdb_off_t tdb_next_lock(struct tdb_context *tdb, struct tdb_traverse_lock
could possibly miss those with this trick, but we
could miss them anyway without this trick, so the
semantics don't change.
-
+
With a non-indexed ldb search this trick gains us a
factor of around 80 in speed on a linux 2.6.x
system (testing using ldbtest).