Skip to contentSkip to conversation

cluster/cmirror-kernel/src dm-cmirror-client.c ...

Cluster-devel [email protected] 1 participant 1 message Sep 26, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: jbrassow at sourceware.org 2007-09-26 03:15:41

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

Log message:
Bug 291521: Cluster mirror can become out-of-sync if nominal I/O overl...

Another touch-up for this bug.

Bad news:
Because a node can cache the state of a region indefinitely (especially for blocks that are used alot - e.g. a journaling area of a file system), we must deny writes to any region of the mirror that is not yet recovered. This is only the case with cluster mirroring. This means poor performance of nominal I/O during recovery - probably really bad performance. However, this is absolutely necessary for mirror reliability.

Good news:
The time I spent coding different fixes for this bug weren't a complete waste. I've been able to reuse some of that code to optimize the recovery process. Now, rather than going through the mirror from front to back, it skips ahead to recover regions that have pending writes. Bottom line: performance will be bad during recovery, but it will be better than RHEL4.5.

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.52&r2=1.1.2.53
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror-kernel/src/dm-cmirror-common.h.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.14&r2=1.1.2.15
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror-kernel/src/dm-cmirror-server.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.38&r2=1.1.2.39

cmirror-kernel/src/Attic/dm-cmirror-client.c +1 -0
@@ -142,6 +142,7 @@
 	lc->sync_count = (sync == NOSYNC) ? region_count : 0;
 
 	lc->recovering_region = (uint64_t)-1;
+	lc->recovering_next = (uint64_t)-1;
 	lc->sync_search = 0;
 	log->context = lc;
 	return 0;
cmirror-kernel/src/Attic/dm-cmirror-common.h +1 -0
@@ -98,6 +98,7 @@
 	uint32_t *clean_bits;
 	uint32_t *sync_bits;
 	uint64_t recovering_region;
+	uint64_t recovering_next;
 
 	int sync_pass;          /* number of passes attempting to resync */
 	int sync_search;
cmirror-kernel/src/Attic/dm-cmirror-server.c +54 -26

105 lines not on this page · raw message