svn commit: r296613 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Alexander Motin
mav at FreeBSD.org
Thu Mar 10 14:18:16 UTC 2016
Author: mav
Date: Thu Mar 10 14:18:14 2016
New Revision: 296613
URL: https://svnweb.freebsd.org/changeset/base/296613
Log:
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:
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 14:17:24 2016 (r296612)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Mar 10 14:18:14 2016 (r296613)
@@ -811,7 +811,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;
/*
More information about the svn-src-head
mailing list