summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/common/tdb.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-10-18 21:41:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:21:26 -0500
commitcba142f1ae71b03266210e254c251683846d7fd7 (patch)
treea08bfecb74e2954700df90beca5ee9bb73117a87 /source4/lib/tdb/common/tdb.c
parent403f0c92a734a9bf7709a0af0a0aa9cc89bf3144 (diff)
downloadsamba-cba142f1ae71b03266210e254c251683846d7fd7.tar.gz
samba-cba142f1ae71b03266210e254c251683846d7fd7.tar.bz2
samba-cba142f1ae71b03266210e254c251683846d7fd7.zip
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 (This used to be commit de664ec1f8cf179f1d650563272c0de3f7636e2b)
Diffstat (limited to 'source4/lib/tdb/common/tdb.c')
-rw-r--r--source4/lib/tdb/common/tdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/tdb/common/tdb.c b/source4/lib/tdb/common/tdb.c
index a052ffeb61..52e2d633b0 100644
--- a/source4/lib/tdb/common/tdb.c
+++ b/source4/lib/tdb/common/tdb.c
@@ -42,7 +42,7 @@ static void tdb_increment_seqnum(struct tdb_context *tdb)
return;
}
- if (tdb_brlock(tdb, TDB_SEQNUM_OFS, F_WRLCK, F_SETLKW, 1) != 0) {
+ if (tdb_brlock(tdb, TDB_SEQNUM_OFS, F_WRLCK, F_SETLKW, 1, 1) != 0) {
return;
}
@@ -53,7 +53,7 @@ static void tdb_increment_seqnum(struct tdb_context *tdb)
seqnum++;
tdb_ofs_write(tdb, TDB_SEQNUM_OFS, &seqnum);
- tdb_brlock(tdb, TDB_SEQNUM_OFS, F_UNLCK, F_SETLKW, 1);
+ tdb_brlock(tdb, TDB_SEQNUM_OFS, F_UNLCK, F_SETLKW, 1, 1);
}