Print this page
3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument is zero

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/dsl_synctask.c
          +++ new/usr/src/uts/common/fs/zfs/dsl_synctask.c
↓ open down ↓ 155 lines elided ↑ open up ↑
 156  156          kmem_free(dstg, sizeof (dsl_sync_task_group_t));
 157  157  }
 158  158  
 159  159  void
 160  160  dsl_sync_task_group_sync(dsl_sync_task_group_t *dstg, dmu_tx_t *tx)
 161  161  {
 162  162          dsl_sync_task_t *dst;
 163  163          dsl_pool_t *dp = dstg->dstg_pool;
 164  164          uint64_t quota, used;
 165  165  
 166      -        ASSERT3U(dstg->dstg_err, ==, 0);
      166 +        ASSERT0(dstg->dstg_err);
 167  167  
 168  168          /*
 169  169           * Check for sufficient space.  We just check against what's
 170  170           * on-disk; we don't want any in-flight accounting to get in our
 171  171           * way, because open context may have already used up various
 172  172           * in-core limits (arc_tempreserve, dsl_pool_tempreserve).
 173  173           */
 174  174          quota = dsl_pool_adjustedsize(dp, B_FALSE) -
 175  175              metaslab_class_get_deferred(spa_normal_class(dp->dp_spa));
 176  176          used = dp->dp_root_dir->dd_phys->dd_used_bytes;
↓ open down ↓ 66 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX