Print this page
3739 cannot set zfs quota or reservation on pool version < 22

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/dsl_prop.c
          +++ new/usr/src/uts/common/fs/zfs/dsl_prop.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  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) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright (c) 2013 by Delphix. All rights reserved.
       24 + * Copyright (c) 2013 Martin Matuska. All rights reserved.
  24   25   */
  25   26  
  26   27  #include <sys/zfs_context.h>
  27   28  #include <sys/dmu.h>
  28   29  #include <sys/dmu_objset.h>
  29   30  #include <sys/dmu_tx.h>
  30   31  #include <sys/dsl_dataset.h>
  31   32  #include <sys/dsl_dir.h>
  32   33  #include <sys/dsl_prop.h>
  33   34  #include <sys/dsl_synctask.h>
↓ open down ↓ 516 lines elided ↑ open up ↑
 550  551                          ds->ds_phys->ds_props_obj =
 551  552                              zap_create(mos,
 552  553                              DMU_OT_DSL_PROPS, DMU_OT_NONE, 0, tx);
 553  554                  }
 554  555                  zapobj = ds->ds_phys->ds_props_obj;
 555  556          } else {
 556  557                  zapobj = ds->ds_dir->dd_phys->dd_props_zapobj;
 557  558          }
 558  559  
 559  560          if (version < SPA_VERSION_RECVD_PROPS) {
 560      -                zfs_prop_t prop = zfs_name_to_prop(propname);
 561      -                if (prop == ZFS_PROP_QUOTA || prop == ZFS_PROP_RESERVATION)
 562      -                        return;
 563      -
 564  561                  if (source & ZPROP_SRC_NONE)
 565  562                          source = ZPROP_SRC_NONE;
 566  563                  else if (source & ZPROP_SRC_RECEIVED)
 567  564                          source = ZPROP_SRC_LOCAL;
 568  565          }
 569  566  
 570  567          inheritstr = kmem_asprintf("%s%s", propname, ZPROP_INHERIT_SUFFIX);
 571  568          recvdstr = kmem_asprintf("%s%s", propname, ZPROP_RECVD_SUFFIX);
 572  569  
 573  570          switch (source) {
↓ open down ↓ 556 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX