This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cluster Project branch, RHEL4, updated. gfs-kernel_2_6_9_76-86-ga0e6a6d


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=a0e6a6d02a4a55b98078dc874204c5555dbf74a4

The branch, RHEL4 has been updated
       via  a0e6a6d02a4a55b98078dc874204c5555dbf74a4 (commit)
      from  89ec6eacf4619e0b72f72115ce7d93e83257fa7b (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 a0e6a6d02a4a55b98078dc874204c5555dbf74a4
Author: Jonathan Brassow <jbrassow@redhat.com>
Date:   Fri Jun 20 13:17:44 2008 -0500

    dm-cmirror.ko:  Fix for bug 450939
    
    - must reset 'in_sync' var upon resume
    -- Clean-up of some compile warnings
    -- Additional debugging statements

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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]