[SCM] CTDB repository - branch master updated - ctdb-1.0.95-4-g343c005

Ronnie Sahlberg sahlberg at samba.org
Tue Oct 13 17:20:31 MDT 2009


The branch, master has been updated
       via  343c005367789e108c0320e95d7a264535d68dd8 (commit)
      from  f6e39d35713475defaa08a623e194f3f2f8f7d53 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 343c005367789e108c0320e95d7a264535d68dd8
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Oct 14 10:14:03 2009 +1100

    allow a pre .95 version of a recovery master to freeze databases on a post .95 node by remapping priority numbers and log this to log.ctdb

-----------------------------------------------------------------------

Summary of changes:
 server/ctdb_freeze.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_freeze.c b/server/ctdb_freeze.c
index a2b765b..69e70ab 100644
--- a/server/ctdb_freeze.c
+++ b/server/ctdb_freeze.c
@@ -251,6 +251,11 @@ static int ctdb_freeze_waiter_destructor(struct ctdb_freeze_waiter *w)
  */
 int ctdb_start_freeze(struct ctdb_context *ctdb, uint32_t priority)
 {
+	if (priority == 0) {
+		DEBUG(DEBUG_ERR,("Freeze priority 0 requested, remapping to priority 1\n"));
+		priority = 1;
+	}
+
 	if ((priority < 1) || (priority > NUM_DB_PRIORITIES)) {
 		DEBUG(DEBUG_ERR,(__location__ " Invalid db priority : %u\n", priority));
 		return -1;
@@ -283,6 +288,11 @@ int32_t ctdb_control_freeze(struct ctdb_context *ctdb, struct ctdb_req_control *
 
 	DEBUG(DEBUG_ERR, ("Freeze priority %u\n", priority));
 
+	if (priority == 0) {
+		DEBUG(DEBUG_ERR,("Freeze priority 0 requested, remapping to priority 1\n"));
+		priority = 1;
+	}
+
 	if ((priority < 1) || (priority > NUM_DB_PRIORITIES)) {
 		DEBUG(DEBUG_ERR,(__location__ " Invalid db priority : %u\n", priority));
 		return -1;


-- 
CTDB repository


More information about the samba-cvs mailing list