Print this page
3742 zfs comments need cleaner, more consistent style
Submitted by:   Will Andrews <willa@spectralogic.com>
Submitted by:   Alan Somers <alans@spectralogic.com>
Reviewed by:    Matthew Ahrens <mahrens@delphix.com>
Reviewed by:    George Wilson <george.wilson@delphix.com>
Reviewed by:    Eric Schrock <eric.schrock@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/zfs_ioctl.c
          +++ new/usr/src/uts/common/fs/zfs/zfs_ioctl.c
↓ open down ↓ 315 lines elided ↑ open up ↑
 316  316          if (dmu_objset_hold(name, FTAG, &os) == 0) {
 317  317                  boolean_t ret;
 318  318                  ret = (dmu_objset_id(os) == spa_bootfs(dmu_objset_spa(os)));
 319  319                  dmu_objset_rele(os, FTAG);
 320  320                  return (ret);
 321  321          }
 322  322          return (B_FALSE);
 323  323  }
 324  324  
 325  325  /*
 326      - * zfs_earlier_version
 327      - *
 328      - *      Return non-zero if the spa version is less than requested version.
      326 + * Return non-zero if the spa version is less than requested version.
 329  327   */
 330  328  static int
 331  329  zfs_earlier_version(const char *name, int version)
 332  330  {
 333  331          spa_t *spa;
 334  332  
 335  333          if (spa_open(name, &spa, FTAG) == 0) {
 336  334                  if (spa_version(spa) < version) {
 337  335                          spa_close(spa, FTAG);
 338  336                          return (1);
 339  337                  }
 340  338                  spa_close(spa, FTAG);
 341  339          }
 342  340          return (0);
 343  341  }
 344  342  
 345  343  /*
 346      - * zpl_earlier_version
 347      - *
 348  344   * Return TRUE if the ZPL version is less than requested version.
 349  345   */
 350  346  static boolean_t
 351  347  zpl_earlier_version(const char *name, int version)
 352  348  {
 353  349          objset_t *os;
 354  350          boolean_t rc = B_TRUE;
 355  351  
 356  352          if (dmu_objset_hold(name, FTAG, &os) == 0) {
 357  353                  uint64_t zplversion;
↓ open down ↓ 2590 lines elided ↑ open up ↑
2948 2944  {
2949 2945          zfs_creat_t *zct = arg;
2950 2946  
2951 2947          zfs_create_fs(os, cr, zct->zct_zplprops, tx);
2952 2948  }
2953 2949  
2954 2950  #define ZFS_PROP_UNDEFINED      ((uint64_t)-1)
2955 2951  
2956 2952  /*
2957 2953   * inputs:
2958      - * createprops          list of properties requested by creator
2959      - * default_zplver       zpl version to use if unspecified in createprops
2960      - * fuids_ok             fuids allowed in this version of the spa?
2961 2954   * os                   parent objset pointer (NULL if root fs)
     2955 + * fuids_ok             fuids allowed in this version of the spa?
     2956 + * sa_ok                SAs allowed in this version of the spa?
     2957 + * createprops          list of properties requested by creator
2962 2958   *
2963 2959   * outputs:
2964 2960   * zplprops     values for the zplprops we attach to the master node object
2965 2961   * is_ci        true if requested file system will be purely case-insensitive
2966 2962   *
2967 2963   * Determine the settings for utf8only, normalization and
2968 2964   * casesensitivity.  Specific values may have been requested by the
2969 2965   * creator and/or we can inherit values from the parent dataset.  If
2970 2966   * the file system is of too early a vintage, a creator can not
2971 2967   * request settings for these properties, even if the requested
↓ open down ↓ 2947 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX