equal
deleted
inserted
replaced
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. |
24 * Copyright 2011 Nexenta Systems, Inc. All rights reserved. |
25 * Copyright (c) 2011 by Delphix. All rights reserved. |
25 * Copyright (c) 2012 by Delphix. All rights reserved. |
26 */ |
26 */ |
27 |
27 |
28 #include <sys/spa.h> |
28 #include <sys/spa.h> |
29 #include <sys/spa_impl.h> |
29 #include <sys/spa_impl.h> |
30 #include <sys/nvpair.h> |
30 #include <sys/nvpair.h> |
33 #include <sys/vdev_impl.h> |
33 #include <sys/vdev_impl.h> |
34 #include <sys/zfs_ioctl.h> |
34 #include <sys/zfs_ioctl.h> |
35 #include <sys/utsname.h> |
35 #include <sys/utsname.h> |
36 #include <sys/systeminfo.h> |
36 #include <sys/systeminfo.h> |
37 #include <sys/sunddi.h> |
37 #include <sys/sunddi.h> |
|
38 #include <sys/zfeature.h> |
38 #ifdef _KERNEL |
39 #ifdef _KERNEL |
39 #include <sys/kobj.h> |
40 #include <sys/kobj.h> |
40 #include <sys/zone.h> |
41 #include <sys/zone.h> |
41 #endif |
42 #endif |
42 |
43 |
407 |
408 |
408 nvroot = vdev_config_generate(spa, vd, getstats, 0); |
409 nvroot = vdev_config_generate(spa, vd, getstats, 0); |
409 VERIFY(nvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot) == 0); |
410 VERIFY(nvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot) == 0); |
410 nvlist_free(nvroot); |
411 nvlist_free(nvroot); |
411 |
412 |
|
413 /* |
|
414 * Store what's necessary for reading the MOS in the label. |
|
415 */ |
|
416 VERIFY(nvlist_add_nvlist(config, ZPOOL_CONFIG_FEATURES_FOR_READ, |
|
417 spa->spa_label_features) == 0); |
|
418 |
412 if (getstats && spa_load_state(spa) == SPA_LOAD_NONE) { |
419 if (getstats && spa_load_state(spa) == SPA_LOAD_NONE) { |
413 ddt_histogram_t *ddh; |
420 ddt_histogram_t *ddh; |
414 ddt_stat_t *dds; |
421 ddt_stat_t *dds; |
415 ddt_object_t *ddo; |
422 ddt_object_t *ddo; |
416 |
423 |