summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/mirror/g_mirror.c3
-rw-r--r--sys/geom/raid3/g_raid3.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c
index 4e7297e..5cf1d58 100644
--- a/sys/geom/mirror/g_mirror.c
+++ b/sys/geom/mirror/g_mirror.c
@@ -2430,7 +2430,8 @@ g_mirror_access(struct g_provider *pp, int acr, int acw, int ace)
ace--;
sc = pp->geom->softc;
- if (sc == NULL || LIST_EMPTY(&sc->sc_disks)) {
+ if (sc == NULL || LIST_EMPTY(&sc->sc_disks) ||
+ (sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) {
if (acr <= 0 && acw <= 0 && ace <= 0)
return (0);
else
diff --git a/sys/geom/raid3/g_raid3.c b/sys/geom/raid3/g_raid3.c
index 446c282..a041a0e 100644
--- a/sys/geom/raid3/g_raid3.c
+++ b/sys/geom/raid3/g_raid3.c
@@ -2656,7 +2656,8 @@ g_raid3_access(struct g_provider *pp, int acr, int acw, int ace)
sc = pp->geom->softc;
if (sc == NULL ||
- g_raid3_ndisks(sc, G_RAID3_DISK_STATE_ACTIVE) < sc->sc_ndisks - 1) {
+ g_raid3_ndisks(sc, G_RAID3_DISK_STATE_ACTIVE) < sc->sc_ndisks - 1 ||
+ (sc->sc_flags & G_RAID3_DEVICE_FLAG_DESTROY) != 0) {
if (acr <= 0 && acw <= 0 && ace <= 0)
return (0);
else
OpenPOWER on IntegriCloud