git.samba.org
/
metze
/
ctdb
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d973cb6
)
Do not allow the "VerifyRecoveryLock" tunable to be changed if there is no reclock...
author
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Thu, 25 Jun 2009 04:45:17 +0000
(14:45 +1000)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Thu, 25 Jun 2009 04:45:17 +0000
(14:45 +1000)
server/ctdb_tunables.c
patch
|
blob
|
history
diff --git
a/server/ctdb_tunables.c
b/server/ctdb_tunables.c
index c10dc39cf364b7c3ba42fb2b0533d7ddcea6cd1a..8140ccfd6a4e08fc120ee66cb08650cd10fa58a5 100644
(file)
--- a/
server/ctdb_tunables.c
+++ b/
server/ctdb_tunables.c
@@
-135,12
+135,19
@@
int32_t ctdb_control_set_tunable(struct ctdb_context *ctdb, TDB_DATA indata)
if (strcasecmp(name, tunable_map[i].name) == 0) break;
}
+ if (!strcmp(name, "VerifyRecoveryLock") && t->value != 0
+ && ctdb->recovery_lock_file == NULL) {
+ DEBUG(DEBUG_ERR,("Can not activate tunable \"VerifyRecoveryLock\" since there is no recovery lock file set.\n"));
+ talloc_free(name);
+ return -1;
+ }
+
talloc_free(name);
if (i == ARRAY_SIZE(tunable_map)) {
return -1;
}
-
+
*(uint32_t *)(tunable_map[i].offset + (uint8_t*)&ctdb->tunable) = t->value;
return 0;