aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/vdev.c')
-rw-r--r--module/zfs/vdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c
index 06097f355..afff4d423 100644
--- a/module/zfs/vdev.c
+++ b/module/zfs/vdev.c
@@ -1258,11 +1258,12 @@ vdev_open(vdev_t *vd)
if (vd->vdev_asize == 0) {
/*
* This is the first-ever open, so use the computed values.
- * For testing purposes, a higher ashift can be requested.
+ * For compatibility, a different ashift can be requested.
*/
vd->vdev_asize = asize;
vd->vdev_max_asize = max_asize;
- vd->vdev_ashift = MAX(ashift, vd->vdev_ashift);
+ if (vd->vdev_ashift == 0)
+ vd->vdev_ashift = ashift;
} else {
/*
* Detect if the alignment requirement has increased.