Print this page
2619 asynchronous destruction of ZFS file systems
2747 SPA versioning with zfs feature flags
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <gwilson@delphix.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Dan Kruchinin <dan.kruchinin@gmail.com>
Approved by: Dan McDonald <danmcd@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/spa_config.c
          +++ new/usr/src/uts/common/fs/zfs/spa_config.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  24   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   28  #include <sys/spa.h>
  29   29  #include <sys/spa_impl.h>
  30   30  #include <sys/nvpair.h>
  31   31  #include <sys/uio.h>
  32   32  #include <sys/fs/zfs.h>
  33   33  #include <sys/vdev_impl.h>
  34   34  #include <sys/zfs_ioctl.h>
  35   35  #include <sys/utsname.h>
  36   36  #include <sys/systeminfo.h>
  37   37  #include <sys/sunddi.h>
       38 +#include <sys/zfeature.h>
  38   39  #ifdef _KERNEL
  39   40  #include <sys/kobj.h>
  40   41  #include <sys/zone.h>
  41   42  #endif
  42   43  
  43   44  /*
  44   45   * Pool configuration repository.
  45   46   *
  46   47   * Pool configuration is stored as a packed nvlist on the filesystem.  By
  47   48   * default, all pools are stored in /etc/zfs/zpool.cache and loaded on boot
↓ open down ↓ 354 lines elided ↑ open up ↑
 402  403              nvlist_lookup_uint64(spa->spa_config_splitting,
 403  404              ZPOOL_CONFIG_SPLIT_GUID, &split_guid) == 0) {
 404  405                  VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_SPLIT_GUID,
 405  406                      split_guid) == 0);
 406  407          }
 407  408  
 408  409          nvroot = vdev_config_generate(spa, vd, getstats, 0);
 409  410          VERIFY(nvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot) == 0);
 410  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  419          if (getstats && spa_load_state(spa) == SPA_LOAD_NONE) {
 413  420                  ddt_histogram_t *ddh;
 414  421                  ddt_stat_t *dds;
 415  422                  ddt_object_t *ddo;
 416  423  
 417  424                  ddh = kmem_zalloc(sizeof (ddt_histogram_t), KM_SLEEP);
 418  425                  ddt_get_dedup_histogram(spa, ddh);
 419  426                  VERIFY(nvlist_add_uint64_array(config,
 420  427                      ZPOOL_CONFIG_DDT_HISTOGRAM,
 421  428                      (uint64_t *)ddh, sizeof (*ddh) / sizeof (uint64_t)) == 0);
↓ open down ↓ 72 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX