summaryrefslogtreecommitdiffstats
path: root/sys/geom/mirror
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2004-11-08 20:23:53 +0000
committerpjd <pjd@FreeBSD.org>2004-11-08 20:23:53 +0000
commitb9bb54bcb83e7a613ae54ba74db70da262ce3cb0 (patch)
treedcdfca47eb6b85da4cd51a76fe3d4880217570d5 /sys/geom/mirror
parent672110b0db77692a23277caad71149699ccb4639 (diff)
downloadFreeBSD-src-b9bb54bcb83e7a613ae54ba74db70da262ce3cb0.zip
FreeBSD-src-b9bb54bcb83e7a613ae54ba74db70da262ce3cb0.tar.gz
If device is marked as beeing destroyed, deny all access requests.
Diffstat (limited to 'sys/geom/mirror')
-rw-r--r--sys/geom/mirror/g_mirror.c3
1 files changed, 2 insertions, 1 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
OpenPOWER on IntegriCloud