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/cmd/zdb/zdb.c
          +++ new/usr/src/cmd/zdb/zdb.c
↓ open down ↓ 521 lines elided ↑ open up ↑
 522  522                              "INVALID", "INVALID", "INVALID", "INVALID" };
 523  523  
 524  524          if (smo->smo_object == 0)
 525  525                  return;
 526  526  
 527  527          /*
 528  528           * Print out the freelist entries in both encoded and decoded form.
 529  529           */
 530  530          alloc = 0;
 531  531          for (offset = 0; offset < smo->smo_objsize; offset += sizeof (entry)) {
 532      -                VERIFY3U(0, ==, dmu_read(os, smo->smo_object, offset,
      532 +                VERIFY0(dmu_read(os, smo->smo_object, offset,
 533  533                      sizeof (entry), &entry, DMU_READ_PREFETCH));
 534  534                  if (SM_DEBUG_DECODE(entry)) {
 535  535                          (void) printf("\t    [%6llu] %s: txg %llu, pass %llu\n",
 536  536                              (u_longlong_t)(offset / sizeof (entry)),
 537  537                              ddata[SM_DEBUG_ACTION_DECODE(entry)],
 538  538                              (u_longlong_t)SM_DEBUG_TXG_DECODE(entry),
 539  539                              (u_longlong_t)SM_DEBUG_SYNCPASS_DECODE(entry));
 540  540                  } else {
 541  541                          (void) printf("\t    [%6llu]    %c  range:"
 542  542                              " %010llx-%010llx  size: %06llx\n",
↓ open down ↓ 638 lines elided ↑ open up ↑
1181 1181  static void
1182 1182  dump_bptree(objset_t *os, uint64_t obj, char *name)
1183 1183  {
1184 1184          char bytes[32];
1185 1185          bptree_phys_t *bt;
1186 1186          dmu_buf_t *db;
1187 1187  
1188 1188          if (dump_opt['d'] < 3)
1189 1189                  return;
1190 1190  
1191      -        VERIFY3U(0, ==, dmu_bonus_hold(os, obj, FTAG, &db));
     1191 +        VERIFY0(dmu_bonus_hold(os, obj, FTAG, &db));
1192 1192          bt = db->db_data;
1193 1193          zdb_nicenum(bt->bt_bytes, bytes);
1194 1194          (void) printf("\n    %s: %llu datasets, %s\n",
1195 1195              name, (unsigned long long)(bt->bt_end - bt->bt_begin), bytes);
1196 1196          dmu_buf_rele(db, FTAG);
1197 1197  
1198 1198          if (dump_opt['d'] < 5)
1199 1199                  return;
1200 1200  
1201 1201          (void) printf("\n");
↓ open down ↓ 1064 lines elided ↑ open up ↑
2266 2266  
2267 2267          /*
2268 2268           * If there's a deferred-free bplist, process that first.
2269 2269           */
2270 2270          (void) bpobj_iterate_nofree(&spa->spa_deferred_bpobj,
2271 2271              count_block_cb, &zcb, NULL);
2272 2272          (void) bpobj_iterate_nofree(&spa->spa_dsl_pool->dp_free_bpobj,
2273 2273              count_block_cb, &zcb, NULL);
2274 2274          if (spa_feature_is_active(spa,
2275 2275              &spa_feature_table[SPA_FEATURE_ASYNC_DESTROY])) {
2276      -                VERIFY3U(0, ==, bptree_iterate(spa->spa_meta_objset,
     2276 +                VERIFY0(bptree_iterate(spa->spa_meta_objset,
2277 2277                      spa->spa_dsl_pool->dp_bptree_obj, B_FALSE, count_block_cb,
2278 2278                      &zcb, NULL));
2279 2279          }
2280 2280  
2281 2281          if (dump_opt['c'] > 1)
2282 2282                  flags |= TRAVERSE_PREFETCH_DATA;
2283 2283  
2284 2284          zcb.zcb_haderrors |= traverse_pool(spa, 0, flags, zdb_blkptr_cb, &zcb);
2285 2285  
2286 2286          if (zcb.zcb_haderrors) {
↓ open down ↓ 964 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX