Rev 622: use TDB_CLEAR_IF_FIRST even when read-only for all
non-persistent tdbs. This in http://samba.org/~tridge/3_0-ctdb
tridge at samba.org
tridge at samba.org
Thu Sep 20 01:54:07 GMT 2007
------------------------------------------------------------
revno: 622
revision-id: tridge at samba.org-20070920015405-8eaeh15cjd7x8pt9
parent: tridge at samba.org-20070919030940-xko96r4ka7zgz6ot
committer: Andrew Tridgell <tridge at samba.org>
branch nick: s3-ctdb-tridge
timestamp: Thu 2007-09-20 11:54:05 +1000
message:
use TDB_CLEAR_IF_FIRST even when read-only for all non-persistent tdbs. This
is ignored by the tdb backend, but can be used by the ctdb backend to work out if a db is persistent or not
modified:
source/lib/conn_tdb.c conn_tdb.c-20070428165234-v42k4o13p6tqo5cr-1
source/locking/brlock.c brlock.c-20070210173807-1wjifrbwaz6xnmgl-635
source/locking/locking.c locking.c-20070210173807-1wjifrbwaz6xnmgl-636
=== modified file 'source/lib/conn_tdb.c'
--- a/source/lib/conn_tdb.c 2007-06-17 16:15:49 +0000
+++ b/source/lib/conn_tdb.c 2007-09-20 01:54:05 +0000
@@ -35,7 +35,7 @@
}
else {
db_ctx = db_open(NULL, lock_path("connections.tdb"), 0,
- TDB_DEFAULT, O_RDONLY, 0);
+ TDB_CLEAR_IF_FIRST|TDB_DEFAULT, O_RDONLY, 0);
}
return db_ctx;
=== modified file 'source/locking/brlock.c'
--- a/source/locking/brlock.c 2007-08-19 21:14:11 +0000
+++ b/source/locking/brlock.c 2007-09-20 01:54:05 +0000
@@ -274,7 +274,7 @@
}
brlock_db = db_open(NULL, lock_path("brlock.tdb"),
lp_open_files_db_hash_size(),
- TDB_DEFAULT|(read_only?0x0:TDB_CLEAR_IF_FIRST),
+ TDB_DEFAULT | TDB_CLEAR_IF_FIRST,
read_only?O_RDONLY:(O_RDWR|O_CREAT), 0644 );
if (!brlock_db) {
DEBUG(0,("Failed to open byte range locking database %s\n",
=== modified file 'source/locking/locking.c'
--- a/source/locking/locking.c 2007-06-02 08:52:40 +0000
+++ b/source/locking/locking.c 2007-09-20 01:54:05 +0000
@@ -374,7 +374,7 @@
lock_db = db_open(NULL, lock_path("locking.tdb"),
lp_open_files_db_hash_size(),
- TDB_DEFAULT|(read_only?0x0:TDB_CLEAR_IF_FIRST),
+ TDB_DEFAULT | TDB_CLEAR_IF_FIRST,
read_only?O_RDONLY:O_RDWR|O_CREAT, 0644);
if (!lock_db) {
More information about the samba-cvs
mailing list