Deleted Added
full compact
spa_config.c (228103) spa_config.c (236884)
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

--- 8 unchanged lines hidden (view full) ---

17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
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

--- 8 unchanged lines hidden (view full) ---

17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
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.
25 * Copyright (c) 2012 by Delphix. All rights reserved.
26 */
27
28#include <sys/zfs_context.h>
29#include <sys/spa.h>
30#include <sys/spa_impl.h>
31#include <sys/nvpair.h>
32#include <sys/uio.h>
33#include <sys/fs/zfs.h>
34#include <sys/vdev_impl.h>
35#include <sys/zfs_ioctl.h>
36#include <sys/utsname.h>
37#include <sys/sunddi.h>
26 */
27
28#include <sys/zfs_context.h>
29#include <sys/spa.h>
30#include <sys/spa_impl.h>
31#include <sys/nvpair.h>
32#include <sys/uio.h>
33#include <sys/fs/zfs.h>
34#include <sys/vdev_impl.h>
35#include <sys/zfs_ioctl.h>
36#include <sys/utsname.h>
37#include <sys/sunddi.h>
38#include <sys/zfeature.h>
38#ifdef _KERNEL
39#include <sys/kobj.h>
40#include <sys/zone.h>
41#endif
42
43/*
44 * Pool configuration repository.
45 *

--- 356 unchanged lines hidden (view full) ---

402 VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_SPLIT_GUID,
403 split_guid) == 0);
404 }
405
406 nvroot = vdev_config_generate(spa, vd, getstats, 0);
407 VERIFY(nvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot) == 0);
408 nvlist_free(nvroot);
409
39#ifdef _KERNEL
40#include <sys/kobj.h>
41#include <sys/zone.h>
42#endif
43
44/*
45 * Pool configuration repository.
46 *

--- 356 unchanged lines hidden (view full) ---

403 VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_SPLIT_GUID,
404 split_guid) == 0);
405 }
406
407 nvroot = vdev_config_generate(spa, vd, getstats, 0);
408 VERIFY(nvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot) == 0);
409 nvlist_free(nvroot);
410
411 /*
412 * Store what's necessary for reading the MOS in the label.
413 */
414 VERIFY(nvlist_add_nvlist(config, ZPOOL_CONFIG_FEATURES_FOR_READ,
415 spa->spa_label_features) == 0);
416
410 if (getstats && spa_load_state(spa) == SPA_LOAD_NONE) {
411 ddt_histogram_t *ddh;
412 ddt_stat_t *dds;
413 ddt_object_t *ddo;
414
415 ddh = kmem_zalloc(sizeof (ddt_histogram_t), KM_SLEEP);
416 ddt_get_dedup_histogram(spa, ddh);
417 VERIFY(nvlist_add_uint64_array(config,

--- 74 unchanged lines hidden ---
417 if (getstats && spa_load_state(spa) == SPA_LOAD_NONE) {
418 ddt_histogram_t *ddh;
419 ddt_stat_t *dds;
420 ddt_object_t *ddo;
421
422 ddh = kmem_zalloc(sizeof (ddt_histogram_t), KM_SLEEP);
423 ddt_get_dedup_histogram(spa, ddh);
424 VERIFY(nvlist_add_uint64_array(config,

--- 74 unchanged lines hidden ---