aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrakash Surya <[email protected]>2018-02-16 08:17:06 -0800
committerBrian Behlendorf <[email protected]>2018-04-14 12:40:52 -0700
commiteecdd8e8849f136c488a8e18ed06e9ecb93dd4bb (patch)
tree7cf19925ada269f1a52d141879234661c502df6e
parent4bf8108ede7c1b2bff4052eb25e29874638754f5 (diff)
OpenZFS 9084 - spa_*_ashift must ignore spare devices
It's possible for the following assertion to be tripped when running ztest: assertion failed for thread 0xf09fca40, thread-id 549: spa->spa_max_ashift == spa->spa_min_ashift (0xc == 0x9), file ../../../uts/common/fs/zfs/vdev_removal.c, line 965 > $c libc.so.1`_lwp_kill+7(ebdde6c0, ebdde6c0, a9, fee7865e) libc.so.1`_assfail+0x214(ebddea28, fed7ac3c, 3c5, fef62000) libc.so.1`assfail3+0xde(fed7b130, c, 0, fed812cb, 9, 0) libzpool.so.1`spa_vdev_copy_impl+0x26b(89a4b40, ebddef74, ebddef68, 8992dc0, ebe10a00, fef073c0) libzpool.so.1`spa_vdev_remove_thread+0x6cd(87450c0, 0, 0, fee8f43a) libc.so.1`_thrp_setup+0x8c(f09fca40) libc.so.1`_lwp_start(f09fca40, 0, 0, 0, 0, 0) > ::spa -v ADDR STATE NAME 08723000 ACTIVE ztest ADDR STATE AUX DESCRIPTION 087466c0 HEALTHY - root 087450c0 HEALTHY - /rpool/tmp/ztest.0a 08745640 HEALTHY - indirect 08745bc0 HEALTHY - /rpool/tmp/ztest.2a 08746140 HEALTHY - /rpool/tmp/ztest.3a - - - spares 08744b40 HEALTHY - /rpool/tmp/ztest.spares.0 Authored by: Prakash Surya <[email protected]> Reviewed by: Prashanth Sreenivasa <[email protected]> Reviewed by: George Wilson <[email protected]> Approved by: Dan McDonald <[email protected]> Ported-by: Tim Chase <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/9084 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/18acba7 Closes #6900
-rw-r--r--module/zfs/vdev.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c
index 0dea0b4e4..9fc25dd6a 100644
--- a/module/zfs/vdev.c
+++ b/module/zfs/vdev.c
@@ -1544,14 +1544,6 @@ vdev_open(vdev_t *vd)
return (error);
}
- if (vd->vdev_top == vd && vd->vdev_ashift != 0 &&
- !vd->vdev_isl2cache && !vd->vdev_islog) {
- if (vd->vdev_ashift > spa->spa_max_ashift)
- spa->spa_max_ashift = vd->vdev_ashift;
- if (vd->vdev_ashift < spa->spa_min_ashift)
- spa->spa_min_ashift = vd->vdev_ashift;
- }
-
/*
* Track the min and max ashift values for normal data devices.
*/