summaryrefslogtreecommitdiff
path: root/source4/ntvfs/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-29 07:29:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:00 -0500
commitdbf03959244c392073281c10badd2095397ad2f2 (patch)
tree427e9fb6143cd2a2b66b6804a8c5339272115e47 /source4/ntvfs/common
parent0caeda53d37740d18b38e6d37d0ecef8c6336820 (diff)
downloadsamba-dbf03959244c392073281c10badd2095397ad2f2.tar.gz
samba-dbf03959244c392073281c10badd2095397ad2f2.tar.bz2
samba-dbf03959244c392073281c10badd2095397ad2f2.zip
r3357: removed the need to use TDB_CLEAR_IF_FIRST in Samba4.
We found a few months ago that TDB_CLEAR_IF_FIRST is extremely inefficient for large numbers of connections, due to a fundamental limitation in the way posix byte range locking is implemented. Rather than the nasty workaround we had for Samba3, we now have a single "cleanup tmp files" function that runs when smbd starts. That deletes the tmp tdbs, so TDB_CLEAR_IF_FIRST is not needed at all. (This used to be commit ffa285bc783c775a2d53a58fb691ca339e6c76ae)
Diffstat (limited to 'source4/ntvfs/common')
-rw-r--r--source4/ntvfs/common/brlock.c2
-rw-r--r--source4/ntvfs/common/opendb.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source4/ntvfs/common/brlock.c b/source4/ntvfs/common/brlock.c
index b43f0705a5..0f6af3e971 100644
--- a/source4/ntvfs/common/brlock.c
+++ b/source4/ntvfs/common/brlock.c
@@ -84,7 +84,7 @@ struct brl_context *brl_init(TALLOC_CTX *mem_ctx, servid_t server, uint16_t tid,
path = lock_path(brl, "brlock.tdb");
brl->w = tdb_wrap_open(brl, path, 0,
- TDB_DEFAULT|TDB_CLEAR_IF_FIRST,
+ TDB_DEFAULT,
O_RDWR|O_CREAT, 0600);
talloc_free(path);
if (brl->w == NULL) {
diff --git a/source4/ntvfs/common/opendb.c b/source4/ntvfs/common/opendb.c
index d8ca4c999d..a66549b764 100644
--- a/source4/ntvfs/common/opendb.c
+++ b/source4/ntvfs/common/opendb.c
@@ -88,7 +88,7 @@ struct odb_context *odb_init(TALLOC_CTX *mem_ctx, servid_t server, uint16_t tid,
path = lock_path(odb, "openfiles.tdb");
odb->w = tdb_wrap_open(odb, path, 0,
- TDB_DEFAULT|TDB_CLEAR_IF_FIRST,
+ TDB_DEFAULT,
O_RDWR|O_CREAT, 0600);
talloc_free(path);
if (odb->w == NULL) {