From 3f0ec06d1771800b60883e56fa192e23df50f805 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 19 Dec 2008 10:45:59 -0800 Subject: [PATCH 1/2] Remove chunk from spa_import_common, readd --- module/zfs/spa.c | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 4ebb415a7b..41d67aacd0 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -2237,39 +2237,6 @@ spa_import_common(const char *pool, nvlist_t *config, nvlist_t *props, spa->spa_import_faulted = B_FALSE; mutex_exit(&spa_namespace_lock); -#ifndef HAVE_ZPL - /* - * Create the pool's root filesystem. - */ - error = dmu_objset_open(pool, DMU_OST_ZFS, DS_MODE_PRIMARY, &os); - if (error != 0) - return (error); - - tx = dmu_tx_create(os); - - dmu_tx_hold_zap(tx, DMU_NEW_OBJECT, TRUE, NULL); /* master */ - dmu_tx_hold_zap(tx, DMU_NEW_OBJECT, TRUE, NULL); /* del queue */ - dmu_tx_hold_bonus(tx, DMU_NEW_OBJECT); /* root node */ - - error = dmu_tx_assign(tx, TXG_WAIT); - ASSERT3U(error, ==, 0); - - if (spa_version(dmu_objset_spa(os)) >= SPA_VERSION_FUID) - zpl_version = ZPL_VERSION; - else - zpl_version = MIN(ZPL_VERSION, ZPL_VERSION_FUID - 1); - - VERIFY(nvlist_alloc(&zprops, NV_UNIQUE_NAME, KM_SLEEP) == 0); - VERIFY(nvlist_add_uint64(zprops, zfs_prop_to_name(ZFS_PROP_VERSION), - zpl_version) == 0); - - zfs_create_fs(os, CRED(), zprops, tx); - nvlist_free(zprops); - - dmu_tx_commit(tx); - dmu_objset_close(os); -#endif - return (0); } From 66e0d59024a0be49c704106e2a432634ae18e712 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 19 Dec 2008 10:48:11 -0800 Subject: [PATCH 2/2] Whoops, add missing j --- module/zfs/spa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/spa.c b/module/zfs/spa.c index e213483d65..e7b6694beb 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -3232,7 +3232,7 @@ spa_vdev_remove_aux(nvlist_t *config, char *name, nvlist_t **dev, int count, nvlist_t *dev_to_remove) { nvlist_t **newdev = NULL; - int i; + int i, j; if (count > 1) newdev = kmem_alloc((count - 1) * sizeof (void *), KM_SLEEP);