equal
deleted
inserted
replaced
19 * CDDL HEADER END |
19 * CDDL HEADER END |
20 */ |
20 */ |
21 |
21 |
22 /* |
22 /* |
23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
|
24 * Copyright 2011 Nexenta Systems, Inc. All rights reserved. |
|
25 * Copyright (c) 2011 by Delphix. All rights reserved. |
24 */ |
26 */ |
25 |
27 |
26 #include <sys/spa.h> |
28 #include <sys/spa.h> |
27 #include <sys/spa_impl.h> |
29 #include <sys/spa_impl.h> |
28 #include <sys/nvpair.h> |
30 #include <sys/nvpair.h> |
343 spa_state(spa)) == 0); |
345 spa_state(spa)) == 0); |
344 VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_POOL_TXG, |
346 VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_POOL_TXG, |
345 txg) == 0); |
347 txg) == 0); |
346 VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_POOL_GUID, |
348 VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_POOL_GUID, |
347 spa_guid(spa)) == 0); |
349 spa_guid(spa)) == 0); |
|
350 VERIFY(spa->spa_comment == NULL || nvlist_add_string(config, |
|
351 ZPOOL_CONFIG_COMMENT, spa->spa_comment) == 0); |
|
352 |
|
353 |
348 #ifdef _KERNEL |
354 #ifdef _KERNEL |
349 hostid = zone_get_hostid(NULL); |
355 hostid = zone_get_hostid(NULL); |
350 #else /* _KERNEL */ |
356 #else /* _KERNEL */ |
351 /* |
357 /* |
352 * We're emulating the system's hostid in userland, so we can't use |
358 * We're emulating the system's hostid in userland, so we can't use |