diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-02-04 23:35:53 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-05-22 21:05:15 +0200 |
commit | c29e64d97ee18e9d7946151052d1757084f861c6 (patch) | |
tree | a812e911fe41dad0e4ed02ffcf9bbd9c895b299a /lib/tdb/common/tdb_private.h | |
parent | c0b0648555cd6193a587da4810ac2b0543497ea8 (diff) | |
download | samba-c29e64d97ee18e9d7946151052d1757084f861c6.tar.gz samba-c29e64d97ee18e9d7946151052d1757084f861c6.tar.xz samba-c29e64d97ee18e9d7946151052d1757084f861c6.zip |
tdb: introduce TDB_SUPPORTED_FEATURE_FLAGS
This will allow to store a feature mask in the tdb header on disk,
so that openers can check if they can handle the features
other openers are using.
Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/tdb/common/tdb_private.h')
-rw-r--r-- | lib/tdb/common/tdb_private.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/tdb/common/tdb_private.h b/lib/tdb/common/tdb_private.h index a672159578..aa9dd55ba4 100644 --- a/lib/tdb/common/tdb_private.h +++ b/lib/tdb/common/tdb_private.h @@ -53,6 +53,7 @@ typedef uint32_t tdb_off_t; #define TDB_RECOVERY_MAGIC (0xf53bc0e7U) #define TDB_RECOVERY_INVALID_MAGIC (0x0) #define TDB_HASH_RWLOCK_MAGIC (0xbad1a51U) +#define TDB_FEATURE_FLAG_MAGIC (0xbad1a52U) #define TDB_ALIGNMENT 4 #define DEFAULT_HASH_SIZE 131 #define FREELIST_TOP (sizeof(struct tdb_header)) @@ -68,6 +69,8 @@ typedef uint32_t tdb_off_t; #define TDB_PAD_BYTE 0x42 #define TDB_PAD_U32 0x42424242 +#define TDB_SUPPORTED_FEATURE_FLAGS 0 + /* NB assumes there is a local variable called "tdb" that is the * current context, also takes doubly-parenthesized print-style * argument. */ @@ -152,7 +155,8 @@ struct tdb_header { tdb_off_t sequence_number; /* used when TDB_SEQNUM is set */ uint32_t magic1_hash; /* hash of TDB_MAGIC_FOOD. */ uint32_t magic2_hash; /* hash of TDB_MAGIC. */ - tdb_off_t reserved[27]; + uint32_t feature_flags; + tdb_off_t reserved[26]; }; struct tdb_lock_type { @@ -200,6 +204,7 @@ struct tdb_context { int lockrecs_array_length; enum TDB_ERROR ecode; /* error code for last tdb error */ uint32_t hash_size; + uint32_t feature_flags; uint32_t flags; /* the flags passed to tdb_open */ struct tdb_traverse_lock travlocks; /* current traversal locks */ struct tdb_context *next; /* all tdbs to avoid multiple opens */ |