1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 4261 unchanged lines hidden (view full) --- 4270 if (config != NULL) { 4271 VERIFY(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME, 4272 &pname) == 0 && strcmp(name, pname) == 0); 4273 VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, &txg) 4274 == 0); 4275 4276 if ((spa = spa_lookup(pname)) != NULL) { 4277 /* |
4278 * The pool could already be imported, 4279 * e.g., after reboot -r. 4280 */ 4281 if (spa->spa_state == POOL_STATE_ACTIVE) { 4282 mutex_exit(&spa_namespace_lock); 4283 nvlist_free(config); 4284 return (0); 4285 } 4286 4287 /* |
4288 * Remove the existing root pool from the namespace so 4289 * that we can replace it with the correct config 4290 * we just read in. 4291 */ 4292 spa_remove(spa); 4293 } 4294 spa = spa_add(pname, config, NULL); 4295 --- 3098 unchanged lines hidden --- |