Save the config back to disk when a drive goes down.
This commit is contained in:
parent
ea29a30466
commit
a0781b98f3
@ -318,7 +318,8 @@ gv_drive_orphan(struct g_consumer *cp)
|
||||
s->provider = NULL;
|
||||
s->consumer = NULL;
|
||||
}
|
||||
gv_set_drive_state(d, GV_DRIVE_DOWN, GV_SETSTATE_FORCE);
|
||||
gv_set_drive_state(d, GV_DRIVE_DOWN,
|
||||
GV_SETSTATE_FORCE | GV_SETSTATE_CONFIG);
|
||||
}
|
||||
gp->softc = NULL;
|
||||
g_wither_geom(gp, error);
|
||||
|
@ -63,6 +63,10 @@ gv_set_drive_state(struct gv_drive *d, int newstate, int flags)
|
||||
gv_update_sd_state(s);
|
||||
}
|
||||
|
||||
/* Save the config back to disk. */
|
||||
if (flags & GV_SETSTATE_CONFIG)
|
||||
gv_save_config_all(d->vinumconf);
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user