From f63f4dd2cd20e7785e474bad518696ca920e94f7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 14 Jan 2009 08:26:09 -0800 Subject: [PATCH] Remove unneeded chunk, create a FS the real way with an ioctl --- module/zfs/spa.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/module/zfs/spa.c b/module/zfs/spa.c index d38bf1760b..f4e4021977 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -2088,44 +2088,6 @@ spa_create(const char *pool, nvlist_t *nvroot, nvlist_t *props, spa->spa_minref = refcount_count(&spa->spa_refcount); -#if defined(_KERNEL) && !defined(HAVE_ZPL) - { - objset_t *os; - nvlist_t *zprops; - - /* - * Create the pool's root filesystem. - */ - error = dmu_objset_open(pool, DMU_OST_ZFS, DS_MODE_OWNER, &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) - version = ZPL_VERSION; - else - 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), - version) == 0); - - zfs_create_fs(os, CRED(), zprops, tx); - nvlist_free(zprops); - - dmu_tx_commit(tx); - dmu_objset_close(os); - } -#endif - return (0); }