summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorloli10K <[email protected]>2020-01-07 00:40:06 +0100
committerBrian Behlendorf <[email protected]>2020-01-06 15:40:06 -0800
commitc24fa4b19a1b117945f3235e014f926fe93b0c5a (patch)
tree37178dc7c410829ef81f1f2c61c7df44d6d41710 /module/zfs
parentbc9cef11fddfe8e6e240477084a49f4bad1fb4f3 (diff)
Fix "zpool add -n" for dedup, special and log devices
For dedup, special and log devices "zpool add -n" does not print correctly their vdev type: ~# zpool add -n pool dedup /tmp/dedup special /tmp/special log /tmp/log would update 'pool' to the following configuration: pool /tmp/normal /tmp/dedup /tmp/special /tmp/log This could lead storage administrators to modify their ZFS pools to unexpected and unintended vdev configurations. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #9783 Closes #9390
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/spa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 6cadefe91..39b59d5ce 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -5690,7 +5690,7 @@ spa_create(const char *pool, nvlist_t *nvroot, nvlist_t *props,
return (error);
}
}
- if (!has_allocclass && zfs_special_devs(nvroot)) {
+ if (!has_allocclass && zfs_special_devs(nvroot, NULL)) {
spa_deactivate(spa);
spa_remove(spa);
mutex_exit(&spa_namespace_lock);