From owner-svn-src-head@FreeBSD.ORG Thu Dec 24 12:17:22 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77BC01065676; Thu, 24 Dec 2009 12:17:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 675728FC15; Thu, 24 Dec 2009 12:17:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBOCHMeM029903; Thu, 24 Dec 2009 12:17:22 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBOCHMGN029901; Thu, 24 Dec 2009 12:17:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200912241217.nBOCHMGN029901@svn.freebsd.org> From: Alexander Motin Date: Thu, 24 Dec 2009 12:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200935 - head/sys/geom/mirror X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2009 12:17:22 -0000 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();