svn commit: r296615 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Alexander Motin mav at FreeBSD.org
Thu Mar 10 16:39:47 UTC 2016


Author: mav
Date: Thu Mar 10 16:39:46 2016
New Revision: 296615
URL: https://svnweb.freebsd.org/changeset/base/296615

Log:
  Make ZFS ignore stripe sizes above SPA_MAXASHIFT (8KB).
  
  If device has stripe size bigger then maximal sector size supported by
  ZFS, there is nothing can be done to avoid read-modify-write cycles.
  Taking that stripe size into account will only reduce space efficiency
  and pointlessly bother user with warnings that can not be fixed.
  
  Discussed with:	smh

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Thu Mar 10 15:51:43 2016	(r296614)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Thu Mar 10 16:39:46 2016	(r296615)
@@ -812,7 +812,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi
 	*logical_ashift = highbit(MAX(pp->sectorsize, SPA_MINBLOCKSIZE)) - 1;
 	*physical_ashift = 0;
 	if (pp->stripesize > (1 << *logical_ashift) && ISP2(pp->stripesize) &&
-	    pp->stripeoffset == 0)
+	    pp->stripesize <= (1 << SPA_MAXASHIFT) && pp->stripeoffset == 0)
 		*physical_ashift = highbit(pp->stripesize) - 1;
 
 	/*


More information about the svn-src-head mailing list