summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/common/transaction.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-03-30 04:52:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:59:20 -0500
commit3387746c4517d6766146080980ac467b72b62316 (patch)
treebe82b9daf54552306123f38d88330460825dfcf4 /source4/lib/tdb/common/transaction.c
parent86971ff3b930a93de55aae00fe66f3d1d10dbcb4 (diff)
downloadsamba-3387746c4517d6766146080980ac467b72b62316.tar.gz
samba-3387746c4517d6766146080980ac467b72b62316.tar.bz2
samba-3387746c4517d6766146080980ac467b72b62316.zip
r14799: added a tdb_get_seqnum() call, and the TDB_SEQNUM flag. This allows
for an extremely lightweight test to see if a tdb has possibly changed. (This used to be commit f325ba605ccceca63712c0f2c98961e35e437b3d)
Diffstat (limited to 'source4/lib/tdb/common/transaction.c')
-rw-r--r--source4/lib/tdb/common/transaction.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/tdb/common/transaction.c b/source4/lib/tdb/common/transaction.c
index ace4aa51a6..6960a02ad8 100644
--- a/source4/lib/tdb/common/transaction.c
+++ b/source4/lib/tdb/common/transaction.c
@@ -892,6 +892,12 @@ int tdb_transaction_commit(struct tdb_context *tdb)
tdb_brlock_len(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
+ /*
+ TODO: maybe write to some dummy hdr field, or write to magic
+ offset without mmap, before the last sync, instead of the
+ utime() call
+ */
+
/* on some systems (like Linux 2.6.x) changes via mmap/msync
don't change the mtime of the file, this means the file may
not be backed up (as tdb rounding to block sizes means that