Save the config back to disk when a drive goes down.

This commit is contained in:
Lukas Ertl 2004-09-13 17:33:52 +00:00
parent ea29a30466
commit a0781b98f3
2 changed files with 6 additions and 1 deletions

View File

@ -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);

View File

@ -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);
}