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/metaslab.c
          +++ new/usr/src/uts/common/fs/zfs/metaslab.c
↓ open down ↓ 761 lines elided ↑ open up ↑
 762  762          space_map_destroy(&msp->ms_map);
 763  763  
 764  764          for (int t = 0; t < TXG_SIZE; t++) {
 765  765                  space_map_destroy(&msp->ms_allocmap[t]);
 766  766                  space_map_destroy(&msp->ms_freemap[t]);
 767  767          }
 768  768  
 769  769          for (int t = 0; t < TXG_DEFER_SIZE; t++)
 770  770                  space_map_destroy(&msp->ms_defermap[t]);
 771  771  
 772      -        ASSERT3S(msp->ms_deferspace, ==, 0);
      772 +        ASSERT0(msp->ms_deferspace);
 773  773  
 774  774          mutex_exit(&msp->ms_lock);
 775  775          mutex_destroy(&msp->ms_lock);
 776  776  
 777  777          kmem_free(msp, sizeof (metaslab_t));
 778  778  }
 779  779  
 780  780  #define METASLAB_WEIGHT_PRIMARY         (1ULL << 63)
 781  781  #define METASLAB_WEIGHT_SECONDARY       (1ULL << 62)
 782  782  #define METASLAB_ACTIVE_MASK            \
↓ open down ↓ 873 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX