From 77d2a01ea844a164a7bbac03e3df89e75a7ef045 Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Mon, 8 Mar 2010 21:16:28 +0000 Subject: [PATCH] - 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. --- sys/geom/vinum/geom_vinum.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/geom/vinum/geom_vinum.c b/sys/geom/vinum/geom_vinum.c index b921a1beb58c..479fc8a345d6 100644 --- a/sys/geom/vinum/geom_vinum.c +++ b/sys/geom/vinum/geom_vinum.c @@ -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();