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

[Cluster-devel] cluster/cmirror-kernel/src dm-cmirror-client.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	jbrassow sourceware org	2006-11-27 23:15:45

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

Log message:
	Bug 217438: scrolling kernel requests to mark mirror regions
	
	It is sometimes possible for a mark request to be issued on a region
	that is being recovered.  The mark must be delayed until the recovery
	is complete.  This is what was happening, but a rather severe error
	was being reported and the (mark region) retries were happening too
	fast.

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.28&r2=1.1.2.29

--- cluster/cmirror-kernel/src/Attic/dm-cmirror-client.c	2006/11/27 22:36:48	1.1.2.28
+++ cluster/cmirror-kernel/src/Attic/dm-cmirror-client.c	2006/11/27 23:15:43	1.1.2.29
@@ -941,9 +941,19 @@
 	spin_unlock(&region_state_lock);
 
 	while((error = consult_server(lc, region, LRT_MARK_REGION, NULL))){
+		if (error == -EBUSY) {
+			/* Remote recovering delay and try again */
+			DMDEBUG("Delaying mark to region %Lu, due to recovery",
+				region);
+			set_current_state(TASK_INTERRUPTIBLE);
+			schedule_timeout(HZ/2);
+			continue;
+		}
+
 		DMWARN("unable to get server (%u) to mark region (%Lu)",
 		       lc->server_id, region);
 		DMWARN("Reason :: %d", error);
+
 		if (error == -EIO) {
 			lc->log_dev_failed = 1;
 			break;


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