Mark a plex as 'newborn' when it is created. This is used to indicate
that new RAID5 plexes need to be initialized first.
This commit is contained in:
parent
ae6d3a22dc
commit
865897c9f1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131107
@ -384,6 +384,7 @@ gv_create(struct g_geom *gp, struct gctl_req *req)
|
||||
}
|
||||
|
||||
p->vinumconf = sc;
|
||||
p->flags |= GV_PLEX_NEWBORN;
|
||||
LIST_INIT(&p->subdisks);
|
||||
LIST_INSERT_HEAD(&sc->plexes, p, plex);
|
||||
}
|
||||
|
@ -421,10 +421,12 @@ gv_update_plex_config(struct gv_plex *p)
|
||||
|
||||
if (p->sdcount == 0)
|
||||
state = GV_PLEX_DOWN;
|
||||
else if ((p->flags & GV_PLEX_ADDED) || (p->org == GV_PLEX_RAID5)) {
|
||||
else if ((p->flags & GV_PLEX_ADDED) ||
|
||||
((p->org == GV_PLEX_RAID5) && (p->flags & GV_PLEX_NEWBORN))) {
|
||||
LIST_FOREACH(s, &p->subdisks, in_plex)
|
||||
s->state = GV_SD_STALE;
|
||||
p->flags &= ~GV_PLEX_ADDED;
|
||||
p->flags &= ~GV_PLEX_NEWBORN;
|
||||
p->state = GV_PLEX_DOWN;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user