Skip to content
Browse files

Exclude log device ashift from normal class

When opening a log device during import its allocation bias will
not yet have been set by vdev_load().  This results in the log
device's ashift being incorrectly applied to the maximum ashift
of the vdevs in the normal class.  Which in turn prevents the
removal of any top-level devices due to the ashift check in the
spa_vdev_remove_top_check() function.

This issue is resolved by including vdev_islog in the check since
it will be set correctly during vdev_open().

Signed-off-by: Brian Behlendorf <>
  • Loading branch information...
behlendorf committed May 11, 2019
1 parent f378f42 commit 4aef97557472e2ce6fb8d9b43328e3929f6e4bed
Showing with 1 addition and 1 deletion.
  1. +1 −1 module/zfs/vdev.c
@@ -1858,7 +1858,7 @@ vdev_open(vdev_t *vd)
if (vd->vdev_top == vd && vd->vdev_ashift != 0 &&
vd->vdev_alloc_bias == VDEV_BIAS_NONE &&
vd->vdev_aux == NULL) {
vd->vdev_islog == 0 && vd->vdev_aux == NULL) {
if (vd->vdev_ashift > spa->spa_max_ashift)
spa->spa_max_ashift = vd->vdev_ashift;
if (vd->vdev_ashift < spa->spa_min_ashift)

0 comments on commit 4aef975

Please sign in to comment.
You can’t perform that action at this time.