Print this page
4171 clean up spa_feature_*() interfaces
4172 implement extensible_dataset feature for use by other zpool features
Reviewed by: Max Grossman <max.grossman@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/dsl_dir.c
          +++ new/usr/src/uts/common/fs/zfs/dsl_dir.c
↓ open down ↓ 24 lines elided ↑ open up ↑
  25   25   */
  26   26  
  27   27  #include <sys/dmu.h>
  28   28  #include <sys/dmu_objset.h>
  29   29  #include <sys/dmu_tx.h>
  30   30  #include <sys/dsl_dataset.h>
  31   31  #include <sys/dsl_dir.h>
  32   32  #include <sys/dsl_prop.h>
  33   33  #include <sys/dsl_synctask.h>
  34   34  #include <sys/dsl_deleg.h>
       35 +#include <sys/dmu_impl.h>
  35   36  #include <sys/spa.h>
  36   37  #include <sys/metaslab.h>
  37   38  #include <sys/zap.h>
  38   39  #include <sys/zio.h>
  39   40  #include <sys/arc.h>
  40   41  #include <sys/sunddi.h>
  41   42  #include "zfs_namecheck.h"
  42   43  
  43   44  static uint64_t dsl_dir_space_towrite(dsl_dir_t *dd);
  44   45  
↓ open down ↓ 36 lines elided ↑ open up ↑
  81   82          ASSERT(dsl_pool_config_held(dp));
  82   83  
  83   84          err = dmu_bonus_hold(dp->dp_meta_objset, ddobj, tag, &dbuf);
  84   85          if (err != 0)
  85   86                  return (err);
  86   87          dd = dmu_buf_get_user(dbuf);
  87   88  #ifdef ZFS_DEBUG
  88   89          {
  89   90                  dmu_object_info_t doi;
  90   91                  dmu_object_info_from_db(dbuf, &doi);
  91      -                ASSERT3U(doi.doi_type, ==, DMU_OT_DSL_DIR);
       92 +                ASSERT3U(doi.doi_bonus_type, ==, DMU_OT_DSL_DIR);
  92   93                  ASSERT3U(doi.doi_bonus_size, >=, sizeof (dsl_dir_phys_t));
  93   94          }
  94   95  #endif
  95   96          if (dd == NULL) {
  96   97                  dsl_dir_t *winner;
  97   98  
  98   99                  dd = kmem_zalloc(sizeof (dsl_dir_t), KM_SLEEP);
  99  100                  dd->dd_object = ddobj;
 100  101                  dd->dd_dbuf = dbuf;
 101  102                  dd->dd_pool = dp;
↓ open down ↓ 1242 lines elided ↑ open up ↑
1344 1345  
1345 1346  void
1346 1347  dsl_dir_snap_cmtime_update(dsl_dir_t *dd)
1347 1348  {
1348 1349          timestruc_t t;
1349 1350  
1350 1351          gethrestime(&t);
1351 1352          mutex_enter(&dd->dd_lock);
1352 1353          dd->dd_snap_cmtime = t;
1353 1354          mutex_exit(&dd->dd_lock);
     1355 +}
     1356 +
     1357 +void
     1358 +dsl_dir_zapify(dsl_dir_t *dd, dmu_tx_t *tx)
     1359 +{
     1360 +        objset_t *mos = dd->dd_pool->dp_meta_objset;
     1361 +        dmu_object_zapify(mos, dd->dd_object, DMU_OT_DSL_DIR, tx);
1354 1362  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX