From 86b19d186197668a67bd5ae8cd446f1fc4b2e775 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Thu, 9 Sep 2010 21:20:18 +0000 Subject: [PATCH] On FreeBSD we can log from pool that have multiple top-level vdevs or log vdevs, so don't deny adding new vdevs if bootfs property is set. MFC after: 2 weeks --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c index 764b577b0aea..430a1b934ae5 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c @@ -1217,8 +1217,12 @@ zfs_ioc_vdev_add(zfs_cmd_t *zc) { spa_t *spa; int error; +#ifdef sun nvlist_t *config, **l2cache, **spares; uint_t nl2cache = 0, nspares = 0; +#else + nvlist_t *config; +#endif error = spa_open(zc->zc_name, &spa, FTAG); if (error != 0) @@ -1226,6 +1230,7 @@ zfs_ioc_vdev_add(zfs_cmd_t *zc) error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size, &config); +#ifdef sun (void) nvlist_lookup_nvlist_array(config, ZPOOL_CONFIG_L2CACHE, &l2cache, &nl2cache); @@ -1246,6 +1251,7 @@ zfs_ioc_vdev_add(zfs_cmd_t *zc) spa_close(spa, FTAG); return (EDOM); } +#endif if (error == 0) { error = spa_vdev_add(spa, config);