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

@@ -840,11 +840,11 @@
                             (u_longlong_t)ds->ds_object);
                 }
         } else if (zap_lookup_int_key(dp->dp_meta_objset,
             scn->scn_phys.scn_queue_obj, ds->ds_object, &mintxg) == 0) {
                 ASSERT3U(ds->ds_phys->ds_num_children, <=, 1);
-                VERIFY3U(0, ==, zap_remove_int(dp->dp_meta_objset,
+                VERIFY0(zap_remove_int(dp->dp_meta_objset,
                     scn->scn_phys.scn_queue_obj, ds->ds_object, tx));
                 if (dsl_dataset_is_snapshot(ds)) {
                         /*
                          * We keep the same mintxg; it could be >
                          * ds_creation_txg if the previous snapshot was

@@ -892,11 +892,11 @@
                     "reset zb_objset to %llu",
                     (u_longlong_t)ds->ds_object,
                     (u_longlong_t)ds->ds_phys->ds_prev_snap_obj);
         } else if (zap_lookup_int_key(dp->dp_meta_objset,
             scn->scn_phys.scn_queue_obj, ds->ds_object, &mintxg) == 0) {
-                VERIFY3U(0, ==, zap_remove_int(dp->dp_meta_objset,
+                VERIFY0(zap_remove_int(dp->dp_meta_objset,
                     scn->scn_phys.scn_queue_obj, ds->ds_object, tx));
                 VERIFY(zap_add_int_key(dp->dp_meta_objset,
                     scn->scn_phys.scn_queue_obj,
                     ds->ds_phys->ds_prev_snap_obj, mintxg, tx) == 0);
                 zfs_dbgmsg("snapshotting ds %llu; in queue; "

@@ -935,11 +935,11 @@
             ds1->ds_object, &mintxg) == 0) {
                 int err;
 
                 ASSERT3U(mintxg, ==, ds1->ds_phys->ds_prev_snap_txg);
                 ASSERT3U(mintxg, ==, ds2->ds_phys->ds_prev_snap_txg);
-                VERIFY3U(0, ==, zap_remove_int(dp->dp_meta_objset,
+                VERIFY0(zap_remove_int(dp->dp_meta_objset,
                     scn->scn_phys.scn_queue_obj, ds1->ds_object, tx));
                 err = zap_add_int_key(dp->dp_meta_objset,
                     scn->scn_phys.scn_queue_obj, ds2->ds_object, mintxg, tx);
                 VERIFY(err == 0 || err == EEXIST);
                 if (err == EEXIST) {

@@ -954,11 +954,11 @@
                     (u_longlong_t)ds2->ds_object);
         } else if (zap_lookup_int_key(dp->dp_meta_objset,
             scn->scn_phys.scn_queue_obj, ds2->ds_object, &mintxg) == 0) {
                 ASSERT3U(mintxg, ==, ds1->ds_phys->ds_prev_snap_txg);
                 ASSERT3U(mintxg, ==, ds2->ds_phys->ds_prev_snap_txg);
-                VERIFY3U(0, ==, zap_remove_int(dp->dp_meta_objset,
+                VERIFY0(zap_remove_int(dp->dp_meta_objset,
                     scn->scn_phys.scn_queue_obj, ds2->ds_object, tx));
                 VERIFY(0 == zap_add_int_key(dp->dp_meta_objset,
                     scn->scn_phys.scn_queue_obj, ds1->ds_object, mintxg, tx));
                 zfs_dbgmsg("clone_swap ds %llu; in queue; "
                     "replacing with %llu",

@@ -1012,11 +1012,11 @@
 {
         dsl_pool_t *dp = scn->scn_dp;
         dsl_dataset_t *ds;
         objset_t *os;
 
-        VERIFY3U(0, ==, dsl_dataset_hold_obj(dp, dsobj, FTAG, &ds));
+        VERIFY0(dsl_dataset_hold_obj(dp, dsobj, FTAG, &ds));
 
         if (dmu_objset_from_ds(ds, &os))
                 goto out;
 
         /*

@@ -1306,15 +1306,15 @@
             zap_cursor_retrieve(&zc, &za) == 0) {
                 dsl_dataset_t *ds;
                 uint64_t dsobj;
 
                 dsobj = strtonum(za.za_name, NULL);
-                VERIFY3U(0, ==, zap_remove_int(dp->dp_meta_objset,
+                VERIFY0(zap_remove_int(dp->dp_meta_objset,
                     scn->scn_phys.scn_queue_obj, dsobj, tx));
 
                 /* Set up min/max txg */
-                VERIFY3U(0, ==, dsl_dataset_hold_obj(dp, dsobj, FTAG, &ds));
+                VERIFY0(dsl_dataset_hold_obj(dp, dsobj, FTAG, &ds));
                 if (za.za_first_integer != 0) {
                         scn->scn_phys.scn_cur_min_txg =
                             MAX(scn->scn_phys.scn_min_txg,
                             za.za_first_integer);
                 } else {

@@ -1432,33 +1432,33 @@
                 scn->scn_is_bptree = B_FALSE;
                 scn->scn_zio_root = zio_root(dp->dp_spa, NULL,
                     NULL, ZIO_FLAG_MUSTSUCCEED);
                 err = bpobj_iterate(&dp->dp_free_bpobj,
                     dsl_scan_free_block_cb, scn, tx);
-                VERIFY3U(0, ==, zio_wait(scn->scn_zio_root));
+                VERIFY0(zio_wait(scn->scn_zio_root));
 
                 if (err == 0 && spa_feature_is_active(spa,
                     &spa_feature_table[SPA_FEATURE_ASYNC_DESTROY])) {
                         scn->scn_is_bptree = B_TRUE;
                         scn->scn_zio_root = zio_root(dp->dp_spa, NULL,
                             NULL, ZIO_FLAG_MUSTSUCCEED);
                         err = bptree_iterate(dp->dp_meta_objset,
                             dp->dp_bptree_obj, B_TRUE, dsl_scan_free_block_cb,
                             scn, tx);
-                        VERIFY3U(0, ==, zio_wait(scn->scn_zio_root));
+                        VERIFY0(zio_wait(scn->scn_zio_root));
                         if (err != 0)
                                 return;
 
                         /* disable async destroy feature */
                         spa_feature_decr(spa,
                             &spa_feature_table[SPA_FEATURE_ASYNC_DESTROY], tx);
                         ASSERT(!spa_feature_is_active(spa,
                             &spa_feature_table[SPA_FEATURE_ASYNC_DESTROY]));
-                        VERIFY3U(0, ==, zap_remove(dp->dp_meta_objset,
+                        VERIFY0(zap_remove(dp->dp_meta_objset,
                             DMU_POOL_DIRECTORY_OBJECT,
                             DMU_POOL_BPTREE_OBJ, tx));
-                        VERIFY3U(0, ==, bptree_free(dp->dp_meta_objset,
+                        VERIFY0(bptree_free(dp->dp_meta_objset,
                             dp->dp_bptree_obj, tx));
                         dp->dp_bptree_obj = 0;
                 }
                 if (scn->scn_visited_this_txg) {
                         zfs_dbgmsg("freed %llu blocks in %llums from "