cluster-devel.redhat.com archive mirror
 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: 3 Oct 2007 19:02:53 -0000	[thread overview]
Message-ID: <20071003190253.6439.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	jbrassow at sourceware.org	2007-10-03 19:02:52

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

Log message:
	Bug 316031: dm-mirror: incorrect order of mirror presuspend ops caus...
	
	With kernel (dm-raid1.c) presuspend changes, we can now tell when
	recovery has been shutdown and when we can allow blocked writes.
	
	This should fix a hang issue when converting from one mirror type
	to another.

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.54&r2=1.1.2.55
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror-kernel/src/dm-cmirror-server.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.40&r2=1.1.2.41

--- cluster/cmirror-kernel/src/Attic/dm-cmirror-client.c	2007/09/27 20:31:18	1.1.2.54
+++ cluster/cmirror-kernel/src/Attic/dm-cmirror-client.c	2007/10/03 19:02:51	1.1.2.55
@@ -592,6 +592,8 @@
 			 * should start out suspended.
 			 */
 			atomic_set(&lc->suspended, 1);
+			lc->recovery_halted = 1;
+			DMDEBUG("Secondary log... suspended and recovery_halted");
 		}
 	}
 
@@ -764,6 +766,11 @@
 
 static int cluster_presuspend(struct dirty_log *log)
 {
+	struct log_c *lc = (struct log_c *) log->context;
+
+	DMDEBUG("cluster_presuspend: recovery halted on %s(%d)",
+		lc->uuid + (strlen(lc->uuid) - 8), lc->uuid_ref);
+	lc->recovery_halted = 1;
 	return 0;
 }
 
@@ -834,8 +841,9 @@
 	struct log_c *lc = (struct log_c *) log->context;
 
 	lc->sync_search = 0;
-	lc->recovery_halted = 0;
 	resume_server_requests();
+	DMDEBUG("cluster_resume: Setting recovery_halted = 0");
+	lc->recovery_halted = 0;
 	atomic_set(&lc->suspended, 0);
 
 	return 0;
@@ -1253,6 +1261,8 @@
 						(atomic_read(&tmp_lc->in_sync)) ? "YES" : "NO");
 					DMDEBUG("  suspended   : %s",
 						(atomic_read(&tmp_lc->suspended)) ? "YES" : "NO");
+					DMDEBUG("  recovery_halted : %s",
+						(tmp_lc->recovery_halted) ? "YES" : "NO");
 					DMDEBUG("  server_id   : %u", tmp_lc->server_id);
 					DMDEBUG("  server_valid: %s",
 						((tmp_lc->server_id != 0xDEAD) &&
--- cluster/cmirror-kernel/src/Attic/dm-cmirror-server.c	2007/09/27 20:31:18	1.1.2.40
+++ cluster/cmirror-kernel/src/Attic/dm-cmirror-server.c	2007/10/03 19:02:51	1.1.2.41
@@ -468,9 +468,15 @@
 		lr->u.lr_int_rtn = 1;
 
 		/* Try to make this region a priority */
+		/*
 		if ((lr->u.lr_region != lc->recovering_region) &&
 		    (lc->recovering_next == (uint64_t)-1))
 			lc->recovering_next = lr->u.lr_region;
+		*/
+		if ((lr->u.lr_region != lc->recovering_region) &&
+		    ((lc->recovering_next == (uint64_t)-1) ||
+		     (lc->recovering_next > lr->u.lr_region)))
+			lc->recovering_next = lr->u.lr_region;		
 		return 0;
 	}
 
@@ -728,6 +734,7 @@
 	 * failed.  In this case, there will not be a record for
 	 * the region.
 	 */
+	DMDEBUG("server_complete_resync_work - Setting recovery_halted = 1");
 	lc->recovery_halted = 1;
 
 	ru = find_ru(lc, who, lr->u.lr_region);



             reply	other threads:[~2007-10-03 19:02 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-03 19:02 jbrassow [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-09-27 20:31 [Cluster-devel] cluster/cmirror-kernel/src dm-cmirror-client.c jbrassow
2007-09-26  3:15 jbrassow
2007-09-21 20:07 jbrassow
2007-09-13 15:24 jbrassow
2007-07-11 16:18 jbrassow
2007-04-26 16:55 jbrassow
2007-04-26 16:54 jbrassow
2007-04-24 20:10 jbrassow
2007-04-24 20:08 jbrassow
2007-04-10  7:13 jbrassow
2007-04-10  7:12 jbrassow
2007-04-05 21:33 jbrassow
2007-04-05 21:32 jbrassow
2007-04-03 18:23 jbrassow
2007-04-03 18:21 jbrassow
2007-03-22 22:34 jbrassow
2007-03-22 22:22 jbrassow
2007-03-14  4:28 jbrassow
2007-02-26 17:38 jbrassow
2007-02-20 19:35 jbrassow
2007-02-19 16:29 jbrassow
2007-02-14 17:44 jbrassow
2007-02-02 17:22 jbrassow
2007-01-08 19:28 jbrassow
2006-12-07 18:58 jbrassow
2006-09-05 17:50 jbrassow
2006-09-05 17:48 jbrassow
2006-07-27 23:11 jbrassow
2006-07-27 23:11 jbrassow
2006-07-22 22:19 jbrassow
2006-07-22 22:19 jbrassow
2006-07-22 22:12 jbrassow
2006-06-29 19:49 jbrassow
2006-06-29 19:48 jbrassow
2006-06-29 19:46 jbrassow
2006-06-27 20:19 jbrassow
2006-06-15 19:48 jbrassow
2006-06-15 19:34 jbrassow
2006-06-13 16:26 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=20071003190253.6439.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).