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/dmu_tx.c
          +++ new/usr/src/uts/common/fs/zfs/dmu_tx.c
↓ open down ↓ 891 lines elided ↑ open up ↑
 892  892  #endif
 893  893  
 894  894  static int
 895  895  dmu_tx_try_assign(dmu_tx_t *tx, uint64_t txg_how)
 896  896  {
 897  897          dmu_tx_hold_t *txh;
 898  898          spa_t *spa = tx->tx_pool->dp_spa;
 899  899          uint64_t memory, asize, fsize, usize;
 900  900          uint64_t towrite, tofree, tooverwrite, tounref, tohold, fudge;
 901  901  
 902      -        ASSERT3U(tx->tx_txg, ==, 0);
      902 +        ASSERT0(tx->tx_txg);
 903  903  
 904  904          if (tx->tx_err)
 905  905                  return (tx->tx_err);
 906  906  
 907  907          if (spa_suspended(spa)) {
 908  908                  /*
 909  909                   * If the user has indicated a blocking failure mode
 910  910                   * then return ERESTART which will block in dmu_tx_wait().
 911  911                   * Otherwise, return EIO so that an error can get
 912  912                   * propagated back to the VOP calls.
↓ open down ↓ 473 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX