mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
MFC r200935:
As soon as mirror has no own stripes, report largest stripe of unrerlying components, hoping others fit, if they are not equal.
This commit is contained in:
parent
48eae87f12
commit
c730493bbf
1 changed files with 9 additions and 0 deletions
|
|
@ -2036,6 +2036,15 @@ g_mirror_launch_provider(struct g_mirror_softc *sc)
|
|||
pp = g_new_providerf(sc->sc_geom, "mirror/%s", sc->sc_name);
|
||||
pp->mediasize = sc->sc_mediasize;
|
||||
pp->sectorsize = sc->sc_sectorsize;
|
||||
pp->stripesize = 0;
|
||||
pp->stripeoffset = 0;
|
||||
LIST_FOREACH(disk, &sc->sc_disks, d_next) {
|
||||
if (disk->d_consumer && disk->d_consumer->provider &&
|
||||
disk->d_consumer->provider->stripesize > pp->stripesize) {
|
||||
pp->stripesize = disk->d_consumer->provider->stripesize;
|
||||
pp->stripeoffset = disk->d_consumer->provider->stripeoffset;
|
||||
}
|
||||
}
|
||||
sc->sc_provider = pp;
|
||||
g_error_provider(pp, 0);
|
||||
g_topology_unlock();
|
||||
|
|
|
|||
Loading…
Reference in a new issue