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>
        
*** 16,25 ****
--- 16,26 ----
   * fields enclosed by brackets "[]" replaced with your own identifying
   * information: Portions Copyright [yyyy] [name of copyright owner]
   *
   * CDDL HEADER END
   */
+ 
  /*
   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
   * Portions Copyright 2011 Martin Matuska
   * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
   * Copyright (c) 2012 by Delphix. All rights reserved.
*** 1132,1141 ****
--- 1133,1144 ----
  }
  
  /*
   * Find a zfsvfs_t for a mounted filesystem, or create our own, in which
   * case its z_vfs will be NULL, and it will be opened as the owner.
+  * If 'writer' is set, the z_teardown_lock will be held for RW_WRITER,
+  * which prevents all vnode ops from running.
   */
  static int
  zfsvfs_hold(const char *name, void *tag, zfsvfs_t **zfvp, boolean_t writer)
  {
          int error = 0;
*** 1195,1205 ****
                  nvlist_t *nvl = NULL;
                  uint64_t version = SPA_VERSION;
  
                  (void) nvlist_lookup_uint64(props,
                      zpool_prop_to_name(ZPOOL_PROP_VERSION), &version);
!                 if (version < SPA_VERSION_INITIAL || version > SPA_VERSION) {
                          error = EINVAL;
                          goto pool_props_bad;
                  }
                  (void) nvlist_lookup_nvlist(props, ZPOOL_ROOTFS_PROPS, &nvl);
                  if (nvl) {
--- 1198,1208 ----
                  nvlist_t *nvl = NULL;
                  uint64_t version = SPA_VERSION;
  
                  (void) nvlist_lookup_uint64(props,
                      zpool_prop_to_name(ZPOOL_PROP_VERSION), &version);
!                 if (!SPA_VERSION_IS_SUPPORTED(version)) {
                          error = EINVAL;
                          goto pool_props_bad;
                  }
                  (void) nvlist_lookup_nvlist(props, ZPOOL_ROOTFS_PROPS, &nvl);
                  if (nvl) {
*** 1319,1328 ****
--- 1322,1340 ----
          nvlist_free(configs);
  
          return (error);
  }
  
+ /*
+  * inputs:
+  * zc_name              name of the pool
+  *
+  * outputs:
+  * zc_cookie            real errno
+  * zc_nvlist_dst        config nvlist
+  * zc_nvlist_dst_size   size of config nvlist
+  */
  static int
  zfs_ioc_pool_stats(zfs_cmd_t *zc)
  {
          nvlist_t *config;
          int error;
*** 1420,1430 ****
          int error;
  
          if ((error = spa_open(zc->zc_name, &spa, FTAG)) != 0)
                  return (error);
  
!         if (zc->zc_cookie < spa_version(spa) || zc->zc_cookie > SPA_VERSION) {
                  spa_close(spa, FTAG);
                  return (EINVAL);
          }
  
          spa_upgrade(spa, zc->zc_cookie);
--- 1432,1443 ----
          int error;
  
          if ((error = spa_open(zc->zc_name, &spa, FTAG)) != 0)
                  return (error);
  
!         if (zc->zc_cookie < spa_version(spa) ||
!             !SPA_VERSION_IS_SUPPORTED(zc->zc_cookie)) {
                  spa_close(spa, FTAG);
                  return (EINVAL);
          }
  
          spa_upgrade(spa, zc->zc_cookie);