Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Mar 2010 21:16:28 +0000 (UTC)
From:      Ulf Lilleengen <lulf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r204886 - head/sys/geom/vinum
Message-ID:  <201003082116.o28LGSMZ009977@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lulf
Date: Mon Mar  8 21:16:28 2010
New Revision: 204886
URL: http://svn.freebsd.org/changeset/base/204886

Log:
  - Set missing flag when initiating a plex rebuild with the rebuildparity
    command.
  - Check if plex is already syncing or rebuilding before initiating a parity
    rebuild or check.

Modified:
  head/sys/geom/vinum/geom_vinum.c

Modified: head/sys/geom/vinum/geom_vinum.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum.c	Mon Mar  8 21:14:21 2010	(r204885)
+++ head/sys/geom/vinum/geom_vinum.c	Mon Mar  8 21:16:28 2010	(r204886)
@@ -788,7 +788,15 @@ gv_worker(void *arg)
 					    "completely accessible", p->name);
 					break;
 				}
+				if (p->flags & GV_PLEX_SYNCING ||
+				    p->flags & GV_PLEX_REBUILDING ||
+				    p->flags & GV_PLEX_GROWING) {
+					G_VINUM_DEBUG(0, "plex %s is busy with "
+					    "syncing or parity build", p->name);
+					break;
+				}
 				p->synced = 0;
+				p->flags |= GV_PLEX_REBUILDING;
 				g_topology_assert_not();
 				g_topology_lock();
 				err = gv_access(p->vol_sc->provider, 1, 1, 0);
@@ -811,6 +819,13 @@ gv_worker(void *arg)
 					    "completely accessible", p->name);
 					break;
 				}
+				if (p->flags & GV_PLEX_SYNCING ||
+				    p->flags & GV_PLEX_REBUILDING ||
+				    p->flags & GV_PLEX_GROWING) {
+					G_VINUM_DEBUG(0, "plex %s is busy with "
+					    "syncing or parity build", p->name);
+					break;
+				}
 				p->synced = 0;
 				g_topology_assert_not();
 				g_topology_lock();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003082116.o28LGSMZ009977>