aboutsummaryrefslogtreecommitdiffstats
path: root/uts
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2019-06-03 17:08:49 +0000
committerAlexander Motin <mav@FreeBSD.org>2019-06-03 17:08:49 +0000
commitaf9de5b9f4766c217d1e7d64c3811305a7b2f0b1 (patch)
tree2515fe93b4a7bf0ac7b180f6018cc4f3801c55d7 /uts
parentbb8cd94d19301471f5e3bdbc797e618ab6476e7d (diff)
downloadsrc-af9de5b9f4766c217d1e7d64c3811305a7b2f0b1.tar.gz
src-af9de5b9f4766c217d1e7d64c3811305a7b2f0b1.zip
9681 ztest failure in spa_history_log_internal due to spa_rename()
illumos/illumos-gate@6aee0ad76969eb0027131b3a338f2d94ae86f728 Reviewed by: Prakash Surya <prakash.surya@delphix.com> Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Matthew Ahrens <mahrens@delphix.com>
Notes
Notes: svn path=/vendor-sys/illumos/dist/; revision=348553
Diffstat (limited to 'uts')
-rw-r--r--uts/common/fs/zfs/spa_misc.c53
-rw-r--r--uts/common/fs/zfs/sys/spa.h1
2 files changed, 0 insertions, 54 deletions
diff --git a/uts/common/fs/zfs/spa_misc.c b/uts/common/fs/zfs/spa_misc.c
index 87a95f0a365f..8ba49fed4155 100644
--- a/uts/common/fs/zfs/spa_misc.c
+++ b/uts/common/fs/zfs/spa_misc.c
@@ -222,9 +222,6 @@
* vdev state is protected by spa_vdev_state_enter() / spa_vdev_state_exit().
* Like spa_vdev_enter/exit, these are convenience wrappers -- the actual
* locking is, always, based on spa_namespace_lock and spa_config_lock[].
- *
- * spa_rename() is also implemented within this file since it requires
- * manipulation of the namespace.
*/
static avl_tree_t spa_namespace_avl;
@@ -1334,56 +1331,6 @@ spa_deactivate_mos_feature(spa_t *spa, const char *feature)
}
/*
- * Rename a spa_t.
- */
-int
-spa_rename(const char *name, const char *newname)
-{
- spa_t *spa;
- int err;
-
- /*
- * Lookup the spa_t and grab the config lock for writing. We need to
- * actually open the pool so that we can sync out the necessary labels.
- * It's OK to call spa_open() with the namespace lock held because we
- * allow recursive calls for other reasons.
- */
- mutex_enter(&spa_namespace_lock);
- if ((err = spa_open(name, &spa, FTAG)) != 0) {
- mutex_exit(&spa_namespace_lock);
- return (err);
- }
-
- spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER);
-
- avl_remove(&spa_namespace_avl, spa);
- (void) strlcpy(spa->spa_name, newname, sizeof (spa->spa_name));
- avl_add(&spa_namespace_avl, spa);
-
- /*
- * Sync all labels to disk with the new names by marking the root vdev
- * dirty and waiting for it to sync. It will pick up the new pool name
- * during the sync.
- */
- vdev_config_dirty(spa->spa_root_vdev);
-
- spa_config_exit(spa, SCL_ALL, FTAG);
-
- txg_wait_synced(spa->spa_dsl_pool, 0);
-
- /*
- * Sync the updated config cache.
- */
- spa_write_cachefile(spa, B_FALSE, B_TRUE);
-
- spa_close(spa, FTAG);
-
- mutex_exit(&spa_namespace_lock);
-
- return (0);
-}
-
-/*
* Return the spa_t associated with given pool_guid, if it exists. If
* device_guid is non-zero, determine whether the pool exists *and* contains
* a device with the specified device_guid.
diff --git a/uts/common/fs/zfs/sys/spa.h b/uts/common/fs/zfs/sys/spa.h
index 1acbe3137737..dc5da8fd778d 100644
--- a/uts/common/fs/zfs/sys/spa.h
+++ b/uts/common/fs/zfs/sys/spa.h
@@ -821,7 +821,6 @@ extern void spa_load_note(spa_t *spa, const char *fmt, ...);
extern void spa_activate_mos_feature(spa_t *spa, const char *feature,
dmu_tx_t *tx);
extern void spa_deactivate_mos_feature(spa_t *spa, const char *feature);
-extern int spa_rename(const char *oldname, const char *newname);
extern spa_t *spa_by_guid(uint64_t pool_guid, uint64_t device_guid);
extern boolean_t spa_guid_exists(uint64_t pool_guid, uint64_t device_guid);
extern char *spa_strdup(const char *);