svn commit: r190137 - projects/gvinum/sys/geom/vinum

Ulf Lilleengen lulf at FreeBSD.org
Fri Mar 20 02:02:41 PDT 2009


Author: lulf
Date: Fri Mar 20 09:02:40 2009
New Revision: 190137
URL: http://svn.freebsd.org/changeset/base/190137

Log:
  - Fix errors from previous mis-merges. The parity rebuild would end prematurely.

Modified:
  projects/gvinum/sys/geom/vinum/geom_vinum_plex.c

Modified: projects/gvinum/sys/geom/vinum/geom_vinum_plex.c
==============================================================================
--- projects/gvinum/sys/geom/vinum/geom_vinum_plex.c	Fri Mar 20 09:01:34 2009	(r190136)
+++ projects/gvinum/sys/geom/vinum/geom_vinum_plex.c	Fri Mar 20 09:02:40 2009	(r190137)
@@ -966,21 +966,21 @@ gv_parity_complete(struct gv_plex *p, st
 		g_free(bp->bio_data);
 	g_destroy_bio(bp);
 
-	if (error) {
+	if (error == EAGAIN) {
+		G_VINUM_DEBUG(0, "parity incorrect at offset 0x%jx",
+		    (intmax_t)p->synced);
+	}
+
+	/* Any error is fatal, except EAGAIN when we're rebuilding. */
+	if (error && !(error == EAGAIN && (flags & GV_BIO_PARITY))) {
 		/* Make sure we don't have the lock. */
 		g_topology_assert_not();
 		g_topology_lock();
 		gv_access(p->vol_sc->provider, -1, -1, 0);
 		g_topology_unlock();
-
-		if (error == EAGAIN) {
-			G_VINUM_DEBUG(0, "parity incorrect at offset 0x%jx",
-			    (intmax_t)p->synced);
-			if (!(flags & GV_BIO_PARITY))
-				return;
-		}
-		G_VINUM_DEBUG(0, "parity check on %s failed at 0x%jx errno %d",
-		    p->name, (intmax_t)p->synced, error);
+		G_VINUM_DEBUG(0, "parity check on %s failed at 0x%jx "
+		    "errno %d", p->name, (intmax_t)p->synced, error);
+		return;
 	} else {
 		p->synced += p->stripesize;
 	}
@@ -991,7 +991,6 @@ gv_parity_complete(struct gv_plex *p, st
 		g_topology_lock();
 		gv_access(p->vol_sc->provider, -1, -1, 0);
 		g_topology_unlock();
-
 		/* We're finished. */
 		G_VINUM_DEBUG(1, "parity operation on %s finished", p->name);
 		p->synced = 0;


More information about the svn-src-projects mailing list