summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2016-03-21 00:29:00 +0000
committermav <mav@FreeBSD.org>2016-03-21 00:29:00 +0000
commit138555afff26f123451dba0e4d675f33d0fa3c86 (patch)
treeb05e0483171b88eef4efa128436d6ef25b75dd13
parente9114f9ca10441028766b8b4f1f23e3c04598d80 (diff)
downloadFreeBSD-src-138555afff26f123451dba0e4d675f33d0fa3c86.zip
FreeBSD-src-138555afff26f123451dba0e4d675f33d0fa3c86.tar.gz
MFC r296615: 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.
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
index 80a0a79..d64001e 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
@@ -803,7 +803,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
*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;
/*
OpenPOWER on IntegriCloud