[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] Cluster Project branch, RHEL47, updated. gfs-kernel_2_6_9_76-81-g634f4f5



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]