cluster: RHEL56 - Fix potential I/O hang after cluster mirror creation w/ --nosync

Jonathan Brassow jbrassow at fedoraproject.org
Mon Aug 30 20:59:20 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5cf664ec4f1f08c110e14039b7945ee5d660f8fc
Commit:        5cf664ec4f1f08c110e14039b7945ee5d660f8fc
Parent:        95d4db6c9a10517a7ed981be2271e5a602e0bcc2
Author:        Jonathan Brassow <jbrassow at redhat.com>
AuthorDate:    Mon Aug 30 15:59:11 2010 -0500
Committer:     Jonathan Brassow <jbrassow at redhat.com>
CommitterDate: Mon Aug 30 15:59:11 2010 -0500

Fix potential I/O hang after cluster mirror creation w/ --nosync

This patch fixes an issue where cluster mirror write I/O
can be opprobriously slow if created with '--nosync'.

One of the ways cluster mirrors coordinate I/O and recovery
amoung the different machines is by the use of the log
function 'is_remote_recovering()' which lets node know if
a region they wish to perform a write on is currently being
recovered on another node.  If the region is being recovered,
the I/O is delayed.

The 'is_remote_recovering' routine has been optimized to
avoid the deluge of requests that would be issued to the
userspace log server by maintaining a marker of how far
the recovery has gotten.  It can then immediately return
'not recovering' if the region being inquired about is
less than this mark.  Additionally, if the region of
concern is greater than the mark, the function will
limit the number of transmissions to userspace by assuming
the region /is/ being recovered when skipping the
transmission.  This limits the amount of processing
and updates the mark in 1/4 sec time steps.

This patch fixes a problem where 'the mark' is not being
updated because of faulty logic in the userspace log
daemon.  When '--nosync' is used to create a cluster
mirror, the userspace log daemon never has a chance
to update the mark in the normal way.  The fix is to set
the mark to "complete" if the mirror was created with
the --nosync flag.
---
 cmirror/src/functions.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/cmirror/src/functions.c b/cmirror/src/functions.c
index 760a6d0..45dcbb3 100644
--- a/cmirror/src/functions.c
+++ b/cmirror/src/functions.c
@@ -1286,6 +1286,7 @@ static int clog_get_resync_work(struct clog_tfr *tfr)
 		LOG_SPRINT("GET - SEQ#=%u, UUID=%s, nodeid = %u:: "
 			   "Resync work complete.",
 			   tfr->seq, SHORT_UUID(lc->uuid), tfr->originator);
+		lc->sync_search = lc->region_count + 1;
 		return 0;
 	}
 


More information about the cluster-commits mailing list