summaryrefslogtreecommitdiff
path: root/lib/tdb/include
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-10-22 00:10:34 +1030
committerRusty Russell <rusty@rustcorp.com.au>2009-10-22 00:10:34 +1030
commit022b4d4aa6861c1e3e6d76484d92555221cb6d14 (patch)
tree013e042b1fd5bbd91899d5314d98b033a25b9845 /lib/tdb/include
parent0fc6800005ffb532a5e5699c97f13f1de138d51f (diff)
downloadsamba-022b4d4aa6861c1e3e6d76484d92555221cb6d14.tar.gz
samba-022b4d4aa6861c1e3e6d76484d92555221cb6d14.tar.bz2
samba-022b4d4aa6861c1e3e6d76484d92555221cb6d14.zip
lib/tdb: add tdb_check()
ctdb wants a quick way to detect corrupt tdbs; particularly, tdbs with loops in their hash chains. tdb_check() provides this. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/tdb/include')
-rw-r--r--lib/tdb/include/tdb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/tdb/include/tdb.h b/lib/tdb/include/tdb.h
index c00b6cb33e..e849f20641 100644
--- a/lib/tdb/include/tdb.h
+++ b/lib/tdb/include/tdb.h
@@ -139,6 +139,9 @@ void tdb_add_flags(struct tdb_context *tdb, unsigned flag);
void tdb_remove_flags(struct tdb_context *tdb, unsigned flag);
void tdb_enable_seqnum(struct tdb_context *tdb);
void tdb_increment_seqnum_nonblock(struct tdb_context *tdb);
+int tdb_check(struct tdb_context *tdb,
+ int (*check)(TDB_DATA key, TDB_DATA data, void *private_data),
+ void *private_data);
/* Low level locking functions: use with care */
int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key);