summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2019-08-13 10:56:54 -0600
committerJerry Jelinek <jerry.jelinek@joyent.com>2019-08-15 09:42:38 -0600
commitc1064fd7ce62fe763a4475e9988ffea3b22137de (patch)
tree07ede000495191f0cf2b91889b684071f97dba00
parentc023f651c0471d0024cb0a436d1f77bf37350180 (diff)
downloadillumos-joyent-c1064fd7ce62fe763a4475e9988ffea3b22137de.tar.gz
11541 allocation_classes feature must be enabled to add log device
Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Kody Kantor <kody.kantor@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/fs/zfs/vdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/uts/common/fs/zfs/vdev.c b/usr/src/uts/common/fs/zfs/vdev.c
index 73b7c8e2fc..3bf145a4ac 100644
--- a/usr/src/uts/common/fs/zfs/vdev.c
+++ b/usr/src/uts/common/fs/zfs/vdev.c
@@ -25,7 +25,7 @@
* Copyright 2017 Nexenta Systems, Inc.
* Copyright (c) 2014 Integros [integros.com]
* Copyright 2016 Toomas Soome <tsoome@me.com>
- * Copyright 2017 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
* Copyright (c) 2017, Intel Corporation.
*/
@@ -634,7 +634,8 @@ vdev_alloc(spa_t *spa, vdev_t **vdp, nvlist_t *nv, vdev_t *parent, uint_t id,
alloc_bias = vdev_derive_alloc_bias(bias);
/* spa_vdev_add() expects feature to be enabled */
- if (spa->spa_load_state != SPA_LOAD_CREATE &&
+ if (alloc_bias != VDEV_BIAS_LOG &&
+ spa->spa_load_state != SPA_LOAD_CREATE &&
!spa_feature_is_enabled(spa,
SPA_FEATURE_ALLOCATION_CLASSES)) {
return (SET_ERROR(ENOTSUP));