public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: jbrassow@sourceware.org
To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com
Subject: Cluster Project branch, RHEL47, updated. gfs-kernel_2_6_9_76-81-g634f4f5
Date: Fri, 20 Jun 2008 18:13:00 -0000	[thread overview]
Message-ID: <20080620181333.17918.qmail@sourceware.org> (raw)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=634f4f53b00c2c1ee49e02773e44d3352043f1c3

The branch, RHEL47 has been updated
       via  634f4f53b00c2c1ee49e02773e44d3352043f1c3 (commit)
      from  a174220359c48ad23e7474f71e40bfc5fedd3906 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 634f4f53b00c2c1ee49e02773e44d3352043f1c3
Author: Jonathan Brassow <jbrassow@redhat.com>
Date:   Wed Jun 18 10:08:06 2008 -0500

    dm-cmirror.ok:  Fix for bug 450939
    
    Must reset in_sync variable upon resume.

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

Summary of changes:
 cmirror-kernel/src/dm-cmirror-client.c |    3 +-
 cmirror-kernel/src/dm-cmirror-server.c |   46 +++++++++++++++++++------------
 2 files changed, 30 insertions(+), 19 deletions(-)

diff --git a/cmirror-kernel/src/dm-cmirror-client.c b/cmirror-kernel/src/dm-cmirror-client.c
index 43fe5ef..79794c2 100644
--- a/cmirror-kernel/src/dm-cmirror-client.c
+++ b/cmirror-kernel/src/dm-cmirror-client.c
@@ -849,6 +849,7 @@ static int cluster_resume(struct dirty_log *log){
 	DMDEBUG("cluster_resume: Setting recovery_halted = 0");
 	lc->recovery_halted = 0;
 	atomic_set(&lc->suspended, 0);
+	atomic_set(&lc->in_sync,0);
 
 	return 0;
 }
@@ -1186,7 +1187,7 @@ static region_t cluster_get_sync_count(struct dirty_log *log)
 	struct log_c *lc = (struct log_c *) log->context;
 
 	if (atomic_read(&lc->suspended)) {
-		return (atomic_read(&lc->in_sync)) ? lc->region_count : 0;
+		return (atomic_read(&lc->in_sync) == 1) ? lc->region_count : 0;
 	}
 
 	/* Try to get sync count up to five times */
