From: Andrew Tridgell Date: Fri, 4 May 2007 05:29:10 +0000 (+1000) Subject: added a tdb_enable_seqnum() function X-Git-Tag: tevent-0.9.20~348^2~2783 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6bc37580825bf5d4c9f02e855d0028808c673318;p=thirdparty%2Fsamba.git added a tdb_enable_seqnum() function (This used to be ctdb commit 1f89da231c6637e339d5da156d6a48340706fe61) --- diff --git a/ctdb/lib/tdb/common/tdb.c b/ctdb/lib/tdb/common/tdb.c index 25103d826e5..c8c874d5367 100644 --- a/ctdb/lib/tdb/common/tdb.c +++ b/ctdb/lib/tdb/common/tdb.c @@ -649,3 +649,11 @@ int tdb_get_flags(struct tdb_context *tdb) return tdb->flags; } + +/* + enable sequence number handling on an open tdb +*/ +void tdb_enable_seqnum(struct tdb_context *tdb) +{ + tdb->flags |= TDB_SEQNUM; +} diff --git a/ctdb/lib/tdb/include/tdb.h b/ctdb/lib/tdb/include/tdb.h index e77b78f7ed0..3d7826f74b4 100644 --- a/ctdb/lib/tdb/include/tdb.h +++ b/ctdb/lib/tdb/include/tdb.h @@ -131,6 +131,7 @@ int tdb_get_seqnum(struct tdb_context *tdb); int tdb_hash_size(struct tdb_context *tdb); size_t tdb_map_size(struct tdb_context *tdb); int tdb_get_flags(struct tdb_context *tdb); +void tdb_enable_seqnum(struct tdb_context *tdb); /* Low level locking functions: use with care */ int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key);