1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

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
This commit is contained in:
Pawel Jakub Dawidek 2010-09-09 21:20:18 +00:00
parent f60ec6d63d
commit 86b19d1861
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212385

View File

@ -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);