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/zio.c
          +++ new/usr/src/uts/common/fs/zfs/zio.c
↓ open down ↓ 2130 lines elided ↑ open up ↑
2131 2131          blkptr_t *bp = zio->io_bp;
2132 2132          int error;
2133 2133          int flags = 0;
2134 2134  
2135 2135          if (zio->io_gang_leader == NULL) {
2136 2136                  ASSERT(zio->io_child_type > ZIO_CHILD_GANG);
2137 2137                  zio->io_gang_leader = zio;
2138 2138          }
2139 2139  
2140 2140          ASSERT(BP_IS_HOLE(bp));
2141      -        ASSERT3U(BP_GET_NDVAS(bp), ==, 0);
     2141 +        ASSERT0(BP_GET_NDVAS(bp));
2142 2142          ASSERT3U(zio->io_prop.zp_copies, >, 0);
2143 2143          ASSERT3U(zio->io_prop.zp_copies, <=, spa_max_replication(spa));
2144 2144          ASSERT3U(zio->io_size, ==, BP_GET_PSIZE(bp));
2145 2145  
2146 2146          /*
2147 2147           * The dump device does not support gang blocks so allocation on
2148 2148           * behalf of the dump device (i.e. ZIO_FLAG_NODATA) must avoid
2149 2149           * the "fast" gang feature.
2150 2150           */
2151 2151          flags |= (zio->io_flags & ZIO_FLAG_NODATA) ? METASLAB_GANG_AVOID : 0;
↓ open down ↓ 882 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX