detection.
</para>
</refsect2>
+
+ <refsect2><title>Samba3AvoidDeadlock</title>
+ <para>Default: 0</para>
+ <para>
+ Enable code that prevents deadlocks with Samba (only for Samba 3.x).
+ </para>
+ <para>
+ This should be set to 1 when using Samba version 3.x to enable special
+ code in CTDB to avoid deadlock with Samba version 3.x. This code
+ is not required for Samba version 4.x and must not be enabled for
+ Samba 4.x.
+ </para>
+ </refsect2>
</refsect1>
<refsect1><title>LVS</title>
* By default, all databases are set to priority 1. So only when priority
* is set to 1, check for databases that need higher priority.
*/
-static bool later_db(const char *name)
+static bool later_db(struct ctdb_context *ctdb, const char *name)
{
+ if (ctdb->tunable.samba3_hack == 0) {
+ return false;
+ }
+
if (strstr(name, "brlock") ||
strstr(name, "g_lock") ||
strstr(name, "notify_onelevel") ||
if (ctdb_db->priority != priority) {
continue;
}
- if (later_db(ctdb_db->db_name)) {
+ if (later_db(ctdb, ctdb_db->db_name)) {
continue;
}
DEBUG(DEBUG_INFO, ("locking database %s, priority:%u\n",
}
for (ctdb_db = ctdb->db_list; ctdb_db; ctdb_db = ctdb_db->next) {
- if (!later_db(ctdb_db->db_name)) {
+ if (!later_db(ctdb, ctdb_db->db_name)) {
continue;
}
DEBUG(DEBUG_INFO, ("locking database %s, priority:%u\n",
if (ctdb_db->priority != priority) {
continue;
}
- if (later_db(ctdb_db->db_name)) {
+ if (later_db(ctdb, ctdb_db->db_name)) {
continue;
}
if (tdb_transaction_write_lock_mark(ctdb_db->ltdb->tdb) != 0) {
}
for (ctdb_db = ctdb->db_list; ctdb_db; ctdb_db = ctdb_db->next) {
- if (!later_db(ctdb_db->db_name)) {
+ if (!later_db(ctdb, ctdb_db->db_name)) {
continue;
}
if (tdb_transaction_write_lock_mark(ctdb_db->ltdb->tdb) != 0) {
{ "PullDBPreallocation", 10*1024*10240, offsetof(struct ctdb_tunable, pulldb_preallocation_size), false },
{ "NoIPTakeoverOnDisabled", 0, offsetof(struct ctdb_tunable, no_ip_takeover_on_disabled), false },
{ "DeadlockTimeout", 300, offsetof(struct ctdb_tunable, deadlock_timeout), false },
+ { "Samba3AvoidDeadlocks", 0, offsetof(struct ctdb_tunable, samba3_hack), false },
};
/*