Page MenuHomeFreeBSD

D4265.id10868.diff
No OneTemporary

D4265.id10868.diff

Index: sys/geom/multipath/g_multipath.c
===================================================================
--- sys/geom/multipath/g_multipath.c
+++ sys/geom/multipath/g_multipath.c
@@ -467,23 +467,34 @@
gp = pp->geom;
+ /* Error used if we have no valid consumers. */
+ error = ENXIO;
+
LIST_FOREACH(cp, &gp->consumer, consumer) {
+ if (cp->index & MP_BAD)
+ continue;
+
error = g_access(cp, dr, dw, de);
if (error) {
badcp = cp;
goto fail;
}
}
+
+ if (error != 0)
+ return (error);
+
sc = gp->softc;
sc->sc_opened += dr + dw + de;
if (sc->sc_stopping && sc->sc_opened == 0)
g_multipath_destroy(gp);
+
return (0);
fail:
LIST_FOREACH(cp, &gp->consumer, consumer) {
- if (cp == badcp)
- break;
+ if (cp == badcp || cp->index & MP_BAD)
+ continue;
(void) g_access(cp, -dr, -dw, -de);
}
return (error);

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 9, 7:02 PM (12 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25080369
Default Alt Text
D4265.id10868.diff (860 B)

Event Timeline