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/dsl_deleg.c
          +++ new/usr/src/uts/common/fs/zfs/dsl_deleg.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  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   * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23      - * Copyright (c) 2011 by Delphix. All rights reserved.
       23 + * Copyright (c) 2012 by Delphix. All rights reserved.
  24   24   */
  25   25  
  26   26  /*
  27   27   * DSL permissions are stored in a two level zap attribute
  28   28   * mechanism.   The first level identifies the "class" of
  29   29   * entry.  The class is identified by the first 2 letters of
  30   30   * the attribute.  The second letter "l" or "d" identifies whether
  31   31   * it is a local or descendent permission.  The first letter
  32   32   * identifies the type of entry.
  33   33   *
↓ open down ↓ 130 lines elided ↑ open up ↑
 164  164  
 165  165          while (whopair = nvlist_next_nvpair(nvp, whopair)) {
 166  166                  const char *whokey = nvpair_name(whopair);
 167  167                  nvlist_t *perms;
 168  168                  nvpair_t *permpair = NULL;
 169  169                  uint64_t jumpobj;
 170  170  
 171  171                  VERIFY(nvpair_value_nvlist(whopair, &perms) == 0);
 172  172  
 173  173                  if (zap_lookup(mos, zapobj, whokey, 8, 1, &jumpobj) != 0) {
 174      -                        jumpobj = zap_create(mos, DMU_OT_DSL_PERMS,
 175      -                            DMU_OT_NONE, 0, tx);
 176      -                        VERIFY(zap_update(mos, zapobj,
 177      -                            whokey, 8, 1, &jumpobj, tx) == 0);
      174 +                        jumpobj = zap_create_link(mos, DMU_OT_DSL_PERMS,
      175 +                            zapobj, whokey, tx);
 178  176                  }
 179  177  
 180  178                  while (permpair = nvlist_next_nvpair(perms, permpair)) {
 181  179                          const char *perm = nvpair_name(permpair);
 182  180                          uint64_t n = 0;
 183  181  
 184  182                          VERIFY(zap_update(mos, jumpobj,
 185  183                              perm, 8, 1, &n, tx) == 0);
 186  184                          spa_history_log_internal(LOG_DS_PERM_UPDATE,
 187  185                              dd->dd_pool->dp_spa, tx,
↓ open down ↓ 562 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX