Synchronize unclean mirrors before adding them to a running gmirror.
During gmirror startup, if component mirrors are found to be dirty as is typical after a system crash, the mirrors are synchronized to the mirror with highest priority. However if a gmirror starts without all of its mirrors present, for example because of some transient delays during tasting, the remaining mirrors must be synchronized before they may become active. MFC after: 2 weeks Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
e351474725
commit
db7c508323
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=317712
@ -2225,7 +2225,9 @@ g_mirror_determine_state(struct g_mirror_disk *disk)
|
||||
sc = disk->d_softc;
|
||||
if (sc->sc_syncid == disk->d_sync.ds_syncid) {
|
||||
if ((disk->d_flags &
|
||||
G_MIRROR_DISK_FLAG_SYNCHRONIZING) == 0) {
|
||||
G_MIRROR_DISK_FLAG_SYNCHRONIZING) == 0 &&
|
||||
(g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_ACTIVE) == 0 ||
|
||||
(disk->d_flags & G_MIRROR_DISK_FLAG_DIRTY) == 0)) {
|
||||
/* Disk does not need synchronization. */
|
||||
state = G_MIRROR_DISK_STATE_ACTIVE;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user