diff options
author | mav <mav@FreeBSD.org> | 2009-12-24 12:17:22 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2009-12-24 12:17:22 +0000 |
commit | e6038335e883e94487aa6cd880b47f3726647179 (patch) | |
tree | e55aea7cf1ff1159ed7681cf2c13c1251b8bc018 /sys/geom/mirror | |
parent | f90d8324367d5d579faf67e2a84261d958916058 (diff) | |
download | FreeBSD-src-e6038335e883e94487aa6cd880b47f3726647179.zip FreeBSD-src-e6038335e883e94487aa6cd880b47f3726647179.tar.gz |
As soon as mirror has no own stripes, report largest stripe of unrerlying
components, hoping others fit, if they are not equal.
Diffstat (limited to 'sys/geom/mirror')
-rw-r--r-- | sys/geom/mirror/g_mirror.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c index 973e10b..25de44a 100644 --- a/sys/geom/mirror/g_mirror.c +++ b/sys/geom/mirror/g_mirror.c @@ -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(); |