diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-03-30 04:52:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:59:20 -0500 |
commit | 3387746c4517d6766146080980ac467b72b62316 (patch) | |
tree | be82b9daf54552306123f38d88330460825dfcf4 /source4/lib/tdb/common/tdb_private.h | |
parent | 86971ff3b930a93de55aae00fe66f3d1d10dbcb4 (diff) | |
download | samba-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/tdb_private.h')
-rw-r--r-- | source4/lib/tdb/common/tdb_private.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/tdb/common/tdb_private.h b/source4/lib/tdb/common/tdb_private.h index d7193b2b67..d01a88695d 100644 --- a/source4/lib/tdb/common/tdb_private.h +++ b/source4/lib/tdb/common/tdb_private.h @@ -94,6 +94,7 @@ typedef u32 tdb_off_t; #define TDB_HASHTABLE_SIZE(tdb) ((tdb->header.hash_size+1)*sizeof(tdb_off_t)) #define TDB_DATA_START(hash_size) TDB_HASH_TOP(hash_size-1) #define TDB_RECOVERY_HEAD offsetof(struct tdb_header, recovery_start) +#define TDB_SEQNUM_OFS offsetof(struct tdb_header, sequence_number) #define TDB_PAD_BYTE 0x42 #define TDB_PAD_U32 0x42424242 @@ -155,7 +156,8 @@ struct tdb_header { u32 hash_size; /* number of hash entries */ tdb_off_t rwlocks; /* obsolete - kept to detect old formats */ tdb_off_t recovery_start; /* offset of transaction recovery region */ - tdb_off_t reserved[30]; + tdb_off_t sequence_number; /* used when TDB_SEQNUM is set */ + tdb_off_t reserved[29]; }; struct tdb_lock_type { |