Skip to contentSkip to conversation

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

Cluster-devel [email protected] 1 participant 1 message Apr 10, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: jbrassow at sourceware.org 2007-04-10 19:09:09

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

Log message:
Remove an overzealous BUG statement.

Comments inlined

Patches:
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.31&r2=1.1.2.32

cmirror-kernel/src/Attic/dm-cmirror-server.c +12 -1
@@ -708,7 +708,18 @@
 	if (!ru) {
 		DMERR("Unable to find region to be marked out-of-sync: %Lu/%s/%u",
 		      lr->u.lr_region, lc->uuid + (strlen(lc->uuid) - 8), who);
-		BUG();
+		/*
+		 * This is a valid case, when the following happens:
+		 * 1) a region is recovering and has waiting writes
+		 * 2) recovery fails and calls complete_resync_work (w/ failure)
+		 * 2.1) RU is removed from our list
+		 * 3) waiting writes are released
+		 * 3.1) writes do not mark, because b/c region state != RH_CLEAN
+		 * 4) write fails and calls complete_resync_work (w/ failure)
+		 * 5) boom, we are here.
+		 *
+		 * Not a bug to be here
+		 */
 	} else 	if (ru->ru_rw == RU_RECOVER) {
 		if (lr->u.lr_region != lc->recovering_region) {
 			DMERR("Recovering region mismatch from node %u: (%Lu/%Lu)",