Skip to content

Commit

Permalink
11541 allocation_classes feature must be enabled to add log device
Browse files Browse the repository at this point in the history
Reviewed by: C Fraire <cfraire@me.com>
Reviewed by: Kody Kantor <kody.kantor@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>
  • Loading branch information
jjelinek committed Aug 15, 2019
1 parent c023f65 commit c1064fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions usr/src/uts/common/fs/zfs/vdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/

Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit c1064fd

Please sign in to comment.