Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Mar 2016 00:28:13 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r297122 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201603210028.u2L0SDmJ038997@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Mar 21 00:28:13 2016
New Revision: 297122
URL: https://svnweb.freebsd.org/changeset/base/297122

Log:
  MFC r296613: Make ZFS more picky to GEOM stripe sizes and offsets.
  
  Use of misaligned or non-power-of-2 stripes is not really useful for ZFS,
  since increased ashift won't help to avoid read-modify-write cycles, and
  only reduce pool space efficiency and compression rates.

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Mon Mar 21 00:27:00 2016	(r297121)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Mon Mar 21 00:28:13 2016	(r297122)
@@ -802,7 +802,8 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi
 	 */
 	*logical_ashift = highbit(MAX(pp->sectorsize, SPA_MINBLOCKSIZE)) - 1;
 	*physical_ashift = 0;
-	if (pp->stripesize)
+	if (pp->stripesize > (1 << *logical_ashift) && ISP2(pp->stripesize) &&
+	    pp->stripeoffset == 0)
 		*physical_ashift = highbit(pp->stripesize) - 1;
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603210028.u2L0SDmJ038997>