From owner-svn-src-all@FreeBSD.ORG Mon Mar 8 21:16:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E1001065670; Mon, 8 Mar 2010 21:16:30 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D2088FC12; Mon, 8 Mar 2010 21:16:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o28LGSdm009979; Mon, 8 Mar 2010 21:16:28 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28LGSMZ009977; Mon, 8 Mar 2010 21:16:28 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201003082116.o28LGSMZ009977@svn.freebsd.org> From: Ulf Lilleengen Date: Mon, 8 Mar 2010 21:16:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204886 - head/sys/geom/vinum X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 21:16:30 -0000 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();