if (jenkinshash) {
tdb_flags |= TDB_INCOMPATIBLE_HASH;
}
- if (mutexes) {
+#ifdef TDB_MUTEX_LOCKING
+ if (mutexes && tdb_runtime_check_for_robust_mutexes()) {
tdb_flags |= TDB_MUTEX_LOCKING;
}
+#endif
again:
ctdb_db->ltdb = tdb_wrap_open(ctdb_db, ctdb_db->db_path,
only allow a subset of those on the database in ctdb. Note
that tdb_flags is passed in via the (otherwise unused)
srvid to the attach control */
+#ifdef TDB_MUTEX_LOCKING
tdb_flags &= (TDB_NOSYNC|TDB_INCOMPATIBLE_HASH|TDB_MUTEX_LOCKING);
+#else
+ tdb_flags &= (TDB_NOSYNC|TDB_INCOMPATIBLE_HASH);
+#endif
/* see if we already have this name */
db = ctdb_db_handle(ctdb, db_name);
}
with_jenkinshash = (tdb_flags & TDB_INCOMPATIBLE_HASH) ? true : false;
+#ifdef TDB_MUTEX_LOCKING
with_mutexes = (tdb_flags & TDB_MUTEX_LOCKING) ? true : false;
+#else
+ with_mutexes = false;
+#endif
if (ctdb_local_attach(ctdb, db_name, persistent, NULL,
with_jenkinshash, with_mutexes) != 0) {