Use proper defines instead of magic values.
MFC after: 1 week
This commit is contained in:
parent
ca5195cb7a
commit
3525bb6b98
@ -3003,7 +3003,7 @@ g_mirror_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
|
||||
pp->name, gp->name, error);
|
||||
if (LIST_EMPTY(&sc->sc_disks)) {
|
||||
g_cancel_event(sc);
|
||||
g_mirror_destroy(sc, 1);
|
||||
g_mirror_destroy(sc, G_MIRROR_DESTROY_HARD);
|
||||
g_topology_lock();
|
||||
return (NULL);
|
||||
}
|
||||
@ -3025,7 +3025,7 @@ g_mirror_destroy_geom(struct gctl_req *req __unused,
|
||||
sc = gp->softc;
|
||||
sx_xlock(&sc->sc_lock);
|
||||
g_cancel_event(sc);
|
||||
error = g_mirror_destroy(gp->softc, 0);
|
||||
error = g_mirror_destroy(gp->softc, G_MIRROR_DESTROY_SOFT);
|
||||
if (error != 0)
|
||||
sx_xunlock(&sc->sc_lock);
|
||||
g_topology_lock();
|
||||
|
@ -3273,7 +3273,7 @@ g_raid3_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
|
||||
if (g_raid3_ndisks(sc, G_RAID3_DISK_STATE_NODISK) ==
|
||||
sc->sc_ndisks) {
|
||||
g_cancel_event(sc);
|
||||
g_raid3_destroy(sc, 1);
|
||||
g_raid3_destroy(sc, G_RAID3_DESTROY_HARD);
|
||||
g_topology_lock();
|
||||
return (NULL);
|
||||
}
|
||||
@ -3295,7 +3295,7 @@ g_raid3_destroy_geom(struct gctl_req *req __unused, struct g_class *mp __unused,
|
||||
sc = gp->softc;
|
||||
sx_xlock(&sc->sc_lock);
|
||||
g_cancel_event(sc);
|
||||
error = g_raid3_destroy(gp->softc, 0);
|
||||
error = g_raid3_destroy(gp->softc, G_RAID3_DESTROY_SOFT);
|
||||
if (error != 0)
|
||||
sx_xunlock(&sc->sc_lock);
|
||||
g_topology_lock();
|
||||
|
Loading…
Reference in New Issue
Block a user