All of lore.kernel.org
 help / color / mirror / Atom feed
From: jbrassow@sourceware.org <jbrassow@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/cmirror-kernel/src dm-cmirror-client.c
Date: 2 Mar 2007 22:31:15 -0000	[thread overview]
Message-ID: <20070302223115.31016.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	jbrassow at sourceware.org	2007-03-02 22:31:14

Modified files:
	cmirror-kernel/src: dm-cmirror-client.c 

Log message:
	- When a cluster log resumes, the server must re-read the log device.
	However, it doesn't _need_ to happen until a request comes in which
	forces an election.
	
	If a resume/suspend loop is tight enough, it is possible for a
	log read to happen after the log device has been suspended.
	
	The fix is to force the log read during the resume call.
	
	Bug 227398: cmirror request to LRT_CLEAR_REGION fails...

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror-kernel/src/dm-cmirror-client.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.39&r2=1.1.2.40

--- cluster/cmirror-kernel/src/Attic/dm-cmirror-client.c	2007/02/26 17:38:06	1.1.2.39
+++ cluster/cmirror-kernel/src/Attic/dm-cmirror-client.c	2007/03/02 22:31:14	1.1.2.40
@@ -305,7 +305,8 @@
 		lc->server_id = lr.u.lr_coordinator;
 	} else {
 		/* ATTENTION -- what do we do with this ? */
-		DMWARN("Failed to receive election results from server: %d", len);
+		DMWARN("Failed to receive election results from server: (%s,%d)",
+		       lc->uuid + (strlen(lc->uuid) - 8), len);
 		error = len;
 	}
 
@@ -464,6 +465,8 @@
 			       (type == LRT_ELECTION)? "LRT_ELECTION":
 			       (type == LRT_SELECTION)? "LRT_SELECTION": "UNKNOWN");
 			DMDEBUG(" - error   :: %d", error);
+			DMINFO("Too many retries, attempting to re-establish server connection.");
+			lc->server_id = 0xDEAD;
 		}
 	}
 
@@ -764,11 +767,6 @@
 	list_del_init(&lc->log_list);
 	spin_unlock(&log_list_lock);
 
-	if ((lc->server_id == my_id) && !atomic_read(&lc->suspended))
-		consult_server(lc, 0, LRT_MASTER_LEAVING, NULL);
-
-	sock_release(lc->client_sock);
-
 	spin_lock(&region_state_lock);
 
 	list_for_each_entry_safe(rs, tmp_rs, &clear_region_list, rs_list) {
@@ -783,6 +781,10 @@
 
 	spin_unlock(&region_state_lock);
 
+	if ((lc->server_id == my_id) && !atomic_read(&lc->suspended))
+		consult_server(lc, 0, LRT_MASTER_LEAVING, NULL);
+
+	sock_release(lc->client_sock);
 
 	if (lc->log_dev)
 		disk_dtr(log);
@@ -842,6 +844,7 @@
 	lc->sync_search = 0;
 	resume_server_requests();
 	atomic_set(&lc->suspended, 0);
+	consult_server(lc, 0, LRT_IN_SYNC, NULL);
 
 	return 0;
 }



             reply	other threads:[~2007-03-02 22:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-02 22:31 jbrassow [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-08-23 16:51 [Cluster-devel] cluster/cmirror-kernel/src dm-cmirror-client.c jbrassow
2007-05-09 21:44 jbrassow
2006-12-05 17:49 jbrassow
2006-12-05 15:08 jbrassow
2006-12-05  3:13 jbrassow
2006-11-27 23:15 jbrassow
2006-11-27 22:36 jbrassow
2006-11-07 20:48 jbrassow
2006-10-24 21:04 jbrassow
2006-09-08 15:54 jbrassow
2006-09-08 15:52 jbrassow
2006-07-07 17:12 jbrassow
2006-07-07 17:09 jbrassow
2006-07-07 17:08 jbrassow
2006-06-15 17:53 jbrassow
2006-06-15 17:44 jbrassow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070302223115.31016.qmail@sourceware.org \
    --to=jbrassow@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.