diff --git a/cmirror-kernel/src/dm-cmirror-server.c b/cmirror-kernel/src/dm-cmirror-server.c
index c8f77ea..a2857f4 100644
--- a/cmirror-kernel/src/dm-cmirror-server.c
+++ b/cmirror-kernel/src/dm-cmirror-server.c
@@ -121,7 +121,7 @@ static int do_io(struct log_c *log, int rw, int header)
 	r = dm_io_async_vm(1,
 			   (header) ? &log->header_location : &log->bits_location,
 			   rw,
-			   (header) ? log->disk_header : log->clean_bits,
+			   (header) ? (void *)(log->disk_header) : (void *)(log->clean_bits),
 			   do_io_callback, log);
 	if (r) {
 		DMERR("Error while submitting log I/O: %d", r);
@@ -141,7 +141,6 @@ static int do_io(struct log_c *log, int rw, int header)
 int read_header(struct log_c *log)
 {
 	int r;
-	unsigned long ebits;
 
 	if (!log->log_dev)
 		return 0;
@@ -173,8 +172,6 @@ int read_header(struct log_c *log)
 
 int write_header(struct log_c *log)
 {
-	unsigned long ebits;
-
 	if (!log->log_dev)
 		return 0;
 
@@ -219,7 +216,6 @@ static inline void bits_to_disk(uint32_t *core, uint32_t *disk, unsigned count)
 static int read_bits(struct log_c *log)
 {
 	int r;
-	unsigned long ebits;
 
 	if (!log->log_dev)
 		return 0;
@@ -237,8 +233,6 @@ static int read_bits(struct log_c *log)
 
 static int write_bits(struct log_c *log)
 {
-	unsigned long ebits;
-	
 	if (!log->log_dev)
 		return 0;
 
@@ -505,11 +499,6 @@ static int server_is_remote_recovering(struct log_c *lc, struct log_request *lr)
 		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)))
@@ -567,10 +556,18 @@ static int server_mark_region(struct log_c *lc, struct log_request *lr, uint32_t
 		DMERR("Mark attempted to recovering region by %u: %Lu/%s",
 		      who, lr->u.lr_region,
 		      lc->uuid + (strlen(lc->uuid) - 8));
+		DMERR("  region_user { rw=%s, nodeid=%u, region=%Lu }",
+		      (ru->ru_rw == RU_WRITE) ? "RU_WRITE":
+		      (ru->ru_rw == RU_RECOVER) ? "RU_RECOVER":
+		      (ru->ru_rw == RU_READ) ? "RU_READ" : "UNKOWN",
+		      ru->ru_nodeid, ru->ru_region);
 		DMERR("  lc->recovering_region = %Lu", lc->recovering_region);
-		DMERR("  ru->ru_rw             = %d", ru->ru_rw);
-		DMERR("  ru->ru_nodeid         = %u", ru->ru_nodeid);
-		DMERR("  ru->ru_region         = %Lu", ru->ru_region);
+		DMERR("  lc->sync_count = %Lu", lc->sync_count);
+		DMERR("  lc->in_sync = %d", atomic_read(&lc->in_sync));
+		DMERR("  lc->sync_pass = %d", lc->sync_pass);
+		DMERR("  lc->sync_search = %d", lc->sync_search);
+		DMERR("  lc->recovery_halted = %d", lc->recovery_halted);
+
 		BUG();
 	} else {
 		list_add(&new->ru_list, &ru->ru_list);
@@ -685,7 +682,7 @@ static int server_get_resync_work(struct log_c *lc, struct log_request *lr, uint
 		*region = ext2_find_next_zero_bit((unsigned long *) lc->sync_bits,
 						  lc->region_count,
 						  lc->sync_search);
-		if (find_ru_by_region(lc, *region)) {
+		if ((new = find_ru_by_region(lc, *region))) {
 			/*
 			 * We disallow writes to regions that have not yet been
 			 * recovered via is_remote_recovering(), so this should
@@ -693,6 +690,17 @@ static int server_get_resync_work(struct log_c *lc, struct log_request *lr, uint
 			 */
 			DMERR("Recovery blocked by outstanding write on region %Lu/%s",
 			      *region, lc->uuid + (strlen(lc->uuid) - 8));
+			DMERR("  region_user { %s, %u, %Lu }",
+			      (new->ru_rw == RU_WRITE) ? "RU_WRITE":
+			      (new->ru_rw == RU_RECOVER) ? "RU_RECOVER":
+			      (new->ru_rw == RU_READ) ? "RU_READ" : "UNKOWN",
+			      new->ru_nodeid, new->ru_region);
+			DMERR("  lc->recovering_region = %Lu", lc->recovering_region);
+			DMERR("  lc->sync_count = %Lu", lc->sync_count);
+			DMERR("  lc->in_sync = %d", atomic_read(&lc->in_sync));
+			DMERR("  lc->sync_pass = %d", lc->sync_pass);
+			DMERR("  lc->sync_search = %d", lc->sync_search);
+			DMERR("  lc->recovery_halted = %d", lc->recovery_halted);
 			BUG();
 			return 0;
 		}
@@ -768,8 +776,10 @@ static int server_complete_resync_work(struct log_c *lc, struct log_request *lr,
 	 * 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;
+	if (!lc->recovery_halted) {
+		DMDEBUG("server_complete_resync_work - Setting recovery_halted = 1");
+		lc->recovery_halted = 1;
+	}
 
 	ru = find_ru(lc, who, lr->u.lr_region);
 


hooks/post-receive
--
Cluster Project


                 reply	other threads:[~2008-06-20 18:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080620181333.17918.qmail@sourceware.org \
    --to=jbrassow@sourceware.org \
    --cc=cluster-cvs@sources.redhat.com \
    --cc=cluster-devel@redhat.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).