svn commit: r201580 - stable/8/sys/geom/mirror
Alexander Motin
mav at FreeBSD.org
Tue Jan 5 13:47:55 UTC 2010
Author: mav
Date: Tue Jan 5 13:47:55 2010
New Revision: 201580
URL: http://svn.freebsd.org/changeset/base/201580
Log:
MFC r200935:
As soon as mirror has no own stripes, report largest stripe of unrerlying
components, hoping others fit, if they are not equal.
Modified:
stable/8/sys/geom/mirror/g_mirror.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
Modified: stable/8/sys/geom/mirror/g_mirror.c
==============================================================================
--- stable/8/sys/geom/mirror/g_mirror.c Tue Jan 5 13:46:39 2010 (r201579)
+++ stable/8/sys/geom/mirror/g_mirror.c Tue Jan 5 13:47:55 2010 (r201580)
@@ -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-stable-8
mailing list