From owner-freebsd-geom@FreeBSD.ORG Fri Nov 12 15:00:27 2010 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D14610656C4 for ; Fri, 12 Nov 2010 15:00:27 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id D4ACD8FC24 for ; Fri, 12 Nov 2010 15:00:22 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PGv6z-00012i-Ij for freebsd-geom@freebsd.org; Fri, 12 Nov 2010 16:00:21 +0100 Received: from cpe-188-129-96-31.dynamic.amis.hr ([188.129.96.31]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Nov 2010 16:00:21 +0100 Received: from ivoras by cpe-188-129-96-31.dynamic.amis.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Nov 2010 16:00:21 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-geom@freebsd.org From: Ivan Voras Date: Fri, 12 Nov 2010 16:00:09 +0100 Lines: 25 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpe-188-129-96-31.dynamic.amis.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101102 Thunderbird/3.1.6 Cc: freebsd-fs@freebsd.org Subject: ZFS stripesize patch (in the context of 4k sector drives) X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2010 15:00:27 -0000 Hello, Any objections to me committing the following patch? The intention is to use stripesize info from GEOM in creating vdevs, in the hope that the 4 KiB sector magic will work. Index: cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c =================================================================== --- cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c (revision 215173) +++ cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c (working copy) @@ -496,7 +496,8 @@ /* * Determine the device's minimum transfer size. */ - *ashift = highbit(MAX(pp->sectorsize, SPA_MINBLOCKSIZE)) - 1; + *ashift = highbit(MAX(pp->stripesize ? pp->stripesize : pp->sectorsize, + SPA_MINBLOCKSIZE)) - 1; /* * Clear the nowritecache bit, so that on a vdev_reopen() we will