diff options
author | mav <mav@FreeBSD.org> | 2016-03-21 00:28:13 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-03-21 00:28:13 +0000 |
commit | e9114f9ca10441028766b8b4f1f23e3c04598d80 (patch) | |
tree | b0ea5a7ba52b3cd7d392d0bdf52471ccb8a9a96a /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c | |
parent | 7b593e3e624439af1d6ad278b08a866330ef7844 (diff) | |
download | FreeBSD-src-e9114f9ca10441028766b8b4f1f23e3c04598d80.zip FreeBSD-src-e9114f9ca10441028766b8b4f1f23e3c04598d80.tar.gz |
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.
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c | 3 |
1 files changed, 2 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 8f9f295..80a0a79 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 @@ -802,7 +802,8 @@ 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) + if (pp->stripesize > (1 << *logical_ashift) && ISP2(pp->stripesize) && + pp->stripeoffset == 0) *physical_ashift = highbit(pp->stripesize) - 1; /* |