svn commit: r200935 - head/sys/geom/mirror
Alexander Motin
mav at FreeBSD.org
Thu Dec 24 12:17:22 UTC 2009
Author: mav
Date: Thu Dec 24 12:17:22 2009
New Revision: 200935
URL: http://svn.freebsd.org/changeset/base/200935
Log:
As soon as mirror has no own stripes, report largest stripe of unrerlying
components, hoping others fit, if they are not equal.
Modified:
head/sys/geom/mirror/g_mirror.c
Modified: head/sys/geom/mirror/g_mirror.c
==============================================================================
--- head/sys/geom/mirror/g_mirror.c Thu Dec 24 11:05:23 2009 (r200934)
+++ head/sys/geom/mirror/g_mirror.c Thu Dec 24 12:17:22 2009 (r200935)
@@ -2036,6 +2036,15 @@ g_mirror_launch_provider(struct g_mirror
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();
More information about the svn-src-all
mailing list