summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/libzfs/common/libzfs_pool.c7
-rw-r--r--usr/src/uts/common/fs/zfs/vdev.c19
-rw-r--r--usr/src/uts/common/fs/zfs/zfs_ioctl.c24
3 files changed, 2 insertions, 48 deletions
diff --git a/usr/src/lib/libzfs/common/libzfs_pool.c b/usr/src/lib/libzfs/common/libzfs_pool.c
index 60c83be1a9..d2b4b54294 100644
--- a/usr/src/lib/libzfs/common/libzfs_pool.c
+++ b/usr/src/lib/libzfs/common/libzfs_pool.c
@@ -1503,13 +1503,6 @@ zpool_add(zpool_handle_t *zhp, nvlist_t *nvroot)
(void) zfs_error(hdl, EZFS_BADVERSION, msg);
break;
- case EDOM:
- zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "root pool can not have multiple vdevs"
- " or separate logs"));
- (void) zfs_error(hdl, EZFS_POOL_NOTSUP, msg);
- break;
-
default:
(void) zpool_standard_error(hdl, errno, msg);
}
diff --git a/usr/src/uts/common/fs/zfs/vdev.c b/usr/src/uts/common/fs/zfs/vdev.c
index 9773ec7960..487379aba4 100644
--- a/usr/src/uts/common/fs/zfs/vdev.c
+++ b/usr/src/uts/common/fs/zfs/vdev.c
@@ -4438,7 +4438,6 @@ vdev_children_are_offline(vdev_t *vd)
/*
* Check the vdev configuration to ensure that it's capable of supporting
* a root pool. We do not support partial configuration.
- * In addition, only a single top-level vdev is allowed.
*/
boolean_t
vdev_is_bootable(vdev_t *vd)
@@ -4446,23 +4445,7 @@ vdev_is_bootable(vdev_t *vd)
if (!vd->vdev_ops->vdev_op_leaf) {
char *vdev_type = vd->vdev_ops->vdev_op_type;
- if (strcmp(vdev_type, VDEV_TYPE_ROOT) == 0 &&
- vd->vdev_children > 1) {
- int non_indirect = 0;
-
- for (int c = 0; c < vd->vdev_children; c++) {
- vdev_type =
- vd->vdev_child[c]->vdev_ops->vdev_op_type;
- if (strcmp(vdev_type, VDEV_TYPE_INDIRECT) != 0)
- non_indirect++;
- }
- /*
- * non_indirect > 1 means we have more than one
- * top-level vdev, so we stop here.
- */
- if (non_indirect > 1)
- return (B_FALSE);
- } else if (strcmp(vdev_type, VDEV_TYPE_MISSING) == 0) {
+ if (strcmp(vdev_type, VDEV_TYPE_MISSING) == 0) {
return (B_FALSE);
}
}
diff --git a/usr/src/uts/common/fs/zfs/zfs_ioctl.c b/usr/src/uts/common/fs/zfs/zfs_ioctl.c
index d10db9778b..68d9f3a011 100644
--- a/usr/src/uts/common/fs/zfs/zfs_ioctl.c
+++ b/usr/src/uts/common/fs/zfs/zfs_ioctl.c
@@ -1972,8 +1972,7 @@ zfs_ioc_vdev_add(zfs_cmd_t *zc)
{
spa_t *spa;
int error;
- nvlist_t *config, **l2cache, **spares;
- uint_t nl2cache = 0, nspares = 0;
+ nvlist_t *config;
error = spa_open(zc->zc_name, &spa, FTAG);
if (error != 0)
@@ -1981,27 +1980,6 @@ zfs_ioc_vdev_add(zfs_cmd_t *zc)
error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size,
zc->zc_iflags, &config);
- (void) nvlist_lookup_nvlist_array(config, ZPOOL_CONFIG_L2CACHE,
- &l2cache, &nl2cache);
-
- (void) nvlist_lookup_nvlist_array(config, ZPOOL_CONFIG_SPARES,
- &spares, &nspares);
-
- /*
- * A root pool with concatenated devices is not supported.
- * Thus, can not add a device to a root pool.
- *
- * Intent log device can not be added to a rootpool because
- * during mountroot, zil is replayed, a seperated log device
- * can not be accessed during the mountroot time.
- *
- * l2cache and spare devices are ok to be added to a rootpool.
- */
- if (spa_bootfs(spa) != 0 && nl2cache == 0 && nspares == 0) {
- nvlist_free(config);
- spa_close(spa, FTAG);
- return (SET_ERROR(EDOM));
- }
if (error == 0) {
error = spa_vdev_add(spa, config);