--- old/usr/src/cmd/zdb/Makefile.com	Wed Jul 18 15:48:17 2012
+++ new/usr/src/cmd/zdb/Makefile.com	Wed Jul 18 15:48:17 2012
@@ -23,6 +23,8 @@
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# Copyright (c) 2012 by Delphix. All rights reserved.
+#
 
 PROG:sh=	cd ..; basename `pwd`
 SRCS= ../$(PROG).c ../zdb_il.c
@@ -42,11 +44,11 @@
 
 CFLAGS += $(CCVERBOSE)
 CFLAGS64 += $(CCVERBOSE)
-CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS)
+CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS) -DDEBUG
 
 # lint complains about unused _umem_* functions
-LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2 
-LINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2  
+LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
+LINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2
 
 .KEEP_STATE:
 
--- old/usr/src/cmd/zdb/zdb.c	Wed Jul 18 15:48:18 2012
+++ new/usr/src/cmd/zdb/zdb.c	Wed Jul 18 15:48:17 2012
@@ -529,7 +529,7 @@
 	 */
 	alloc = 0;
 	for (offset = 0; offset < smo->smo_objsize; offset += sizeof (entry)) {
-		VERIFY3U(0, ==, dmu_read(os, smo->smo_object, offset,
+		VERIFY0(dmu_read(os, smo->smo_object, offset,
 		    sizeof (entry), &entry, DMU_READ_PREFETCH));
 		if (SM_DEBUG_DECODE(entry)) {
 			(void) printf("\t    [%6llu] %s: txg %llu, pass %llu\n",
@@ -1188,7 +1188,7 @@
 	if (dump_opt['d'] < 3)
 		return;
 
-	VERIFY3U(0, ==, dmu_bonus_hold(os, obj, FTAG, &db));
+	VERIFY0(dmu_bonus_hold(os, obj, FTAG, &db));
 	bt = db->db_data;
 	zdb_nicenum(bt->bt_bytes, bytes);
 	(void) printf("\n    %s: %llu datasets, %s\n",
@@ -2273,7 +2273,7 @@
 	    count_block_cb, &zcb, NULL);
 	if (spa_feature_is_active(spa,
 	    &spa_feature_table[SPA_FEATURE_ASYNC_DESTROY])) {
-		VERIFY3U(0, ==, bptree_iterate(spa->spa_meta_objset,
+		VERIFY0(bptree_iterate(spa->spa_meta_objset,
 		    spa->spa_dsl_pool->dp_bptree_obj, B_FALSE, count_block_cb,
 		    &zcb, NULL));
 	}
--- old/usr/src/cmd/zhack/Makefile.com	Wed Jul 18 15:48:19 2012
+++ new/usr/src/cmd/zhack/Makefile.com	Wed Jul 18 15:48:18 2012
@@ -46,7 +46,7 @@
 
 CFLAGS += $(CCVERBOSE)
 CFLAGS64 += $(CCVERBOSE)
-CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS)
+CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT -DDEBUG $(INCS)
 
 .KEEP_STATE:
 
--- old/usr/src/cmd/zhack/zhack.c	Wed Jul 18 15:48:20 2012
+++ new/usr/src/cmd/zhack/zhack.c	Wed Jul 18 15:48:19 2012
@@ -344,7 +344,7 @@
 	if (0 == zap_contains(mos, spa->spa_feat_desc_obj, feature.fi_guid))
 		fatal("feature already enabled: %s", feature.fi_guid);
 
-	VERIFY3U(0, ==, dsl_sync_task_do(spa->spa_dsl_pool, NULL,
+	VERIFY0(dsl_sync_task_do(spa->spa_dsl_pool, NULL,
 	    feature_enable_sync, spa, &feature, 5));
 
 	spa_close(spa, FTAG);
@@ -442,7 +442,7 @@
 	if (decr && !spa_feature_is_active(spa, &feature))
 		fatal("feature refcount already 0: %s", feature.fi_guid);
 
-	VERIFY3U(0, ==, dsl_sync_task_do(spa->spa_dsl_pool, NULL,
+	VERIFY0(dsl_sync_task_do(spa->spa_dsl_pool, NULL,
 	    decr ? feature_decr_sync : feature_incr_sync, spa, &feature, 5));
 
 	spa_close(spa, FTAG);
--- old/usr/src/cmd/ztest/Makefile.com	Wed Jul 18 15:48:20 2012
+++ new/usr/src/cmd/ztest/Makefile.com	Wed Jul 18 15:48:20 2012
@@ -40,11 +40,11 @@
 C99LMODE= -Xc99=%all
 CFLAGS += -g $(CCVERBOSE)
 CFLAGS64 += -g $(CCVERBOSE)
-CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS)
+CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS) -DDEBUG
 
 # lint complains about unused _umem_* functions
-LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2 
-LINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2  
+LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
+LINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2
 
 .KEEP_STATE:
 
--- old/usr/src/cmd/ztest/ztest.c	Wed Jul 18 15:48:21 2012
+++ new/usr/src/cmd/ztest/ztest.c	Wed Jul 18 15:48:21 2012
@@ -972,7 +972,7 @@
 		ztest_record_enospc(FTAG);
 		return (error);
 	}
-	ASSERT3U(error, ==, 0);
+	ASSERT0(error);
 
 	VERIFY3U(dsl_prop_get(osname, propname, sizeof (curval),
 	    1, &curval, setpoint), ==, 0);
@@ -1004,7 +1004,7 @@
 		ztest_record_enospc(FTAG);
 		return (error);
 	}
-	ASSERT3U(error, ==, 0);
+	ASSERT0(error);
 
 	return (error);
 }
@@ -1412,16 +1412,16 @@
 	ASSERT(lr->lr_foid != 0);
 
 	if (lr->lrz_type != DMU_OT_ZAP_OTHER)
-		VERIFY3U(0, ==, dmu_object_set_blocksize(os, lr->lr_foid,
+		VERIFY0(dmu_object_set_blocksize(os, lr->lr_foid,
 		    lr->lrz_blocksize, lr->lrz_ibshift, tx));
 
-	VERIFY3U(0, ==, dmu_bonus_hold(os, lr->lr_foid, FTAG, &db));
+	VERIFY0(dmu_bonus_hold(os, lr->lr_foid, FTAG, &db));
 	bbt = ztest_bt_bonus(db);
 	dmu_buf_will_dirty(db, tx);
 	ztest_bt_generate(bbt, os, lr->lr_foid, -1ULL, lr->lr_gen, txg, txg);
 	dmu_buf_rele(db, FTAG);
 
-	VERIFY3U(0, ==, zap_add(os, lr->lr_doid, name, sizeof (uint64_t), 1,
+	VERIFY0(zap_add(os, lr->lr_doid, name, sizeof (uint64_t), 1,
 	    &lr->lr_foid, tx));
 
 	(void) ztest_log_create(zd, tx, lr);
@@ -1446,13 +1446,13 @@
 	ASSERT(lr->lr_doid == ZTEST_DIROBJ);
 	ASSERT(name[0] != '\0');
 
-	VERIFY3U(0, ==,
+	VERIFY0(
 	    zap_lookup(os, lr->lr_doid, name, sizeof (object), 1, &object));
 	ASSERT(object != 0);
 
 	ztest_object_lock(zd, object, RL_WRITER);
 
-	VERIFY3U(0, ==, dmu_object_info(os, object, &doi));
+	VERIFY0(dmu_object_info(os, object, &doi));
 
 	tx = dmu_tx_create(os);
 
@@ -1466,12 +1466,12 @@
 	}
 
 	if (doi.doi_type == DMU_OT_ZAP_OTHER) {
-		VERIFY3U(0, ==, zap_destroy(os, object, tx));
+		VERIFY0(zap_destroy(os, object, tx));
 	} else {
-		VERIFY3U(0, ==, dmu_object_free(os, object, tx));
+		VERIFY0(dmu_object_free(os, object, tx));
 	}
 
-	VERIFY3U(0, ==, zap_remove(os, lr->lr_doid, name, tx));
+	VERIFY0(zap_remove(os, lr->lr_doid, name, tx));
 
 	(void) ztest_log_remove(zd, tx, lr, object);
 
@@ -1521,7 +1521,7 @@
 	ztest_object_lock(zd, lr->lr_foid, RL_READER);
 	rl = ztest_range_lock(zd, lr->lr_foid, offset, length, RL_WRITER);
 
-	VERIFY3U(0, ==, dmu_bonus_hold(os, lr->lr_foid, FTAG, &db));
+	VERIFY0(dmu_bonus_hold(os, lr->lr_foid, FTAG, &db));
 
 	dmu_object_info_from_db(db, &doi);
 
@@ -1660,7 +1660,7 @@
 
 	ztest_object_lock(zd, lr->lr_foid, RL_WRITER);
 
-	VERIFY3U(0, ==, dmu_bonus_hold(os, lr->lr_foid, FTAG, &db));
+	VERIFY0(dmu_bonus_hold(os, lr->lr_foid, FTAG, &db));
 
 	tx = dmu_tx_create(os);
 	dmu_tx_hold_bonus(tx, lr->lr_foid);
@@ -1701,7 +1701,7 @@
 
 	ASSERT3U(lr->lr_size, >=, sizeof (*bbt));
 	ASSERT3U(lr->lr_size, <=, db->db_size);
-	VERIFY3U(dmu_set_bonus(db, lr->lr_size, tx), ==, 0);
+	VERIFY0(dmu_set_bonus(db, lr->lr_size, tx));
 	bbt = ztest_bt_bonus(db);
 
 	ztest_bt_generate(bbt, os, lr->lr_foid, -1ULL, lr->lr_mode, txg, crtxg);
@@ -1893,7 +1893,7 @@
 			ASSERT(missing == 0);	/* there should be no gaps */
 
 			ztest_object_lock(zd, od->od_object, RL_READER);
-			VERIFY3U(0, ==, dmu_bonus_hold(zd->zd_os,
+			VERIFY0(dmu_bonus_hold(zd->zd_os,
 			    od->od_object, FTAG, &db));
 			dmu_object_info_from_db(db, &doi);
 			bbt = ztest_bt_bonus(db);
@@ -2271,7 +2271,7 @@
 	nvroot = make_vdev_root("/dev/bogus", NULL, 0, 0, 0, 0, 0, 1);
 	VERIFY3U(EEXIST, ==, spa_create(zo->zo_pool, nvroot, NULL, NULL));
 	nvlist_free(nvroot);
-	VERIFY3U(0, ==, spa_open(zo->zo_pool, &spa, FTAG));
+	VERIFY0(spa_open(zo->zo_pool, &spa, FTAG));
 	VERIFY3U(EBUSY, ==, spa_destroy(zo->zo_pool));
 	spa_close(spa, FTAG);
 
@@ -3030,11 +3030,11 @@
 	/*
 	 * Verify that the dataset contains a directory object.
 	 */
-	VERIFY3U(0, ==, dmu_objset_hold(name, FTAG, &os));
+	VERIFY0(dmu_objset_hold(name, FTAG, &os));
 	error = dmu_object_info(os, ZTEST_DIROBJ, &doi);
 	if (error != ENOENT) {
 		/* We could have crashed in the middle of destroying it */
-		ASSERT3U(error, ==, 0);
+		ASSERT0(error);
 		ASSERT3U(doi.doi_type, ==, DMU_OT_ZAP_OTHER);
 		ASSERT3S(doi.doi_physical_blocks_512, >=, 0);
 	}
@@ -3043,7 +3043,7 @@
 	/*
 	 * Destroy the dataset.
 	 */
-	VERIFY3U(0, ==, dmu_objset_destroy(name, B_FALSE));
+	VERIFY0(dmu_objset_destroy(name, B_FALSE));
 	return (0);
 }
 
@@ -3136,8 +3136,7 @@
 		fatal(0, "dmu_objset_create(%s) = %d", name, error);
 	}
 
-	VERIFY3U(0, ==,
-	    dmu_objset_own(name, DMU_OST_OTHER, B_FALSE, FTAG, &os));
+	VERIFY0(dmu_objset_own(name, DMU_OST_OTHER, B_FALSE, FTAG, &os));
 
 	ztest_zd_init(&zdtmp, NULL, os);
 
@@ -3166,7 +3165,7 @@
 	/*
 	 * Verify that we can hold an objset that is also owned.
 	 */
-	VERIFY3U(0, ==, dmu_objset_hold(name, FTAG, &os2));
+	VERIFY0(dmu_objset_hold(name, FTAG, &os2));
 	dmu_objset_rele(os2, FTAG);
 
 	/*
@@ -3443,10 +3442,10 @@
 	 */
 	error = dmu_read(os, packobj, packoff, packsize, packbuf,
 	    DMU_READ_PREFETCH);
-	ASSERT3U(error, ==, 0);
+	ASSERT0(error);
 	error = dmu_read(os, bigobj, bigoff, bigsize, bigbuf,
 	    DMU_READ_PREFETCH);
-	ASSERT3U(error, ==, 0);
+	ASSERT0(error);
 
 	/*
 	 * Get a tx for the mods to both packobj and bigobj.
@@ -3686,7 +3685,7 @@
 	packbuf = umem_zalloc(packsize, UMEM_NOFAIL);
 	bigbuf = umem_zalloc(bigsize, UMEM_NOFAIL);
 
-	VERIFY3U(0, ==, dmu_bonus_hold(os, bigobj, FTAG, &bonus_db));
+	VERIFY0(dmu_bonus_hold(os, bigobj, FTAG, &bonus_db));
 
 	bigbuf_arcbufs = umem_zalloc(2 * s * sizeof (arc_buf_t *), UMEM_NOFAIL);
 
@@ -3756,10 +3755,10 @@
 		if (i != 0 || ztest_random(2) != 0) {
 			error = dmu_read(os, packobj, packoff,
 			    packsize, packbuf, DMU_READ_PREFETCH);
-			ASSERT3U(error, ==, 0);
+			ASSERT0(error);
 			error = dmu_read(os, bigobj, bigoff, bigsize,
 			    bigbuf, DMU_READ_PREFETCH);
-			ASSERT3U(error, ==, 0);
+			ASSERT0(error);
 		}
 		compare_and_update_pbbufs(s, packbuf, bigbuf, bigsize,
 		    n, chunksize, txg);
@@ -3938,19 +3937,18 @@
 		return;
 	for (i = 0; i < 2; i++) {
 		value[i] = i;
-		VERIFY3U(0, ==, zap_add(os, object, hc[i], sizeof (uint64_t),
+		VERIFY0(zap_add(os, object, hc[i], sizeof (uint64_t),
 		    1, &value[i], tx));
 	}
 	for (i = 0; i < 2; i++) {
 		VERIFY3U(EEXIST, ==, zap_add(os, object, hc[i],
 		    sizeof (uint64_t), 1, &value[i], tx));
-		VERIFY3U(0, ==,
-		    zap_length(os, object, hc[i], &zl_intsize, &zl_ints));
+		VERIFY0(zap_length(os, object, hc[i], &zl_intsize, &zl_ints));
 		ASSERT3U(zl_intsize, ==, sizeof (uint64_t));
 		ASSERT3U(zl_ints, ==, 1);
 	}
 	for (i = 0; i < 2; i++) {
-		VERIFY3U(0, ==, zap_remove(os, object, hc[i], tx));
+		VERIFY0(zap_remove(os, object, hc[i], tx));
 	}
 	dmu_tx_commit(tx);
 
@@ -4011,9 +4009,9 @@
 	for (i = 0; i < ints; i++)
 		value[i] = txg + object + i;
 
-	VERIFY3U(0, ==, zap_update(os, object, txgname, sizeof (uint64_t),
+	VERIFY0(zap_update(os, object, txgname, sizeof (uint64_t),
 	    1, &txg, tx));
-	VERIFY3U(0, ==, zap_update(os, object, propname, sizeof (uint64_t),
+	VERIFY0(zap_update(os, object, propname, sizeof (uint64_t),
 	    ints, value, tx));
 
 	dmu_tx_commit(tx);
@@ -4030,7 +4028,7 @@
 	if (error == ENOENT)
 		return;
 
-	ASSERT3U(error, ==, 0);
+	ASSERT0(error);
 
 	tx = dmu_tx_create(os);
 	dmu_tx_hold_zap(tx, object, B_TRUE, NULL);
@@ -4037,8 +4035,8 @@
 	txg = ztest_tx_assign(tx, TXG_MIGHTWAIT, FTAG);
 	if (txg == 0)
 		return;
-	VERIFY3U(0, ==, zap_remove(os, object, txgname, tx));
-	VERIFY3U(0, ==, zap_remove(os, object, propname, tx));
+	VERIFY0(zap_remove(os, object, txgname, tx));
+	VERIFY0(zap_remove(os, object, propname, tx));
 	dmu_tx_commit(tx);
 }
 
@@ -4226,7 +4224,7 @@
 	data->zcd_called = B_TRUE;
 
 	if (error == ECANCELED) {
-		ASSERT3U(data->zcd_txg, ==, 0);
+		ASSERT0(data->zcd_txg);
 		ASSERT(!data->zcd_added);
 
 		/*
@@ -4431,7 +4429,7 @@
 	(void) ztest_spa_prop_set_uint64(ZPOOL_PROP_DEDUPDITTO,
 	    ZIO_DEDUPDITTO_MIN + ztest_random(ZIO_DEDUPDITTO_MIN));
 
-	VERIFY3U(spa_prop_get(ztest_spa, &props), ==, 0);
+	VERIFY0(spa_prop_get(ztest_spa, &props));
 
 	if (ztest_opts.zo_verbose >= 6)
 		dump_nvlist(props, 4);
@@ -4887,7 +4885,7 @@
 	/*
 	 * Do the rename
 	 */
-	VERIFY3U(0, ==, spa_rename(oldname, newname));
+	VERIFY0(spa_rename(oldname, newname));
 
 	/*
 	 * Try to open it under the old name, which shouldn't exist
@@ -4897,7 +4895,7 @@
 	/*
 	 * Open it under the new name and make sure it's still the same spa_t.
 	 */
-	VERIFY3U(0, ==, spa_open(newname, &spa, FTAG));
+	VERIFY0(spa_open(newname, &spa, FTAG));
 
 	ASSERT(spa == ztest_spa);
 	spa_close(spa, FTAG);
@@ -4905,12 +4903,12 @@
 	/*
 	 * Rename it back to the original
 	 */
-	VERIFY3U(0, ==, spa_rename(newname, oldname));
+	VERIFY0(spa_rename(newname, oldname));
 
 	/*
 	 * Make sure it can still be opened
 	 */
-	VERIFY3U(0, ==, spa_open(oldname, &spa, FTAG));
+	VERIFY0(spa_open(oldname, &spa, FTAG));
 
 	ASSERT(spa == ztest_spa);
 	spa_close(spa, FTAG);
@@ -5010,7 +5008,7 @@
 	/*
 	 * Get the pool's configuration and guid.
 	 */
-	VERIFY3U(0, ==, spa_open(oldname, &spa, FTAG));
+	VERIFY0(spa_open(oldname, &spa, FTAG));
 
 	/*
 	 * Kick off a scrub to tickle scrub/export races.
@@ -5026,7 +5024,7 @@
 	/*
 	 * Export it.
 	 */
-	VERIFY3U(0, ==, spa_export(oldname, &config, B_FALSE, B_FALSE));
+	VERIFY0(spa_export(oldname, &config, B_FALSE, B_FALSE));
 
 	ztest_walk_pool_directory("pools after export");
 
@@ -5040,7 +5038,7 @@
 	/*
 	 * Import it under the new name.
 	 */
-	VERIFY3U(0, ==, spa_import(newname, config, NULL, 0));
+	VERIFY0(spa_import(newname, config, NULL, 0));
 
 	ztest_walk_pool_directory("pools after import");
 
@@ -5062,7 +5060,7 @@
 	/*
 	 * Verify that we can open and close the pool using the new name.
 	 */
-	VERIFY3U(0, ==, spa_open(newname, &spa, FTAG));
+	VERIFY0(spa_open(newname, &spa, FTAG));
 	ASSERT(pool_guid == spa_guid(spa));
 	spa_close(spa, FTAG);
 
@@ -5220,7 +5218,7 @@
 	 * That's because zap_count() returns the open-context value,
 	 * while dmu_objset_space() returns the rootbp fill count.
 	 */
-	VERIFY3U(0, ==, zap_count(zd->zd_os, ZTEST_DIROBJ, &dirobjs));
+	VERIFY0(zap_count(zd->zd_os, ZTEST_DIROBJ, &dirobjs));
 	dmu_objset_space(zd->zd_os, &scratch, &scratch, &usedobjs, &scratch);
 	ASSERT3U(dirobjs + 1, ==, usedobjs);
 }
@@ -5247,7 +5245,7 @@
 	}
 	ASSERT(error == 0 || error == EEXIST);
 
-	VERIFY3U(dmu_objset_hold(name, zd, &os), ==, 0);
+	VERIFY0(dmu_objset_hold(name, zd, &os));
 	(void) rw_unlock(&ztest_name_lock);
 
 	ztest_zd_init(zd, ZTEST_GET_SHARED_DS(d), os);
@@ -5336,7 +5334,7 @@
 	spa->spa_debug = B_TRUE;
 	ztest_spa = spa;
 
-	VERIFY3U(0, ==, dmu_objset_hold(ztest_opts.zo_pool, FTAG, &os));
+	VERIFY0(dmu_objset_hold(ztest_opts.zo_pool, FTAG, &os));
 	zs->zs_guid = dmu_objset_fsid_guid(os);
 	dmu_objset_rele(os, FTAG);
 
@@ -5478,8 +5476,8 @@
 		(void) printf("testing spa_freeze()...\n");
 
 	kernel_init(FREAD | FWRITE);
-	VERIFY3U(0, ==, spa_open(ztest_opts.zo_pool, &spa, FTAG));
-	VERIFY3U(0, ==, ztest_dataset_open(0));
+	VERIFY0(spa_open(ztest_opts.zo_pool, &spa, FTAG));
+	VERIFY0(ztest_dataset_open(0));
 
 	/*
 	 * Force the first log block to be transactionally allocated.
@@ -5530,8 +5528,8 @@
 	 * Open and close the pool and dataset to induce log replay.
 	 */
 	kernel_init(FREAD | FWRITE);
-	VERIFY3U(0, ==, spa_open(ztest_opts.zo_pool, &spa, FTAG));
-	VERIFY3U(0, ==, ztest_dataset_open(0));
+	VERIFY0(spa_open(ztest_opts.zo_pool, &spa, FTAG));
+	VERIFY0(ztest_dataset_open(0));
 	ztest_dataset_close(0);
 	spa_close(spa, FTAG);
 	kernel_fini();
@@ -5604,12 +5602,12 @@
 		char buf[1024];
 		(void) snprintf(buf, sizeof (buf), "feature@%s",
 		    spa_feature_table[i].fi_uname);
-		VERIFY3U(0, ==, nvlist_add_uint64(props, buf, 0));
+		VERIFY0(nvlist_add_uint64(props, buf, 0));
 	}
-	VERIFY3U(0, ==, spa_create(ztest_opts.zo_pool, nvroot, props, NULL));
+	VERIFY0(spa_create(ztest_opts.zo_pool, nvroot, props, NULL));
 	nvlist_free(nvroot);
 
-	VERIFY3U(0, ==, spa_open(ztest_opts.zo_pool, &spa, FTAG));
+	VERIFY0(spa_open(ztest_opts.zo_pool, &spa, FTAG));
 	zs->zs_metaslab_sz =
 	    1ULL << spa->spa_root_vdev->vdev_child[0]->vdev_ms_shift;
 
@@ -5666,7 +5664,7 @@
 	    PROT_READ | PROT_WRITE, MAP_SHARED, ZTEST_FD_DATA, 0);
 	ASSERT(hdr != MAP_FAILED);
 
-	VERIFY3U(0, ==, ftruncate(ZTEST_FD_DATA, sizeof (ztest_shared_hdr_t)));
+	VERIFY0(ftruncate(ZTEST_FD_DATA, sizeof (ztest_shared_hdr_t)));
 
 	hdr->zh_hdr_size = sizeof (ztest_shared_hdr_t);
 	hdr->zh_opts_size = sizeof (ztest_shared_opts_t);
@@ -5677,7 +5675,7 @@
 	hdr->zh_ds_count = ztest_opts.zo_datasets;
 
 	size = shared_data_size(hdr);
-	VERIFY3U(0, ==, ftruncate(ZTEST_FD_DATA, size));
+	VERIFY0(ftruncate(ZTEST_FD_DATA, size));
 
 	(void) munmap((caddr_t)hdr, P2ROUNDUP(sizeof (*hdr), getpagesize()));
 }
--- old/usr/src/common/nvpair/fnvpair.c	Wed Jul 18 15:48:23 2012
+++ new/usr/src/common/nvpair/fnvpair.c	Wed Jul 18 15:48:22 2012
@@ -50,7 +50,7 @@
 fnvlist_alloc(void)
 {
 	nvlist_t *nvl;
-	VERIFY3U(nvlist_alloc(&nvl, NV_UNIQUE_NAME, KM_SLEEP), ==, 0);
+	VERIFY0(nvlist_alloc(&nvl, NV_UNIQUE_NAME, KM_SLEEP));
 	return (nvl);
 }
 
@@ -64,7 +64,7 @@
 fnvlist_size(nvlist_t *nvl)
 {
 	size_t size;
-	VERIFY3U(nvlist_size(nvl, &size, NV_ENCODE_NATIVE), ==, 0);
+	VERIFY0(nvlist_size(nvl, &size, NV_ENCODE_NATIVE));
 	return (size);
 }
 
@@ -96,7 +96,7 @@
 fnvlist_unpack(char *buf, size_t buflen)
 {
 	nvlist_t *rv;
-	VERIFY3U(nvlist_unpack(buf, buflen, &rv, KM_SLEEP), ==, 0);
+	VERIFY0(nvlist_unpack(buf, buflen, &rv, KM_SLEEP));
 	return (rv);
 }
 
@@ -104,7 +104,7 @@
 fnvlist_dup(nvlist_t *nvl)
 {
 	nvlist_t *rv;
-	VERIFY3U(nvlist_dup(nvl, &rv, KM_SLEEP), ==, 0);
+	VERIFY0(nvlist_dup(nvl, &rv, KM_SLEEP));
 	return (rv);
 }
 
@@ -111,91 +111,91 @@
 void
 fnvlist_merge(nvlist_t *dst, nvlist_t *src)
 {
-	VERIFY3U(nvlist_merge(dst, src, KM_SLEEP), ==, 0);
+	VERIFY0(nvlist_merge(dst, src, KM_SLEEP));
 }
 
 void
 fnvlist_add_boolean(nvlist_t *nvl, const char *name)
 {
-	VERIFY3U(nvlist_add_boolean(nvl, name), ==, 0);
+	VERIFY0(nvlist_add_boolean(nvl, name));
 }
 
 void
 fnvlist_add_boolean_value(nvlist_t *nvl, const char *name, boolean_t val)
 {
-	VERIFY3U(nvlist_add_boolean_value(nvl, name, val), ==, 0);
+	VERIFY0(nvlist_add_boolean_value(nvl, name, val));
 }
 
 void
 fnvlist_add_byte(nvlist_t *nvl, const char *name, uchar_t val)
 {
-	VERIFY3U(nvlist_add_byte(nvl, name, val), ==, 0);
+	VERIFY0(nvlist_add_byte(nvl, name, val));
 }
 
 void
 fnvlist_add_int8(nvlist_t *nvl, const char *name, int8_t val)
 {
-	VERIFY3U(nvlist_add_int8(nvl, name, val), ==, 0);
+	VERIFY0(nvlist_add_int8(nvl, name, val));
 }
 
 void
 fnvlist_add_uint8(nvlist_t *nvl, const char *name, uint8_t val)
 {
-	VERIFY3U(nvlist_add_uint8(nvl, name, val), ==, 0);
+	VERIFY0(nvlist_add_uint8(nvl, name, val));
 }
 
 void
 fnvlist_add_int16(nvlist_t *nvl, const char *name, int16_t val)
 {
-	VERIFY3U(nvlist_add_int16(nvl, name, val), ==, 0);
+	VERIFY0(nvlist_add_int16(nvl, name, val));
 }
 
 void
 fnvlist_add_uint16(nvlist_t *nvl, const char *name, uint16_t val)
 {
-	VERIFY3U(nvlist_add_uint16(nvl, name, val), ==, 0);
+	VERIFY0(nvlist_add_uint16(nvl, name, val));
 }
 
 void
 fnvlist_add_int32(nvlist_t *nvl, const char *name, int32_t val)
 {
-	VERIFY3U(nvlist_add_int32(nvl, name, val), ==, 0);
+	VERIFY0(nvlist_add_int32(nvl, name, val));
 }
 
 void
 fnvlist_add_uint32(nvlist_t *nvl, const char *name, uint32_t val)
 {
-	VERIFY3U(nvlist_add_uint32(nvl, name, val), ==, 0);
+	VERIFY0(nvlist_add_uint32(nvl, name, val));
 }
 
 void
 fnvlist_add_int64(nvlist_t *nvl, const char *name, int64_t val)
 {
-	VERIFY3U(nvlist_add_int64(nvl, name, val), ==, 0);
+	VERIFY0(nvlist_add_int64(nvl, name, val));
 }
 
 void
 fnvlist_add_uint64(nvlist_t *nvl, const char *name, uint64_t val)
 {
-	VERIFY3U(nvlist_add_uint64(nvl, name, val), ==, 0);
+	VERIFY0(nvlist_add_uint64(nvl, name, val));
 }
 
 void
 fnvlist_add_string(nvlist_t *nvl, const char *name, const char *val)
 {
-	VERIFY3U(nvlist_add_string(nvl, name, val), ==, 0);
+	VERIFY0(nvlist_add_string(nvl, name, val));
 }
 
 void
 fnvlist_add_nvlist(nvlist_t *nvl, const char *name, nvlist_t *val)
 {
-	VERIFY3U(nvlist_add_nvlist(nvl, name, val), ==, 0);
+	VERIFY0(nvlist_add_nvlist(nvl, name, val));
 }
 
 void
 fnvlist_add_nvpair(nvlist_t *nvl, nvpair_t *pair)
 {
-	VERIFY3U(nvlist_add_nvpair(nvl, pair), ==, 0);
+	VERIFY0(nvlist_add_nvpair(nvl, pair));
 }
 
 void
@@ -202,31 +202,31 @@
 fnvlist_add_boolean_array(nvlist_t *nvl, const char *name,
     boolean_t *val, uint_t n)
 {
-	VERIFY3U(nvlist_add_boolean_array(nvl, name, val, n), ==, 0);
+	VERIFY0(nvlist_add_boolean_array(nvl, name, val, n));
 }
 
 void
 fnvlist_add_byte_array(nvlist_t *nvl, const char *name, uchar_t *val, uint_t n)
 {
-	VERIFY3U(nvlist_add_byte_array(nvl, name, val, n), ==, 0);
+	VERIFY0(nvlist_add_byte_array(nvl, name, val, n));
 }
 
 void
 fnvlist_add_int8_array(nvlist_t *nvl, const char *name, int8_t *val, uint_t n)
 {
-	VERIFY3U(nvlist_add_int8_array(nvl, name, val, n), ==, 0);
+	VERIFY0(nvlist_add_int8_array(nvl, name, val, n));
 }
 
 void
 fnvlist_add_uint8_array(nvlist_t *nvl, const char *name, uint8_t *val, uint_t n)
 {
-	VERIFY3U(nvlist_add_uint8_array(nvl, name, val, n), ==, 0);
+	VERIFY0(nvlist_add_uint8_array(nvl, name, val, n));
 }
 
 void
 fnvlist_add_int16_array(nvlist_t *nvl, const char *name, int16_t *val, uint_t n)
 {
-	VERIFY3U(nvlist_add_int16_array(nvl, name, val, n), ==, 0);
+	VERIFY0(nvlist_add_int16_array(nvl, name, val, n));
 }
 
 void
@@ -233,13 +233,13 @@
 fnvlist_add_uint16_array(nvlist_t *nvl, const char *name,
     uint16_t *val, uint_t n)
 {
-	VERIFY3U(nvlist_add_uint16_array(nvl, name, val, n), ==, 0);
+	VERIFY0(nvlist_add_uint16_array(nvl, name, val, n));
 }
 
 void
 fnvlist_add_int32_array(nvlist_t *nvl, const char *name, int32_t *val, uint_t n)
 {
-	VERIFY3U(nvlist_add_int32_array(nvl, name, val, n), ==, 0);
+	VERIFY0(nvlist_add_int32_array(nvl, name, val, n));
 }
 
 void
@@ -246,13 +246,13 @@
 fnvlist_add_uint32_array(nvlist_t *nvl, const char *name,
     uint32_t *val, uint_t n)
 {
-	VERIFY3U(nvlist_add_uint32_array(nvl, name, val, n), ==, 0);
+	VERIFY0(nvlist_add_uint32_array(nvl, name, val, n));
 }
 
 void
 fnvlist_add_int64_array(nvlist_t *nvl, const char *name, int64_t *val, uint_t n)
 {
-	VERIFY3U(nvlist_add_int64_array(nvl, name, val, n), ==, 0);
+	VERIFY0(nvlist_add_int64_array(nvl, name, val, n));
 }
 
 void
@@ -259,7 +259,7 @@
 fnvlist_add_uint64_array(nvlist_t *nvl, const char *name,
     uint64_t *val, uint_t n)
 {
-	VERIFY3U(nvlist_add_uint64_array(nvl, name, val, n), ==, 0);
+	VERIFY0(nvlist_add_uint64_array(nvl, name, val, n));
 }
 
 void
@@ -266,7 +266,7 @@
 fnvlist_add_string_array(nvlist_t *nvl, const char *name,
     char * const *val, uint_t n)
 {
-	VERIFY3U(nvlist_add_string_array(nvl, name, val, n), ==, 0);
+	VERIFY0(nvlist_add_string_array(nvl, name, val, n));
 }
 
 void
@@ -273,19 +273,19 @@
 fnvlist_add_nvlist_array(nvlist_t *nvl, const char *name,
     nvlist_t **val, uint_t n)
 {
-	VERIFY3U(nvlist_add_nvlist_array(nvl, name, val, n), ==, 0);
+	VERIFY0(nvlist_add_nvlist_array(nvl, name, val, n));
 }
 
 void
 fnvlist_remove(nvlist_t *nvl, const char *name)
 {
-	VERIFY3U(nvlist_remove_all(nvl, name), ==, 0);
+	VERIFY0(nvlist_remove_all(nvl, name));
 }
 
 void
 fnvlist_remove_nvpair(nvlist_t *nvl, nvpair_t *pair)
 {
-	VERIFY3U(nvlist_remove_nvpair(nvl, pair), ==, 0);
+	VERIFY0(nvlist_remove_nvpair(nvl, pair));
 }
 
 nvpair_t *
@@ -292,7 +292,7 @@
 fnvlist_lookup_nvpair(nvlist_t *nvl, const char *name)
 {
 	nvpair_t *rv;
-	VERIFY3U(nvlist_lookup_nvpair(nvl, name, &rv), ==, 0);
+	VERIFY0(nvlist_lookup_nvpair(nvl, name, &rv));
 	return (rv);
 }
 
@@ -307,7 +307,7 @@
 fnvlist_lookup_boolean_value(nvlist_t *nvl, const char *name)
 {
 	boolean_t rv;
-	VERIFY3U(nvlist_lookup_boolean_value(nvl, name, &rv), ==, 0);
+	VERIFY0(nvlist_lookup_boolean_value(nvl, name, &rv));
 	return (rv);
 }
 
@@ -315,7 +315,7 @@
 fnvlist_lookup_byte(nvlist_t *nvl, const char *name)
 {
 	uchar_t rv;
-	VERIFY3U(nvlist_lookup_byte(nvl, name, &rv), ==, 0);
+	VERIFY0(nvlist_lookup_byte(nvl, name, &rv));
 	return (rv);
 }
 
@@ -323,7 +323,7 @@
 fnvlist_lookup_int8(nvlist_t *nvl, const char *name)
 {
 	int8_t rv;
-	VERIFY3U(nvlist_lookup_int8(nvl, name, &rv), ==, 0);
+	VERIFY0(nvlist_lookup_int8(nvl, name, &rv));
 	return (rv);
 }
 
@@ -331,7 +331,7 @@
 fnvlist_lookup_int16(nvlist_t *nvl, const char *name)
 {
 	int16_t rv;
-	VERIFY3U(nvlist_lookup_int16(nvl, name, &rv), ==, 0);
+	VERIFY0(nvlist_lookup_int16(nvl, name, &rv));
 	return (rv);
 }
 
@@ -339,7 +339,7 @@
 fnvlist_lookup_int32(nvlist_t *nvl, const char *name)
 {
 	int32_t rv;
-	VERIFY3U(nvlist_lookup_int32(nvl, name, &rv), ==, 0);
+	VERIFY0(nvlist_lookup_int32(nvl, name, &rv));
 	return (rv);
 }
 
@@ -347,7 +347,7 @@
 fnvlist_lookup_int64(nvlist_t *nvl, const char *name)
 {
 	int64_t rv;
-	VERIFY3U(nvlist_lookup_int64(nvl, name, &rv), ==, 0);
+	VERIFY0(nvlist_lookup_int64(nvl, name, &rv));
 	return (rv);
 }
 
@@ -355,7 +355,7 @@
 fnvlist_lookup_uint8_t(nvlist_t *nvl, const char *name)
 {
 	uint8_t rv;
-	VERIFY3U(nvlist_lookup_uint8(nvl, name, &rv), ==, 0);
+	VERIFY0(nvlist_lookup_uint8(nvl, name, &rv));
 	return (rv);
 }
 
@@ -363,7 +363,7 @@
 fnvlist_lookup_uint16(nvlist_t *nvl, const char *name)
 {
 	uint16_t rv;
-	VERIFY3U(nvlist_lookup_uint16(nvl, name, &rv), ==, 0);
+	VERIFY0(nvlist_lookup_uint16(nvl, name, &rv));
 	return (rv);
 }
 
@@ -371,7 +371,7 @@
 fnvlist_lookup_uint32(nvlist_t *nvl, const char *name)
 {
 	uint32_t rv;
-	VERIFY3U(nvlist_lookup_uint32(nvl, name, &rv), ==, 0);
+	VERIFY0(nvlist_lookup_uint32(nvl, name, &rv));
 	return (rv);
 }
 
@@ -379,7 +379,7 @@
 fnvlist_lookup_uint64(nvlist_t *nvl, const char *name)
 {
 	uint64_t rv;
-	VERIFY3U(nvlist_lookup_uint64(nvl, name, &rv), ==, 0);
+	VERIFY0(nvlist_lookup_uint64(nvl, name, &rv));
 	return (rv);
 }
 
@@ -387,7 +387,7 @@
 fnvlist_lookup_string(nvlist_t *nvl, const char *name)
 {
 	char *rv;
-	VERIFY3U(nvlist_lookup_string(nvl, name, &rv), ==, 0);
+	VERIFY0(nvlist_lookup_string(nvl, name, &rv));
 	return (rv);
 }
 
@@ -395,7 +395,7 @@
 fnvlist_lookup_nvlist(nvlist_t *nvl, const char *name)
 {
 	nvlist_t *rv;
-	VERIFY3U(nvlist_lookup_nvlist(nvl, name, &rv), ==, 0);
+	VERIFY0(nvlist_lookup_nvlist(nvl, name, &rv));
 	return (rv);
 }
 
@@ -403,7 +403,7 @@
 fnvpair_value_boolean_value(nvpair_t *nvp)
 {
 	boolean_t rv;
-	VERIFY3U(nvpair_value_boolean_value(nvp, &rv), ==, 0);
+	VERIFY0(nvpair_value_boolean_value(nvp, &rv));
 	return (rv);
 }
 
@@ -411,7 +411,7 @@
 fnvpair_value_byte(nvpair_t *nvp)
 {
 	uchar_t rv;
-	VERIFY3U(nvpair_value_byte(nvp, &rv), ==, 0);
+	VERIFY0(nvpair_value_byte(nvp, &rv));
 	return (rv);
 }
 
@@ -419,7 +419,7 @@
 fnvpair_value_int8(nvpair_t *nvp)
 {
 	int8_t rv;
-	VERIFY3U(nvpair_value_int8(nvp, &rv), ==, 0);
+	VERIFY0(nvpair_value_int8(nvp, &rv));
 	return (rv);
 }
 
@@ -427,7 +427,7 @@
 fnvpair_value_int16(nvpair_t *nvp)
 {
 	int16_t rv;
-	VERIFY3U(nvpair_value_int16(nvp, &rv), ==, 0);
+	VERIFY0(nvpair_value_int16(nvp, &rv));
 	return (rv);
 }
 
@@ -435,7 +435,7 @@
 fnvpair_value_int32(nvpair_t *nvp)
 {
 	int32_t rv;
-	VERIFY3U(nvpair_value_int32(nvp, &rv), ==, 0);
+	VERIFY0(nvpair_value_int32(nvp, &rv));
 	return (rv);
 }
 
@@ -443,7 +443,7 @@
 fnvpair_value_int64(nvpair_t *nvp)
 {
 	int64_t rv;
-	VERIFY3U(nvpair_value_int64(nvp, &rv), ==, 0);
+	VERIFY0(nvpair_value_int64(nvp, &rv));
 	return (rv);
 }
 
@@ -451,7 +451,7 @@
 fnvpair_value_uint8_t(nvpair_t *nvp)
 {
 	uint8_t rv;
-	VERIFY3U(nvpair_value_uint8(nvp, &rv), ==, 0);
+	VERIFY0(nvpair_value_uint8(nvp, &rv));
 	return (rv);
 }
 
@@ -459,7 +459,7 @@
 fnvpair_value_uint16(nvpair_t *nvp)
 {
 	uint16_t rv;
-	VERIFY3U(nvpair_value_uint16(nvp, &rv), ==, 0);
+	VERIFY0(nvpair_value_uint16(nvp, &rv));
 	return (rv);
 }
 
@@ -467,7 +467,7 @@
 fnvpair_value_uint32(nvpair_t *nvp)
 {
 	uint32_t rv;
-	VERIFY3U(nvpair_value_uint32(nvp, &rv), ==, 0);
+	VERIFY0(nvpair_value_uint32(nvp, &rv));
 	return (rv);
 }
 
@@ -475,7 +475,7 @@
 fnvpair_value_uint64(nvpair_t *nvp)
 {
 	uint64_t rv;
-	VERIFY3U(nvpair_value_uint64(nvp, &rv), ==, 0);
+	VERIFY0(nvpair_value_uint64(nvp, &rv));
 	return (rv);
 }
 
@@ -483,7 +483,7 @@
 fnvpair_value_string(nvpair_t *nvp)
 {
 	char *rv;
-	VERIFY3U(nvpair_value_string(nvp, &rv), ==, 0);
+	VERIFY0(nvpair_value_string(nvp, &rv));
 	return (rv);
 }
 
@@ -491,6 +491,6 @@
 fnvpair_value_nvlist(nvpair_t *nvp)
 {
 	nvlist_t *rv;
-	VERIFY3U(nvpair_value_nvlist(nvp, &rv), ==, 0);
+	VERIFY0(nvpair_value_nvlist(nvp, &rv));
 	return (rv);
 }
--- old/usr/src/lib/libc/port/threads/assfail.c	Wed Jul 18 15:48:24 2012
+++ new/usr/src/lib/libc/port/threads/assfail.c	Wed Jul 18 15:48:23 2012
@@ -452,11 +452,11 @@
 {
 	char buf[1000];
 	(void) strcpy(buf, assertion);
-	(void) strcat(buf, " (0x");
+	(void) strcat(buf, " (");
 	ultos((uint64_t)lv, 16, buf + strlen(buf));
 	(void) strcat(buf, " ");
 	(void) strcat(buf, op);
-	(void) strcat(buf, " 0x");
+	(void) strcat(buf, " ");
 	ultos((uint64_t)rv, 16, buf + strlen(buf));
 	(void) strcat(buf, ")");
 	__assfail(buf, filename, line_num);
--- old/usr/src/lib/libzpool/Makefile.com	Wed Jul 18 15:48:25 2012
+++ new/usr/src/lib/libzpool/Makefile.com	Wed Jul 18 15:48:24 2012
@@ -20,6 +20,7 @@
 #
 #
 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012 by Delphix. All rights reserved.
 #
 
 LIBRARY= libzpool.a
@@ -57,9 +58,9 @@
 C99LMODE=	-Xc99=%all
 
 CFLAGS +=	-g $(CCVERBOSE) $(CNOGLOBAL)
-CFLAGS64 +=	-g $(CCVERBOSE) $(CNOGLOBAL)
+CFLAGS64 +=	-g $(CCVERBOSE)	$(CNOGLOBAL)
 LDLIBS +=	-lcmdutils -lumem -lavl -lnvpair -lz -lc -lsysevent -lmd
-CPPFLAGS +=	$(INCS)
+CPPFLAGS +=	$(INCS)	-DDEBUG
 
 .KEEP_STATE:
 
--- old/usr/src/lib/libzpool/common/sys/zfs_context.h	Wed Jul 18 15:48:25 2012
+++ new/usr/src/lib/libzpool/common/sys/zfs_context.h	Wed Jul 18 15:48:25 2012
@@ -36,7 +36,6 @@
 #define	_SYS_RWLOCK_H
 #define	_SYS_CONDVAR_H
 #define	_SYS_SYSTM_H
-#define	_SYS_DEBUG_H
 #define	_SYS_T_LOCK_H
 #define	_SYS_VNODE_H
 #define	_SYS_VFS_H
@@ -78,6 +77,7 @@
 #include <sys/sysevent/eventdefs.h>
 #include <sys/sysevent/dev.h>
 #include <sys/sunddi.h>
+#include <sys/debug.h>
 
 /*
  * Debugging
@@ -110,60 +110,6 @@
 
 extern int aok;
 
-/* This definition is copied from assert.h. */
-#if defined(__STDC__)
-#if __STDC_VERSION__ - 0 >= 199901L
-#define	zverify(EX) (void)((EX) || (aok) || \
-	(__assert_c99(#EX, __FILE__, __LINE__, __func__), 0))
-#else
-#define	zverify(EX) (void)((EX) || (aok) || \
-	(__assert(#EX, __FILE__, __LINE__), 0))
-#endif /* __STDC_VERSION__ - 0 >= 199901L */
-#else
-#define	zverify(EX) (void)((EX) || (aok) || \
-	(_assert("EX", __FILE__, __LINE__), 0))
-#endif	/* __STDC__ */
-
-
-#define	VERIFY	zverify
-#define	ASSERT	zverify
-#undef	assert
-#define	assert	zverify
-
-extern void __assert(const char *, const char *, int);
-
-#ifdef lint
-#define	VERIFY3_IMPL(x, y, z, t)	if (x == z) ((void)0)
-#else
-/* BEGIN CSTYLED */
-#define	VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE) do { \
-	const TYPE __left = (TYPE)(LEFT); \
-	const TYPE __right = (TYPE)(RIGHT); \
-	if (!(__left OP __right) && (!aok)) { \
-		char *__buf = alloca(256); \
-		(void) snprintf(__buf, 256, "%s %s %s (0x%llx %s 0x%llx)", \
-			#LEFT, #OP, #RIGHT, \
-			(u_longlong_t)__left, #OP, (u_longlong_t)__right); \
-		__assert(__buf, __FILE__, __LINE__); \
-	} \
-_NOTE(CONSTCOND) } while (0)
-/* END CSTYLED */
-#endif /* lint */
-
-#define	VERIFY3S(x, y, z)	VERIFY3_IMPL(x, y, z, int64_t)
-#define	VERIFY3U(x, y, z)	VERIFY3_IMPL(x, y, z, uint64_t)
-#define	VERIFY3P(x, y, z)	VERIFY3_IMPL(x, y, z, uintptr_t)
-
-#ifdef NDEBUG
-#define	ASSERT3S(x, y, z)	((void)0)
-#define	ASSERT3U(x, y, z)	((void)0)
-#define	ASSERT3P(x, y, z)	((void)0)
-#else
-#define	ASSERT3S(x, y, z)	VERIFY3S(x, y, z)
-#define	ASSERT3U(x, y, z)	VERIFY3U(x, y, z)
-#define	ASSERT3P(x, y, z)	VERIFY3P(x, y, z)
-#endif
-
 /*
  * DTrace SDT probes have different signatures in userland than they do in
  * kernel.  If they're being used in kernel code, re-define them out of
--- old/usr/src/uts/common/disp/sysdc.c	Wed Jul 18 15:48:26 2012
+++ new/usr/src/uts/common/disp/sysdc.c	Wed Jul 18 15:48:26 2012
@@ -23,6 +23,10 @@
  */
 
 /*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+/*
  * The System Duty Cycle (SDC) scheduling class
  * --------------------------------------------
  *
@@ -1305,12 +1309,12 @@
 	sdp.sdp_maxpri = sysdc_maxpri;
 	sdp.sdp_DC = MAX(MIN(dc, sysdc_maxDC), sysdc_minDC);
 
-	VERIFY3U(CL_ALLOC(&buf, sysdccid, KM_SLEEP), ==, 0);
+	VERIFY0(CL_ALLOC(&buf, sysdccid, KM_SLEEP));
 
 	ASSERT(t->t_lwp != NULL);
 	ASSERT(t->t_cid == syscid);
 	ASSERT(t->t_cldata == NULL);
-	VERIFY3U(CL_CANEXIT(t, NULL), ==, 0);
-	VERIFY3U(CL_ENTERCLASS(t, sysdccid, &sdp, kcred, buf), ==, 0);
+	VERIFY0(CL_CANEXIT(t, NULL));
+	VERIFY0(CL_ENTERCLASS(t, sysdccid, &sdp, kcred, buf));
 	CL_EXITCLASS(syscid, NULL);
 }
--- old/usr/src/uts/common/fs/zfs/arc.c	Wed Jul 18 15:48:27 2012
+++ new/usr/src/uts/common/fs/zfs/arc.c	Wed Jul 18 15:48:27 2012
@@ -1010,7 +1010,7 @@
 		ASSERT(list_link_active(&ab->b_arc_node));
 		list_remove(list, ab);
 		if (GHOST_STATE(ab->b_state)) {
-			ASSERT3U(ab->b_datacnt, ==, 0);
+			ASSERT0(ab->b_datacnt);
 			ASSERT3P(ab->b_buf, ==, NULL);
 			delta = ab->b_size;
 		}
@@ -1637,7 +1637,7 @@
 		hash_lock = HDR_LOCK(ab);
 		have_lock = MUTEX_HELD(hash_lock);
 		if (have_lock || mutex_tryenter(hash_lock)) {
-			ASSERT3U(refcount_count(&ab->b_refcnt), ==, 0);
+			ASSERT0(refcount_count(&ab->b_refcnt));
 			ASSERT(ab->b_datacnt > 0);
 			while (ab->b_buf) {
 				arc_buf_t *buf = ab->b_buf;
@@ -2465,7 +2465,7 @@
 			 * This is a prefetch access...
 			 * move this block back to the MRU state.
 			 */
-			ASSERT3U(refcount_count(&buf->b_refcnt), ==, 0);
+			ASSERT0(refcount_count(&buf->b_refcnt));
 			new_state = arc_mru;
 		}
 
@@ -2806,7 +2806,7 @@
 			/* this block is in the ghost cache */
 			ASSERT(GHOST_STATE(hdr->b_state));
 			ASSERT(!HDR_IO_IN_PROGRESS(hdr));
-			ASSERT3U(refcount_count(&hdr->b_refcnt), ==, 0);
+			ASSERT0(refcount_count(&hdr->b_refcnt));
 			ASSERT(hdr->b_buf == NULL);
 
 			/* if this is a prefetch, we don't have a reference */
@@ -4380,7 +4380,7 @@
 	mutex_exit(&l2arc_buflist_mtx);
 
 	if (pio == NULL) {
-		ASSERT3U(write_sz, ==, 0);
+		ASSERT0(write_sz);
 		kmem_cache_free(hdr_cache, head);
 		return (0);
 	}
--- old/usr/src/uts/common/fs/zfs/bpobj.c	Wed Jul 18 15:48:28 2012
+++ new/usr/src/uts/common/fs/zfs/bpobj.c	Wed Jul 18 15:48:28 2012
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
 #include <sys/bpobj.h>
@@ -53,7 +53,7 @@
 	int epb;
 	dmu_buf_t *dbuf = NULL;
 
-	VERIFY3U(0, ==, bpobj_open(&bpo, os, obj));
+	VERIFY0(bpobj_open(&bpo, os, obj));
 
 	mutex_enter(&bpo.bpo_lock);
 
@@ -60,7 +60,7 @@
 	if (!bpo.bpo_havesubobj || bpo.bpo_phys->bpo_subobjs == 0)
 		goto out;
 
-	VERIFY3U(0, ==, dmu_object_info(os, bpo.bpo_phys->bpo_subobjs, &doi));
+	VERIFY0(dmu_object_info(os, bpo.bpo_phys->bpo_subobjs, &doi));
 	epb = doi.doi_data_block_size / sizeof (uint64_t);
 
 	for (i = bpo.bpo_phys->bpo_num_subobjs - 1; i >= 0; i--) {
@@ -73,7 +73,7 @@
 		if (dbuf == NULL || dbuf->db_offset > offset) {
 			if (dbuf)
 				dmu_buf_rele(dbuf, FTAG);
-			VERIFY3U(0, ==, dmu_buf_hold(os,
+			VERIFY0(dmu_buf_hold(os,
 			    bpo.bpo_phys->bpo_subobjs, offset, FTAG, &dbuf, 0));
 		}
 
@@ -87,13 +87,13 @@
 		dmu_buf_rele(dbuf, FTAG);
 		dbuf = NULL;
 	}
-	VERIFY3U(0, ==, dmu_object_free(os, bpo.bpo_phys->bpo_subobjs, tx));
+	VERIFY0(dmu_object_free(os, bpo.bpo_phys->bpo_subobjs, tx));
 
 out:
 	mutex_exit(&bpo.bpo_lock);
 	bpobj_close(&bpo);
 
-	VERIFY3U(0, ==, dmu_object_free(os, obj, tx));
+	VERIFY0(dmu_object_free(os, obj, tx));
 }
 
 int
@@ -204,7 +204,7 @@
 	}
 	if (free) {
 		i++;
-		VERIFY3U(0, ==, dmu_free_range(bpo->bpo_os, bpo->bpo_object,
+		VERIFY0(dmu_free_range(bpo->bpo_os, bpo->bpo_object,
 		    i * sizeof (blkptr_t), -1ULL, tx));
 	}
 	if (err || !bpo->bpo_havesubobj || bpo->bpo_phys->bpo_subobjs == 0)
@@ -252,7 +252,7 @@
 		}
 		err = bpobj_iterate_impl(&sublist, func, arg, tx, free);
 		if (free) {
-			VERIFY3U(0, ==, bpobj_space(&sublist,
+			VERIFY0(bpobj_space(&sublist,
 			    &used_after, &comp_after, &uncomp_after));
 			bpo->bpo_phys->bpo_bytes -= used_before - used_after;
 			ASSERT3S(bpo->bpo_phys->bpo_bytes, >=, 0);
@@ -278,7 +278,7 @@
 		dbuf = NULL;
 	}
 	if (free) {
-		VERIFY3U(0, ==, dmu_free_range(bpo->bpo_os,
+		VERIFY0(dmu_free_range(bpo->bpo_os,
 		    bpo->bpo_phys->bpo_subobjs,
 		    (i + 1) * sizeof (uint64_t), -1ULL, tx));
 	}
@@ -321,8 +321,8 @@
 	ASSERT(bpo->bpo_havesubobj);
 	ASSERT(bpo->bpo_havecomp);
 
-	VERIFY3U(0, ==, bpobj_open(&subbpo, bpo->bpo_os, subobj));
-	VERIFY3U(0, ==, bpobj_space(&subbpo, &used, &comp, &uncomp));
+	VERIFY0(bpobj_open(&subbpo, bpo->bpo_os, subobj));
+	VERIFY0(bpobj_space(&subbpo, &used, &comp, &uncomp));
 
 	if (used == 0) {
 		/* No point in having an empty subobj. */
@@ -352,12 +352,12 @@
 	if (subsubobjs != 0) {
 		dmu_object_info_t doi;
 
-		VERIFY3U(0, ==, dmu_object_info(bpo->bpo_os, subsubobjs, &doi));
+		VERIFY0(dmu_object_info(bpo->bpo_os, subsubobjs, &doi));
 		if (doi.doi_max_offset == doi.doi_data_block_size) {
 			dmu_buf_t *subdb;
 			uint64_t numsubsub = subbpo.bpo_phys->bpo_num_subobjs;
 
-			VERIFY3U(0, ==, dmu_buf_hold(bpo->bpo_os, subsubobjs,
+			VERIFY0(dmu_buf_hold(bpo->bpo_os, subsubobjs,
 			    0, FTAG, &subdb, 0));
 			dmu_write(bpo->bpo_os, bpo->bpo_phys->bpo_subobjs,
 			    bpo->bpo_phys->bpo_num_subobjs * sizeof (subobj),
@@ -367,7 +367,7 @@
 
 			dmu_buf_will_dirty(subbpo.bpo_dbuf, tx);
 			subbpo.bpo_phys->bpo_subobjs = 0;
-			VERIFY3U(0, ==, dmu_object_free(bpo->bpo_os,
+			VERIFY0(dmu_object_free(bpo->bpo_os,
 			    subsubobjs, tx));
 		}
 	}
@@ -407,7 +407,7 @@
 	    bpo->bpo_cached_dbuf->db_size) {
 		if (bpo->bpo_cached_dbuf)
 			dmu_buf_rele(bpo->bpo_cached_dbuf, bpo);
-		VERIFY3U(0, ==, dmu_buf_hold(bpo->bpo_os, bpo->bpo_object,
+		VERIFY0(dmu_buf_hold(bpo->bpo_os, bpo->bpo_object,
 		    offset, bpo, &bpo->bpo_cached_dbuf, 0));
 	}
 
--- old/usr/src/uts/common/fs/zfs/bptree.c	Wed Jul 18 15:48:29 2012
+++ new/usr/src/uts/common/fs/zfs/bptree.c	Wed Jul 18 15:48:29 2012
@@ -72,7 +72,7 @@
 	 * Bonus buffer contents are already initialized to 0, but for
 	 * readability we make it explicit.
 	 */
-	VERIFY3U(0, ==, dmu_bonus_hold(os, obj, FTAG, &db));
+	VERIFY0(dmu_bonus_hold(os, obj, FTAG, &db));
 	dmu_buf_will_dirty(db, tx);
 	bt = db->db_data;
 	bt->bt_begin = 0;
@@ -91,12 +91,12 @@
 	dmu_buf_t *db;
 	bptree_phys_t *bt;
 
-	VERIFY3U(0, ==, dmu_bonus_hold(os, obj, FTAG, &db));
+	VERIFY0(dmu_bonus_hold(os, obj, FTAG, &db));
 	bt = db->db_data;
 	ASSERT3U(bt->bt_begin, ==, bt->bt_end);
-	ASSERT3U(bt->bt_bytes, ==, 0);
-	ASSERT3U(bt->bt_comp, ==, 0);
-	ASSERT3U(bt->bt_uncomp, ==, 0);
+	ASSERT0(bt->bt_bytes);
+	ASSERT0(bt->bt_comp);
+	ASSERT0(bt->bt_uncomp);
 	dmu_buf_rele(db, FTAG);
 
 	return (dmu_object_free(os, obj, tx));
@@ -117,7 +117,7 @@
 	 */
 	ASSERT(dmu_tx_is_syncing(tx));
 
-	VERIFY3U(0, ==, dmu_bonus_hold(os, obj, FTAG, &db));
+	VERIFY0(dmu_bonus_hold(os, obj, FTAG, &db));
 	bt = db->db_data;
 
 	bte.be_birth_txg = birth_txg;
@@ -197,7 +197,7 @@
 				/* save bookmark for future resume */
 				ASSERT3U(bte.be_zb.zb_objset, ==,
 				    ZB_DESTROYED_OBJSET);
-				ASSERT3U(bte.be_zb.zb_level, ==, 0);
+				ASSERT0(bte.be_zb.zb_level);
 				dmu_write(os, obj, i * sizeof (bte),
 				    sizeof (bte), &bte, tx);
 				break;
@@ -213,9 +213,9 @@
 
 	/* if all blocks are free there should be no used space */
 	if (ba.ba_phys->bt_begin == ba.ba_phys->bt_end) {
-		ASSERT3U(ba.ba_phys->bt_bytes, ==, 0);
-		ASSERT3U(ba.ba_phys->bt_comp, ==, 0);
-		ASSERT3U(ba.ba_phys->bt_uncomp, ==, 0);
+		ASSERT0(ba.ba_phys->bt_bytes);
+		ASSERT0(ba.ba_phys->bt_comp);
+		ASSERT0(ba.ba_phys->bt_uncomp);
 	}
 
 	dmu_buf_rele(db, FTAG);
--- old/usr/src/uts/common/fs/zfs/dbuf.c	Wed Jul 18 15:48:30 2012
+++ new/usr/src/uts/common/fs/zfs/dbuf.c	Wed Jul 18 15:48:29 2012
@@ -328,7 +328,7 @@
 	} else if (db->db_blkid == DMU_SPILL_BLKID) {
 		ASSERT(dn != NULL);
 		ASSERT3U(db->db.db_size, >=, dn->dn_bonuslen);
-		ASSERT3U(db->db.db_offset, ==, 0);
+		ASSERT0(db->db.db_offset);
 	} else {
 		ASSERT3U(db->db.db_offset, ==, db->db_blkid * db->db.db_size);
 	}
@@ -2308,7 +2308,7 @@
 		dbuf_dirty_record_t **drp;
 
 		ASSERT(*datap != NULL);
-		ASSERT3U(db->db_level, ==, 0);
+		ASSERT0(db->db_level);
 		ASSERT3U(dn->dn_phys->dn_bonuslen, <=, DN_MAX_BONUSLEN);
 		bcopy(*datap, DN_BONUS(dn->dn_phys), dn->dn_phys->dn_bonuslen);
 		DB_DNODE_EXIT(db);
@@ -2507,7 +2507,7 @@
 	uint64_t txg = zio->io_txg;
 	dbuf_dirty_record_t **drp, *dr;
 
-	ASSERT3U(zio->io_error, ==, 0);
+	ASSERT0(zio->io_error);
 	ASSERT(db->db_blkptr == bp);
 
 	if (zio->io_flags & ZIO_FLAG_IO_REWRITE) {
--- old/usr/src/uts/common/fs/zfs/dmu_objset.c	Wed Jul 18 15:48:31 2012
+++ new/usr/src/uts/common/fs/zfs/dmu_objset.c	Wed Jul 18 15:48:30 2012
@@ -708,7 +708,7 @@
 	obj = dsl_dataset_create_sync(dd, oa->lastname,
 	    oa->clone_origin, oa->flags, oa->cr, tx);
 
-	VERIFY3U(0, ==, dsl_dataset_hold_obj(dd->dd_pool, obj, FTAG, &ds));
+	VERIFY0(dsl_dataset_hold_obj(dd->dd_pool, obj, FTAG, &ds));
 	bp = dsl_dataset_get_blkptr(ds);
 	if (BP_IS_HOLE(bp)) {
 		objset_t *os =
@@ -1173,7 +1173,7 @@
 	SET_BOOKMARK(&zb, os->os_dsl_dataset ?
 	    os->os_dsl_dataset->ds_object : DMU_META_OBJSET,
 	    ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID);
-	VERIFY3U(0, ==, arc_release_bp(os->os_phys_buf, &os->os_phys_buf,
+	VERIFY0(arc_release_bp(os->os_phys_buf, &os->os_phys_buf,
 	    os->os_rootbp, os->os_spa, &zb));
 
 	dmu_write_policy(os, NULL, 0, 0, &zp);
@@ -1269,9 +1269,9 @@
 		int64_t delta = DNODE_SIZE + used;
 		if (subtract)
 			delta = -delta;
-		VERIFY3U(0, ==, zap_increment_int(os, DMU_USERUSED_OBJECT,
+		VERIFY0(zap_increment_int(os, DMU_USERUSED_OBJECT,
 		    user, delta, tx));
-		VERIFY3U(0, ==, zap_increment_int(os, DMU_GROUPUSED_OBJECT,
+		VERIFY0(zap_increment_int(os, DMU_GROUPUSED_OBJECT,
 		    group, delta, tx));
 	}
 }
--- old/usr/src/uts/common/fs/zfs/dmu_send.c	Wed Jul 18 15:48:32 2012
+++ new/usr/src/uts/common/fs/zfs/dmu_send.c	Wed Jul 18 15:48:31 2012
@@ -57,7 +57,7 @@
 {
 	dsl_dataset_t *ds = dsp->dsa_os->os_dsl_dataset;
 	ssize_t resid; /* have to get resid to get detailed errno */
-	ASSERT3U(len % 8, ==, 0);
+	ASSERT0(len % 8);
 
 	fletcher_4_incremental_native(buf, len, &dsp->dsa_zc);
 	dsp->dsa_err = vn_rdwr(UIO_WRITE, dsp->dsa_vp,
@@ -961,7 +961,7 @@
 	int done = 0;
 
 	/* some things will require 8-byte alignment, so everything must */
-	ASSERT3U(len % 8, ==, 0);
+	ASSERT0(len % 8);
 
 	while (done < len) {
 		ssize_t resid;
@@ -1645,7 +1645,7 @@
 		(void) add_ds_to_guidmap(drc->drc_guid_to_ds_map, ds);
 	dsl_dataset_disown(ds, dmu_recv_tag);
 	myerr = dsl_dataset_destroy(drc->drc_real_ds, dmu_recv_tag, B_FALSE);
-	ASSERT3U(myerr, ==, 0);
+	ASSERT0(myerr);
 	return (err);
 }
 
--- old/usr/src/uts/common/fs/zfs/dmu_traverse.c	Wed Jul 18 15:48:33 2012
+++ new/usr/src/uts/common/fs/zfs/dmu_traverse.c	Wed Jul 18 15:48:32 2012
@@ -174,7 +174,7 @@
 traverse_pause(traverse_data_t *td, const zbookmark_t *zb)
 {
 	ASSERT(td->td_resume != NULL);
-	ASSERT3U(zb->zb_level, ==, 0);
+	ASSERT0(zb->zb_level);
 	bcopy(zb, td->td_resume, sizeof (*td->td_resume));
 }
 
--- old/usr/src/uts/common/fs/zfs/dmu_tx.c	Wed Jul 18 15:48:34 2012
+++ new/usr/src/uts/common/fs/zfs/dmu_tx.c	Wed Jul 18 15:48:33 2012
@@ -899,7 +899,7 @@
 	uint64_t memory, asize, fsize, usize;
 	uint64_t towrite, tofree, tooverwrite, tounref, tohold, fudge;
 
-	ASSERT3U(tx->tx_txg, ==, 0);
+	ASSERT0(tx->tx_txg);
 
 	if (tx->tx_err)
 		return (tx->tx_err);
--- old/usr/src/uts/common/fs/zfs/dnode.c	Wed Jul 18 15:48:35 2012
+++ new/usr/src/uts/common/fs/zfs/dnode.c	Wed Jul 18 15:48:34 2012
@@ -137,32 +137,32 @@
 		ASSERT(!list_link_active(&dn->dn_dirty_link[i]));
 		avl_destroy(&dn->dn_ranges[i]);
 		list_destroy(&dn->dn_dirty_records[i]);
-		ASSERT3U(dn->dn_next_nblkptr[i], ==, 0);
-		ASSERT3U(dn->dn_next_nlevels[i], ==, 0);
-		ASSERT3U(dn->dn_next_indblkshift[i], ==, 0);
-		ASSERT3U(dn->dn_next_bonustype[i], ==, 0);
-		ASSERT3U(dn->dn_rm_spillblk[i], ==, 0);
-		ASSERT3U(dn->dn_next_bonuslen[i], ==, 0);
-		ASSERT3U(dn->dn_next_blksz[i], ==, 0);
+		ASSERT0(dn->dn_next_nblkptr[i]);
+		ASSERT0(dn->dn_next_nlevels[i]);
+		ASSERT0(dn->dn_next_indblkshift[i]);
+		ASSERT0(dn->dn_next_bonustype[i]);
+		ASSERT0(dn->dn_rm_spillblk[i]);
+		ASSERT0(dn->dn_next_bonuslen[i]);
+		ASSERT0(dn->dn_next_blksz[i]);
 	}
 
-	ASSERT3U(dn->dn_allocated_txg, ==, 0);
-	ASSERT3U(dn->dn_free_txg, ==, 0);
-	ASSERT3U(dn->dn_assigned_txg, ==, 0);
-	ASSERT3U(dn->dn_dirtyctx, ==, 0);
+	ASSERT0(dn->dn_allocated_txg);
+	ASSERT0(dn->dn_free_txg);
+	ASSERT0(dn->dn_assigned_txg);
+	ASSERT0(dn->dn_dirtyctx);
 	ASSERT3P(dn->dn_dirtyctx_firstset, ==, NULL);
 	ASSERT3P(dn->dn_bonus, ==, NULL);
 	ASSERT(!dn->dn_have_spill);
 	ASSERT3P(dn->dn_zio, ==, NULL);
-	ASSERT3U(dn->dn_oldused, ==, 0);
-	ASSERT3U(dn->dn_oldflags, ==, 0);
-	ASSERT3U(dn->dn_olduid, ==, 0);
-	ASSERT3U(dn->dn_oldgid, ==, 0);
-	ASSERT3U(dn->dn_newuid, ==, 0);
-	ASSERT3U(dn->dn_newgid, ==, 0);
-	ASSERT3U(dn->dn_id_flags, ==, 0);
+	ASSERT0(dn->dn_oldused);
+	ASSERT0(dn->dn_oldflags);
+	ASSERT0(dn->dn_olduid);
+	ASSERT0(dn->dn_oldgid);
+	ASSERT0(dn->dn_newuid);
+	ASSERT0(dn->dn_newgid);
+	ASSERT0(dn->dn_id_flags);
 
-	ASSERT3U(dn->dn_dbufs_count, ==, 0);
+	ASSERT0(dn->dn_dbufs_count);
 	list_destroy(&dn->dn_dbufs);
 }
 
@@ -361,7 +361,7 @@
 static void
 dnode_setdblksz(dnode_t *dn, int size)
 {
-	ASSERT3U(P2PHASE(size, SPA_MINBLOCKSIZE), ==, 0);
+	ASSERT0(P2PHASE(size, SPA_MINBLOCKSIZE));
 	ASSERT3U(size, <=, SPA_MAXBLOCKSIZE);
 	ASSERT3U(size, >=, SPA_MINBLOCKSIZE);
 	ASSERT3U(size >> SPA_MINBLOCKSHIFT, <,
@@ -506,24 +506,24 @@
 	ASSERT(DMU_OT_IS_VALID(bonustype));
 	ASSERT3U(bonuslen, <=, DN_MAX_BONUSLEN);
 	ASSERT(dn->dn_type == DMU_OT_NONE);
-	ASSERT3U(dn->dn_maxblkid, ==, 0);
-	ASSERT3U(dn->dn_allocated_txg, ==, 0);
-	ASSERT3U(dn->dn_assigned_txg, ==, 0);
+	ASSERT0(dn->dn_maxblkid);
+	ASSERT0(dn->dn_allocated_txg);
+	ASSERT0(dn->dn_assigned_txg);
 	ASSERT(refcount_is_zero(&dn->dn_tx_holds));
 	ASSERT3U(refcount_count(&dn->dn_holds), <=, 1);
 	ASSERT3P(list_head(&dn->dn_dbufs), ==, NULL);
 
 	for (i = 0; i < TXG_SIZE; i++) {
-		ASSERT3U(dn->dn_next_nblkptr[i], ==, 0);
-		ASSERT3U(dn->dn_next_nlevels[i], ==, 0);
-		ASSERT3U(dn->dn_next_indblkshift[i], ==, 0);
-		ASSERT3U(dn->dn_next_bonuslen[i], ==, 0);
-		ASSERT3U(dn->dn_next_bonustype[i], ==, 0);
-		ASSERT3U(dn->dn_rm_spillblk[i], ==, 0);
-		ASSERT3U(dn->dn_next_blksz[i], ==, 0);
+		ASSERT0(dn->dn_next_nblkptr[i]);
+		ASSERT0(dn->dn_next_nlevels[i]);
+		ASSERT0(dn->dn_next_indblkshift[i]);
+		ASSERT0(dn->dn_next_bonuslen[i]);
+		ASSERT0(dn->dn_next_bonustype[i]);
+		ASSERT0(dn->dn_rm_spillblk[i]);
+		ASSERT0(dn->dn_next_blksz[i]);
 		ASSERT(!list_link_active(&dn->dn_dirty_link[i]));
 		ASSERT3P(list_head(&dn->dn_dirty_records[i]), ==, NULL);
-		ASSERT3U(avl_numnodes(&dn->dn_ranges[i]), ==, 0);
+		ASSERT0(avl_numnodes(&dn->dn_ranges[i]));
 	}
 
 	dn->dn_type = ot;
@@ -565,7 +565,7 @@
 
 	ASSERT3U(blocksize, >=, SPA_MINBLOCKSIZE);
 	ASSERT3U(blocksize, <=, SPA_MAXBLOCKSIZE);
-	ASSERT3U(blocksize % SPA_MINBLOCKSIZE, ==, 0);
+	ASSERT0(blocksize % SPA_MINBLOCKSIZE);
 	ASSERT(dn->dn_object != DMU_META_DNODE_OBJECT || dmu_tx_private_ok(tx));
 	ASSERT(tx->tx_txg != 0);
 	ASSERT((bonustype == DMU_OT_NONE && bonuslen == 0) ||
@@ -1235,9 +1235,9 @@
 
 	ASSERT(!refcount_is_zero(&dn->dn_holds) || list_head(&dn->dn_dbufs));
 	ASSERT(dn->dn_datablksz != 0);
-	ASSERT3U(dn->dn_next_bonuslen[txg&TXG_MASK], ==, 0);
-	ASSERT3U(dn->dn_next_blksz[txg&TXG_MASK], ==, 0);
-	ASSERT3U(dn->dn_next_bonustype[txg&TXG_MASK], ==, 0);
+	ASSERT0(dn->dn_next_bonuslen[txg&TXG_MASK]);
+	ASSERT0(dn->dn_next_blksz[txg&TXG_MASK]);
+	ASSERT0(dn->dn_next_bonustype[txg&TXG_MASK]);
 
 	dprintf_ds(os->os_dsl_dataset, "obj=%llu txg=%llu\n",
 	    dn->dn_object, txg);
@@ -1587,7 +1587,7 @@
 	else
 		tail = P2PHASE(len, blksz);
 
-	ASSERT3U(P2PHASE(off, blksz), ==, 0);
+	ASSERT0(P2PHASE(off, blksz));
 	/* zero out any partial block data at the end of the range */
 	if (tail) {
 		if (len < tail)
@@ -1769,7 +1769,7 @@
 	space += delta;
 	if (spa_version(dn->dn_objset->os_spa) < SPA_VERSION_DNODE_BYTES) {
 		ASSERT((dn->dn_phys->dn_flags & DNODE_FLAG_USED_BYTES) == 0);
-		ASSERT3U(P2PHASE(space, 1<<DEV_BSHIFT), ==, 0);
+		ASSERT0(P2PHASE(space, 1<<DEV_BSHIFT));
 		dn->dn_phys->dn_used = space >> DEV_BSHIFT;
 	} else {
 		dn->dn_phys->dn_used = space;
--- old/usr/src/uts/common/fs/zfs/dnode_sync.c	Wed Jul 18 15:48:36 2012
+++ new/usr/src/uts/common/fs/zfs/dnode_sync.c	Wed Jul 18 15:48:35 2012
@@ -274,7 +274,7 @@
 			continue;
 		rw_enter(&dn->dn_struct_rwlock, RW_READER);
 		err = dbuf_hold_impl(dn, db->db_level-1, i, TRUE, FTAG, &subdb);
-		ASSERT3U(err, ==, 0);
+		ASSERT0(err);
 		rw_exit(&dn->dn_struct_rwlock);
 
 		if (free_children(subdb, blkid, nblks, trunc, tx) == ALL) {
@@ -294,7 +294,7 @@
 			continue;
 		else if (i == end && !trunc)
 			continue;
-		ASSERT3U(bp->blk_birth, ==, 0);
+		ASSERT0(bp->blk_birth);
 	}
 #endif
 	ASSERT(all || blocks_freed == 0 || db->db_last_dirty);
@@ -350,7 +350,7 @@
 			continue;
 		rw_enter(&dn->dn_struct_rwlock, RW_READER);
 		err = dbuf_hold_impl(dn, dnlevel-1, i, TRUE, FTAG, &db);
-		ASSERT3U(err, ==, 0);
+		ASSERT0(err);
 		rw_exit(&dn->dn_struct_rwlock);
 
 		if (free_children(db, blkid, nblks, trunc, tx) == ALL) {
@@ -471,7 +471,7 @@
 	 * Our contents should have been freed in dnode_sync() by the
 	 * free range record inserted by the caller of dnode_free().
 	 */
-	ASSERT3U(DN_USED_BYTES(dn->dn_phys), ==, 0);
+	ASSERT0(DN_USED_BYTES(dn->dn_phys));
 	ASSERT(BP_IS_HOLE(dn->dn_phys->dn_blkptr));
 
 	dnode_undirty_dbufs(&dn->dn_dirty_records[txgoff]);
--- old/usr/src/uts/common/fs/zfs/dsl_dataset.c	Wed Jul 18 15:48:36 2012
+++ new/usr/src/uts/common/fs/zfs/dsl_dataset.c	Wed Jul 18 15:48:36 2012
@@ -831,7 +831,7 @@
 		dmu_buf_will_dirty(origin->ds_dbuf, tx);
 		origin->ds_phys->ds_num_children++;
 
-		VERIFY3U(0, ==, dsl_dataset_hold_obj(dp,
+		VERIFY0(dsl_dataset_hold_obj(dp,
 		    origin->ds_dir->dd_phys->dd_head_dataset_obj, FTAG, &ohds));
 		dsphys->ds_deadlist_obj = dsl_deadlist_clone(&ohds->ds_deadlist,
 		    dsphys->ds_prev_snap_txg, dsphys->ds_prev_snap_obj, tx);
@@ -857,7 +857,7 @@
 				    zap_create(mos,
 				    DMU_OT_DSL_CLONES, DMU_OT_NONE, 0, tx);
 			}
-			VERIFY3U(0, ==, zap_add_int(mos,
+			VERIFY0(zap_add_int(mos,
 			    origin->ds_dir->dd_phys->dd_clones, dsobj, tx));
 		}
 	}
@@ -900,8 +900,8 @@
 		dsl_dataset_t *ds;
 		objset_t *os;
 
-		VERIFY3U(0, ==, dsl_dataset_hold_obj(dp, dsobj, FTAG, &ds));
-		VERIFY3U(0, ==, dmu_objset_from_ds(ds, &os));
+		VERIFY0(dsl_dataset_hold_obj(dp, dsobj, FTAG, &ds));
+		VERIFY0(dmu_objset_from_ds(ds, &os));
 		bzero(&os->os_zil_header, sizeof (os->os_zil_header));
 		dsl_dataset_dirty(ds, tx);
 		dsl_dataset_rele(ds, FTAG);
@@ -1504,10 +1504,9 @@
 	 * remove this one.
 	 */
 	if (err != ENOENT) {
-		VERIFY3U(err, ==, 0);
+		VERIFY0(err);
 	}
-	ASSERT3U(0, ==, zap_count(mos, ds->ds_phys->ds_next_clones_obj,
-	    &count));
+	ASSERT0(zap_count(mos, ds->ds_phys->ds_next_clones_obj, &count));
 	ASSERT3U(count, <=, ds->ds_phys->ds_num_children - 2);
 }
 
@@ -1531,7 +1530,7 @@
 	    zap_cursor_advance(&zc)) {
 		dsl_dataset_t *clone;
 
-		VERIFY3U(0, ==, dsl_dataset_hold_obj(ds->ds_dir->dd_pool,
+		VERIFY0(dsl_dataset_hold_obj(ds->ds_dir->dd_pool,
 		    za.za_first_integer, FTAG, &clone));
 		if (clone->ds_dir->dd_origin_txg > mintxg) {
 			dsl_deadlist_remove_key(&clone->ds_deadlist,
@@ -1589,9 +1588,9 @@
 	poa.ds_prev = ds_prev;
 	poa.after_branch_point = after_branch_point;
 	poa.pio = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED);
-	VERIFY3U(0, ==, bpobj_iterate(&ds_next->ds_deadlist.dl_bpobj,
+	VERIFY0(bpobj_iterate(&ds_next->ds_deadlist.dl_bpobj,
 	    process_old_cb, &poa, tx));
-	VERIFY3U(zio_wait(poa.pio), ==, 0);
+	VERIFY0(zio_wait(poa.pio));
 	ASSERT3U(poa.used, ==, ds->ds_phys->ds_unique_bytes);
 
 	/* change snapused */
@@ -1626,7 +1625,7 @@
 	err = traverse_dataset(ds,
 	    ds->ds_phys->ds_prev_snap_txg, TRAVERSE_POST,
 	    kill_blkptr, &ka);
-	ASSERT3U(err, ==, 0);
+	ASSERT0(err);
 	ASSERT(!DS_UNIQUE_IS_ACCURATE(ds) || ds->ds_phys->ds_unique_bytes == 0);
 
 	return (err);
@@ -1682,7 +1681,7 @@
 		psa.psa_effective_value = 0;	/* predict default value */
 
 		dsl_dataset_set_reservation_sync(ds, &psa, tx);
-		ASSERT3U(ds->ds_reserved, ==, 0);
+		ASSERT0(ds->ds_reserved);
 	}
 
 	ASSERT(RW_WRITE_HELD(&dp->dp_config_rwlock));
@@ -1819,7 +1818,7 @@
 
 			/* Collapse range in this head. */
 			dsl_dataset_t *hds;
-			VERIFY3U(0, ==, dsl_dataset_hold_obj(dp,
+			VERIFY0(dsl_dataset_hold_obj(dp,
 			    ds->ds_dir->dd_phys->dd_head_dataset_obj,
 			    FTAG, &hds));
 			dsl_deadlist_remove_key(&hds->ds_deadlist,
@@ -1908,7 +1907,7 @@
 
 		if (ds->ds_prev != NULL) {
 			if (spa_version(dp->dp_spa) >= SPA_VERSION_DIR_CLONES) {
-				VERIFY3U(0, ==, zap_remove_int(mos,
+				VERIFY0(zap_remove_int(mos,
 				    ds->ds_prev->ds_dir->dd_phys->dd_clones,
 				    ds->ds_object, tx));
 			}
@@ -1946,7 +1945,7 @@
 
 			err = dsl_dataset_snap_lookup(ds_head,
 			    ds->ds_snapname, &val);
-			ASSERT3U(err, ==, 0);
+			ASSERT0(err);
 			ASSERT3U(val, ==, obj);
 		}
 #endif
@@ -2113,7 +2112,7 @@
 		} else if (next_clones_obj != 0) {
 			remove_from_next_clones(ds->ds_prev,
 			    dsphys->ds_next_snap_obj, tx);
-			VERIFY3U(0, ==, zap_add_int(mos,
+			VERIFY0(zap_add_int(mos,
 			    next_clones_obj, dsobj, tx));
 		}
 	}
@@ -2203,7 +2202,7 @@
 	 * Only trust it if it has the right number of entries.
 	 */
 	if (ds->ds_phys->ds_next_clones_obj != 0) {
-		ASSERT3U(0, ==, zap_count(mos, ds->ds_phys->ds_next_clones_obj,
+		ASSERT0(zap_count(mos, ds->ds_phys->ds_next_clones_obj,
 		    &count));
 	}
 	if (count != ds->ds_phys->ds_num_children - 1) {
@@ -2442,13 +2441,13 @@
 
 	VERIFY(0 == dsl_dataset_get_snapname(ds));
 	err = dsl_dataset_snap_remove(hds, ds->ds_snapname, tx);
-	ASSERT3U(err, ==, 0);
+	ASSERT0(err);
 	mutex_enter(&ds->ds_lock);
 	(void) strcpy(ds->ds_snapname, newsnapname);
 	mutex_exit(&ds->ds_lock);
 	err = zap_add(mos, hds->ds_phys->ds_snapnames_zapobj,
 	    ds->ds_snapname, 8, 1, &ds->ds_object, tx);
-	ASSERT3U(err, ==, 0);
+	ASSERT0(err);
 
 	spa_history_log_internal_ds(ds, "rename", tx,
 	    "-> @%s", newsnapname);
@@ -2806,7 +2805,7 @@
 	/* change the origin's next clone */
 	if (origin_ds->ds_phys->ds_next_clones_obj) {
 		remove_from_next_clones(origin_ds, snap->ds->ds_object, tx);
-		VERIFY3U(0, ==, zap_add_int(dp->dp_meta_objset,
+		VERIFY0(zap_add_int(dp->dp_meta_objset,
 		    origin_ds->ds_phys->ds_next_clones_obj,
 		    oldnext_obj, tx));
 	}
@@ -2823,13 +2822,13 @@
 
 	/* change dd_clone entries */
 	if (spa_version(dp->dp_spa) >= SPA_VERSION_DIR_CLONES) {
-		VERIFY3U(0, ==, zap_remove_int(dp->dp_meta_objset,
+		VERIFY0(zap_remove_int(dp->dp_meta_objset,
 		    odd->dd_phys->dd_clones, hds->ds_object, tx));
-		VERIFY3U(0, ==, zap_add_int(dp->dp_meta_objset,
+		VERIFY0(zap_add_int(dp->dp_meta_objset,
 		    pa->origin_origin->ds_dir->dd_phys->dd_clones,
 		    hds->ds_object, tx));
 
-		VERIFY3U(0, ==, zap_remove_int(dp->dp_meta_objset,
+		VERIFY0(zap_remove_int(dp->dp_meta_objset,
 		    pa->origin_origin->ds_dir->dd_phys->dd_clones,
 		    origin_head->ds_object, tx));
 		if (dd->dd_phys->dd_clones == 0) {
@@ -2836,7 +2835,7 @@
 			dd->dd_phys->dd_clones = zap_create(dp->dp_meta_objset,
 			    DMU_OT_DSL_CLONES, DMU_OT_NONE, 0, tx);
 		}
-		VERIFY3U(0, ==, zap_add_int(dp->dp_meta_objset,
+		VERIFY0(zap_add_int(dp->dp_meta_objset,
 		    dd->dd_phys->dd_clones, origin_head->ds_object, tx));
 
 	}
@@ -2889,7 +2888,7 @@
 					continue;
 				}
 
-				VERIFY3U(0, ==, dsl_dataset_hold_obj(dp,
+				VERIFY0(dsl_dataset_hold_obj(dp,
 				    za.za_first_integer, FTAG, &cnds));
 				o = cnds->ds_dir->dd_phys->dd_head_dataset_obj;
 
@@ -2902,7 +2901,7 @@
 			zap_cursor_fini(&zc);
 		}
 
-		ASSERT3U(dsl_prop_numcb(ds), ==, 0);
+		ASSERT0(dsl_prop_numcb(ds));
 	}
 
 	/*
@@ -3607,7 +3606,7 @@
 	ca->dp = ds->ds_dir->dd_pool;
 	ca->dsobj = ds->ds_object;
 	(void) strlcpy(ca->htag, htag, sizeof (ca->htag));
-	VERIFY3U(0, ==, zfs_onexit_add_cb(minor,
+	VERIFY0(zfs_onexit_add_cb(minor,
 	    dsl_dataset_user_release_onexit, ca, NULL));
 }
 
--- old/usr/src/uts/common/fs/zfs/dsl_deadlist.c	Wed Jul 18 15:48:38 2012
+++ new/usr/src/uts/common/fs/zfs/dsl_deadlist.c	Wed Jul 18 15:48:37 2012
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
 #include <sys/dsl_dataset.h>
@@ -82,7 +82,7 @@
 	    zap_cursor_advance(&zc)) {
 		dsl_deadlist_entry_t *dle = kmem_alloc(sizeof (*dle), KM_SLEEP);
 		dle->dle_mintxg = strtonum(za.za_name, NULL);
-		VERIFY3U(0, ==, bpobj_open(&dle->dle_bpobj, dl->dl_os,
+		VERIFY0(bpobj_open(&dle->dle_bpobj, dl->dl_os,
 		    za.za_first_integer));
 		avl_add(&dl->dl_tree, dle);
 	}
@@ -98,13 +98,13 @@
 	mutex_init(&dl->dl_lock, NULL, MUTEX_DEFAULT, NULL);
 	dl->dl_os = os;
 	dl->dl_object = object;
-	VERIFY3U(0, ==, dmu_bonus_hold(os, object, dl, &dl->dl_dbuf));
+	VERIFY0(dmu_bonus_hold(os, object, dl, &dl->dl_dbuf));
 	dmu_object_info_from_db(dl->dl_dbuf, &doi);
 	if (doi.doi_type == DMU_OT_BPOBJ) {
 		dmu_buf_rele(dl->dl_dbuf, dl);
 		dl->dl_dbuf = NULL;
 		dl->dl_oldfmt = B_TRUE;
-		VERIFY3U(0, ==, bpobj_open(&dl->dl_bpobj, os, object));
+		VERIFY0(bpobj_open(&dl->dl_bpobj, os, object));
 		return;
 	}
 
@@ -155,7 +155,7 @@
 	zap_cursor_t zc;
 	zap_attribute_t za;
 
-	VERIFY3U(0, ==, dmu_object_info(os, dlobj, &doi));
+	VERIFY0(dmu_object_info(os, dlobj, &doi));
 	if (doi.doi_type == DMU_OT_BPOBJ) {
 		bpobj_free(os, dlobj, tx);
 		return;
@@ -166,7 +166,7 @@
 	    zap_cursor_advance(&zc))
 		bpobj_free(os, za.za_first_integer, tx);
 	zap_cursor_fini(&zc);
-	VERIFY3U(0, ==, dmu_object_free(os, dlobj, tx));
+	VERIFY0(dmu_object_free(os, dlobj, tx));
 }
 
 void
@@ -218,10 +218,10 @@
 	dle = kmem_alloc(sizeof (*dle), KM_SLEEP);
 	dle->dle_mintxg = mintxg;
 	obj = bpobj_alloc(dl->dl_os, SPA_MAXBLOCKSIZE, tx);
-	VERIFY3U(0, ==, bpobj_open(&dle->dle_bpobj, dl->dl_os, obj));
+	VERIFY0(bpobj_open(&dle->dle_bpobj, dl->dl_os, obj));
 	avl_add(&dl->dl_tree, dle);
 
-	VERIFY3U(0, ==, zap_add_int_key(dl->dl_os, dl->dl_object,
+	VERIFY0(zap_add_int_key(dl->dl_os, dl->dl_object,
 	    mintxg, obj, tx));
 }
 
@@ -250,7 +250,7 @@
 	bpobj_close(&dle->dle_bpobj);
 	kmem_free(dle, sizeof (*dle));
 
-	VERIFY3U(0, ==, zap_remove_int(dl->dl_os, dl->dl_object, mintxg, tx));
+	VERIFY0(zap_remove_int(dl->dl_os, dl->dl_object, mintxg, tx));
 }
 
 /*
@@ -271,7 +271,7 @@
 
 	while (mrs_obj != 0) {
 		dsl_dataset_t *ds;
-		VERIFY3U(0, ==, dsl_dataset_hold_obj(dp, mrs_obj, FTAG, &ds));
+		VERIFY0(dsl_dataset_hold_obj(dp, mrs_obj, FTAG, &ds));
 		dsl_deadlist_add_key(&dl, ds->ds_phys->ds_prev_snap_txg, tx);
 		mrs_obj = ds->ds_phys->ds_prev_snap_obj;
 		dsl_dataset_rele(ds, FTAG);
@@ -303,7 +303,7 @@
 			break;
 
 		obj = bpobj_alloc(dl->dl_os, SPA_MAXBLOCKSIZE, tx);
-		VERIFY3U(0, ==, zap_add_int_key(dl->dl_os, newobj,
+		VERIFY0(zap_add_int_key(dl->dl_os, newobj,
 		    dle->dle_mintxg, obj, tx));
 	}
 	return (newobj);
@@ -314,7 +314,7 @@
     uint64_t *usedp, uint64_t *compp, uint64_t *uncompp)
 {
 	if (dl->dl_oldfmt) {
-		VERIFY3U(0, ==, bpobj_space(&dl->dl_bpobj,
+		VERIFY0(bpobj_space(&dl->dl_bpobj,
 		    usedp, compp, uncompp));
 		return;
 	}
@@ -341,7 +341,7 @@
 	avl_index_t where;
 
 	if (dl->dl_oldfmt) {
-		VERIFY3U(0, ==, bpobj_space_range(&dl->dl_bpobj,
+		VERIFY0(bpobj_space_range(&dl->dl_bpobj,
 		    mintxg, maxtxg, usedp, compp, uncompp));
 		return;
 	}
@@ -363,7 +363,7 @@
 	    dle = AVL_NEXT(&dl->dl_tree, dle)) {
 		uint64_t used, comp, uncomp;
 
-		VERIFY3U(0, ==, bpobj_space(&dle->dle_bpobj,
+		VERIFY0(bpobj_space(&dle->dle_bpobj,
 		    &used, &comp, &uncomp));
 
 		*usedp += used;
@@ -383,8 +383,8 @@
 	uint64_t used, comp, uncomp;
 	bpobj_t bpo;
 
-	VERIFY3U(0, ==, bpobj_open(&bpo, dl->dl_os, obj));
-	VERIFY3U(0, ==, bpobj_space(&bpo, &used, &comp, &uncomp));
+	VERIFY0(bpobj_open(&bpo, dl->dl_os, obj));
+	VERIFY0(bpobj_space(&bpo, &used, &comp, &uncomp));
 	bpobj_close(&bpo);
 
 	dsl_deadlist_load_tree(dl);
@@ -424,11 +424,11 @@
 	dsl_deadlist_phys_t *dlp;
 	dmu_object_info_t doi;
 
-	VERIFY3U(0, ==, dmu_object_info(dl->dl_os, obj, &doi));
+	VERIFY0(dmu_object_info(dl->dl_os, obj, &doi));
 	if (doi.doi_type == DMU_OT_BPOBJ) {
 		bpobj_t bpo;
-		VERIFY3U(0, ==, bpobj_open(&bpo, dl->dl_os, obj));
-		VERIFY3U(0, ==, bpobj_iterate(&bpo,
+		VERIFY0(bpobj_open(&bpo, dl->dl_os, obj));
+		VERIFY0(bpobj_iterate(&bpo,
 		    dsl_deadlist_insert_cb, dl, tx));
 		bpobj_close(&bpo);
 		return;
@@ -439,11 +439,11 @@
 	    zap_cursor_advance(&zc)) {
 		uint64_t mintxg = strtonum(za.za_name, NULL);
 		dsl_deadlist_insert_bpobj(dl, za.za_first_integer, mintxg, tx);
-		VERIFY3U(0, ==, zap_remove_int(dl->dl_os, obj, mintxg, tx));
+		VERIFY0(zap_remove_int(dl->dl_os, obj, mintxg, tx));
 	}
 	zap_cursor_fini(&zc);
 
-	VERIFY3U(0, ==, dmu_bonus_hold(dl->dl_os, obj, FTAG, &bonus));
+	VERIFY0(dmu_bonus_hold(dl->dl_os, obj, FTAG, &bonus));
 	dlp = bonus->db_data;
 	dmu_buf_will_dirty(bonus, tx);
 	bzero(dlp, sizeof (*dlp));
@@ -475,7 +475,7 @@
 
 		bpobj_enqueue_subobj(bpo, dle->dle_bpobj.bpo_object, tx);
 
-		VERIFY3U(0, ==, bpobj_space(&dle->dle_bpobj,
+		VERIFY0(bpobj_space(&dle->dle_bpobj,
 		    &used, &comp, &uncomp));
 		mutex_enter(&dl->dl_lock);
 		ASSERT3U(dl->dl_phys->dl_used, >=, used);
@@ -486,7 +486,7 @@
 		dl->dl_phys->dl_uncomp -= uncomp;
 		mutex_exit(&dl->dl_lock);
 
-		VERIFY3U(0, ==, zap_remove_int(dl->dl_os, dl->dl_object,
+		VERIFY0(zap_remove_int(dl->dl_os, dl->dl_object,
 		    dle->dle_mintxg, tx));
 
 		dle_next = AVL_NEXT(&dl->dl_tree, dle);
--- old/usr/src/uts/common/fs/zfs/dsl_dir.c	Wed Jul 18 15:48:38 2012
+++ new/usr/src/uts/common/fs/zfs/dsl_dir.c	Wed Jul 18 15:48:38 2012
@@ -491,10 +491,10 @@
 	 */
 	dsl_dir_set_reservation_sync_impl(dd, 0, tx);
 
-	ASSERT3U(dd->dd_phys->dd_used_bytes, ==, 0);
-	ASSERT3U(dd->dd_phys->dd_reserved, ==, 0);
+	ASSERT0(dd->dd_phys->dd_used_bytes);
+	ASSERT0(dd->dd_phys->dd_reserved);
 	for (t = 0; t < DD_USED_NUM; t++)
-		ASSERT3U(dd->dd_phys->dd_used_breakdown[t], ==, 0);
+		ASSERT0(dd->dd_phys->dd_used_breakdown[t]);
 
 	VERIFY(0 == zap_destroy(mos, dd->dd_phys->dd_child_dir_zapobj, tx));
 	VERIFY(0 == zap_destroy(mos, dd->dd_phys->dd_props_zapobj, tx));
@@ -585,7 +585,7 @@
 	dmu_buf_will_dirty(dd->dd_dbuf, tx);
 
 	mutex_enter(&dd->dd_lock);
-	ASSERT3U(dd->dd_tempreserved[tx->tx_txg&TXG_MASK], ==, 0);
+	ASSERT0(dd->dd_tempreserved[tx->tx_txg&TXG_MASK]);
 	dprintf_dd(dd, "txg=%llu towrite=%lluK\n", tx->tx_txg,
 	    dd->dd_space_towrite[tx->tx_txg&TXG_MASK] / 1024);
 	dd->dd_space_towrite[tx->tx_txg&TXG_MASK] = 0;
@@ -1334,7 +1334,7 @@
 	/* remove from old parent zapobj */
 	err = zap_remove(mos, dd->dd_parent->dd_phys->dd_child_dir_zapobj,
 	    dd->dd_myname, tx);
-	ASSERT3U(err, ==, 0);
+	ASSERT0(err);
 
 	(void) strcpy(dd->dd_myname, ra->mynewname);
 	dsl_dir_close(dd->dd_parent, dd);
@@ -1345,7 +1345,7 @@
 	/* add to new parent zapobj */
 	err = zap_add(mos, ra->newparent->dd_phys->dd_child_dir_zapobj,
 	    dd->dd_myname, 8, 1, &dd->dd_object, tx);
-	ASSERT3U(err, ==, 0);
+	ASSERT0(err);
 
 }
 
--- old/usr/src/uts/common/fs/zfs/dsl_pool.c	Wed Jul 18 15:48:39 2012
+++ new/usr/src/uts/common/fs/zfs/dsl_pool.c	Wed Jul 18 15:48:39 2012
@@ -170,7 +170,7 @@
 		    DMU_POOL_FREE_BPOBJ, sizeof (uint64_t), 1, &obj);
 		if (err)
 			goto out;
-		VERIFY3U(0, ==, bpobj_open(&dp->dp_free_bpobj,
+		VERIFY0(bpobj_open(&dp->dp_free_bpobj,
 		    dp->dp_meta_objset, obj));
 	}
 
@@ -256,10 +256,10 @@
 	/* create the pool directory */
 	err = zap_create_claim(dp->dp_meta_objset, DMU_POOL_DIRECTORY_OBJECT,
 	    DMU_OT_OBJECT_DIRECTORY, DMU_OT_NONE, 0, tx);
-	ASSERT3U(err, ==, 0);
+	ASSERT0(err);
 
 	/* Initialize scan structures */
-	VERIFY3U(0, ==, dsl_scan_init(dp, txg));
+	VERIFY0(dsl_scan_init(dp, txg));
 
 	/* create and open the root dir */
 	dp->dp_root_dir_obj = dsl_dir_create_sync(dp, NULL, NULL, tx);
@@ -282,7 +282,7 @@
 		obj = bpobj_alloc(dp->dp_meta_objset, SPA_MAXBLOCKSIZE, tx);
 		VERIFY(zap_add(dp->dp_meta_objset, DMU_POOL_DIRECTORY_OBJECT,
 		    DMU_POOL_FREE_BPOBJ, sizeof (uint64_t), 1, &obj, tx) == 0);
-		VERIFY3U(0, ==, bpobj_open(&dp->dp_free_bpobj,
+		VERIFY0(bpobj_open(&dp->dp_free_bpobj,
 		    dp->dp_meta_objset, obj));
 	}
 
@@ -674,7 +674,7 @@
 	ASSERT(dmu_tx_is_syncing(tx));
 	ASSERT(dp->dp_origin_snap != NULL);
 
-	VERIFY3U(0, ==, dmu_objset_find_spa(dp->dp_spa, NULL, upgrade_clones_cb,
+	VERIFY0(dmu_objset_find_spa(dp->dp_spa, NULL, upgrade_clones_cb,
 	    tx, DS_FIND_CHILDREN));
 }
 
@@ -687,12 +687,12 @@
 	dsl_pool_t *dp = spa_get_dsl(spa);
 	objset_t *mos = dp->dp_meta_objset;
 
-	VERIFY3U(0, ==, dsl_dataset_hold_obj(dp, dsobj, FTAG, &ds));
+	VERIFY0(dsl_dataset_hold_obj(dp, dsobj, FTAG, &ds));
 
 	if (ds->ds_dir->dd_phys->dd_origin_obj) {
 		dsl_dataset_t *origin;
 
-		VERIFY3U(0, ==, dsl_dataset_hold_obj(dp,
+		VERIFY0(dsl_dataset_hold_obj(dp,
 		    ds->ds_dir->dd_phys->dd_origin_obj, FTAG, &origin));
 
 		if (origin->ds_dir->dd_phys->dd_clones == 0) {
@@ -701,7 +701,7 @@
 			    DMU_OT_DSL_CLONES, DMU_OT_NONE, 0, tx);
 		}
 
-		VERIFY3U(0, ==, zap_add_int(dp->dp_meta_objset,
+		VERIFY0(zap_add_int(dp->dp_meta_objset,
 		    origin->ds_dir->dd_phys->dd_clones, dsobj, tx));
 
 		dsl_dataset_rele(origin, FTAG);
@@ -728,12 +728,12 @@
 	 */
 	obj = dmu_object_alloc(dp->dp_meta_objset, DMU_OT_BPOBJ,
 	    SPA_MAXBLOCKSIZE, DMU_OT_BPOBJ_HDR, sizeof (bpobj_phys_t), tx);
-	VERIFY3U(0, ==, zap_add(dp->dp_meta_objset, DMU_POOL_DIRECTORY_OBJECT,
+	VERIFY0(zap_add(dp->dp_meta_objset, DMU_POOL_DIRECTORY_OBJECT,
 	    DMU_POOL_FREE_BPOBJ, sizeof (uint64_t), 1, &obj, tx));
-	VERIFY3U(0, ==, bpobj_open(&dp->dp_free_bpobj,
+	VERIFY0(bpobj_open(&dp->dp_free_bpobj,
 	    dp->dp_meta_objset, obj));
 
-	VERIFY3U(0, ==, dmu_objset_find_spa(dp->dp_spa, NULL,
+	VERIFY0(dmu_objset_find_spa(dp->dp_spa, NULL,
 	    upgrade_dir_clones_cb, tx, DS_FIND_CHILDREN));
 }
 
--- old/usr/src/uts/common/fs/zfs/dsl_scan.c	Wed Jul 18 15:48:40 2012
+++ new/usr/src/uts/common/fs/zfs/dsl_scan.c	Wed Jul 18 15:48:40 2012
@@ -842,7 +842,7 @@
 	} 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)) {
 			/*
@@ -894,7 +894,7 @@
 		    (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,
@@ -937,7 +937,7 @@
 
 		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);
@@ -956,7 +956,7 @@
 	    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));
@@ -1014,7 +1014,7 @@
 	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;
@@ -1308,11 +1308,11 @@
 		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,
@@ -1434,7 +1434,7 @@
 		    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])) {
@@ -1444,7 +1444,7 @@
 			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;
 
@@ -1453,10 +1453,10 @@
 			    &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;
 		}
--- old/usr/src/uts/common/fs/zfs/dsl_synctask.c	Wed Jul 18 15:48:41 2012
+++ new/usr/src/uts/common/fs/zfs/dsl_synctask.c	Wed Jul 18 15:48:41 2012
@@ -163,7 +163,7 @@
 	dsl_pool_t *dp = dstg->dstg_pool;
 	uint64_t quota, used;
 
-	ASSERT3U(dstg->dstg_err, ==, 0);
+	ASSERT0(dstg->dstg_err);
 
 	/*
 	 * Check for sufficient space.  We just check against what's
--- old/usr/src/uts/common/fs/zfs/metaslab.c	Wed Jul 18 15:48:42 2012
+++ new/usr/src/uts/common/fs/zfs/metaslab.c	Wed Jul 18 15:48:41 2012
@@ -769,7 +769,7 @@
 	for (int t = 0; t < TXG_DEFER_SIZE; t++)
 		space_map_destroy(&msp->ms_defermap[t]);
 
-	ASSERT3S(msp->ms_deferspace, ==, 0);
+	ASSERT0(msp->ms_deferspace);
 
 	mutex_exit(&msp->ms_lock);
 	mutex_destroy(&msp->ms_lock);
--- old/usr/src/uts/common/fs/zfs/spa.c	Wed Jul 18 15:48:43 2012
+++ new/usr/src/uts/common/fs/zfs/spa.c	Wed Jul 18 15:48:42 2012
@@ -2956,7 +2956,7 @@
 		    zap_cursor_advance(&zc)) {
 			ASSERT(za.za_integer_length == sizeof (uint64_t) &&
 			    za.za_num_integers == 1);
-			VERIFY3U(0, ==, nvlist_add_uint64(features, za.za_name,
+			VERIFY0(nvlist_add_uint64(features, za.za_name,
 			    za.za_first_integer));
 		}
 		zap_cursor_fini(&zc);
@@ -2969,7 +2969,7 @@
 		    zap_cursor_advance(&zc)) {
 			ASSERT(za.za_integer_length == sizeof (uint64_t) &&
 			    za.za_num_integers == 1);
-			VERIFY3U(0, ==, nvlist_add_uint64(features, za.za_name,
+			VERIFY0(nvlist_add_uint64(features, za.za_name,
 			    za.za_first_integer));
 		}
 		zap_cursor_fini(&zc);
@@ -3410,7 +3410,7 @@
 	    sizeof (uint64_t), 1, &obj, tx) != 0) {
 		cmn_err(CE_PANIC, "failed to add bpobj");
 	}
-	VERIFY3U(0, ==, bpobj_open(&spa->spa_deferred_bpobj,
+	VERIFY0(bpobj_open(&spa->spa_deferred_bpobj,
 	    spa->spa_meta_objset, obj));
 
 	/*
@@ -4985,7 +4985,7 @@
 	 * The evacuation succeeded.  Remove any remaining MOS metadata
 	 * associated with this vdev, and wait for these changes to sync.
 	 */
-	ASSERT3U(vd->vdev_stat.vs_alloc, ==, 0);
+	ASSERT0(vd->vdev_stat.vs_alloc);
 	txg = spa_vdev_config_enter(spa);
 	vd->vdev_removing = B_TRUE;
 	vdev_dirty(vd, 0, NULL, txg);
@@ -5732,7 +5732,7 @@
 			ASSERT(zpool_prop_feature(nvpair_name(elem)));
 
 			fname = strchr(nvpair_name(elem), '@') + 1;
-			VERIFY3U(0, ==, zfeature_lookup_name(fname, &feature));
+			VERIFY0(zfeature_lookup_name(fname, &feature));
 
 			spa_feature_enable(spa, feature, tx);
 			spa_history_log_internal(spa, "set", tx,
@@ -5977,7 +5977,7 @@
 		zio_t *zio = zio_root(spa, NULL, NULL, 0);
 		VERIFY3U(bpobj_iterate(defer_bpo,
 		    spa_free_sync_cb, zio, tx), ==, 0);
-		VERIFY3U(zio_wait(zio), ==, 0);
+		VERIFY0(zio_wait(zio));
 	}
 
 	/*
--- old/usr/src/uts/common/fs/zfs/space_map.c	Wed Jul 18 15:48:44 2012
+++ new/usr/src/uts/common/fs/zfs/space_map.c	Wed Jul 18 15:48:44 2012
@@ -21,8 +21,13 @@
 /*
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ *
  */
 
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
 #include <sys/zfs_context.h>
 #include <sys/spa.h>
 #include <sys/dmu.h>
@@ -73,7 +78,7 @@
 space_map_destroy(space_map_t *sm)
 {
 	ASSERT(!sm->sm_loaded && !sm->sm_loading);
-	VERIFY3U(sm->sm_space, ==, 0);
+	VERIFY0(sm->sm_space);
 	avl_destroy(&sm->sm_root);
 	cv_destroy(&sm->sm_load_cv);
 }
@@ -286,7 +291,7 @@
 	space = smo->smo_alloc;
 
 	ASSERT(sm->sm_ops == NULL);
-	VERIFY3U(sm->sm_space, ==, 0);
+	VERIFY0(sm->sm_space);
 
 	if (maptype == SM_FREE) {
 		space_map_add(sm, sm->sm_start, sm->sm_size);
@@ -475,7 +480,7 @@
 
 	zio_buf_free(entry_map, bufsize);
 
-	VERIFY3U(sm->sm_space, ==, 0);
+	VERIFY0(sm->sm_space);
 }
 
 void
--- old/usr/src/uts/common/fs/zfs/vdev.c	Wed Jul 18 15:48:45 2012
+++ new/usr/src/uts/common/fs/zfs/vdev.c	Wed Jul 18 15:48:45 2012
@@ -592,9 +592,9 @@
 		metaslab_group_destroy(vd->vdev_mg);
 	}
 
-	ASSERT3U(vd->vdev_stat.vs_space, ==, 0);
-	ASSERT3U(vd->vdev_stat.vs_dspace, ==, 0);
-	ASSERT3U(vd->vdev_stat.vs_alloc, ==, 0);
+	ASSERT0(vd->vdev_stat.vs_space);
+	ASSERT0(vd->vdev_stat.vs_dspace);
+	ASSERT0(vd->vdev_stat.vs_alloc);
 
 	/*
 	 * Remove this vdev from its parent's child list.
@@ -1805,7 +1805,7 @@
 	if (vd->vdev_detached) {
 		if (smo->smo_object != 0) {
 			int err = dmu_object_free(mos, smo->smo_object, tx);
-			ASSERT3U(err, ==, 0);
+			ASSERT0(err);
 			smo->smo_object = 0;
 		}
 		dmu_tx_commit(tx);
@@ -2005,7 +2005,7 @@
 	tx = dmu_tx_create_assigned(spa_get_dsl(spa), txg);
 
 	if (vd->vdev_dtl_smo.smo_object) {
-		ASSERT3U(vd->vdev_dtl_smo.smo_alloc, ==, 0);
+		ASSERT0(vd->vdev_dtl_smo.smo_alloc);
 		(void) dmu_object_free(mos, vd->vdev_dtl_smo.smo_object, tx);
 		vd->vdev_dtl_smo.smo_object = 0;
 	}
@@ -2017,7 +2017,7 @@
 			if (msp == NULL || msp->ms_smo.smo_object == 0)
 				continue;
 
-			ASSERT3U(msp->ms_smo.smo_alloc, ==, 0);
+			ASSERT0(msp->ms_smo.smo_alloc);
 			(void) dmu_object_free(mos, msp->ms_smo.smo_object, tx);
 			msp->ms_smo.smo_object = 0;
 		}
@@ -2295,7 +2295,7 @@
 				(void) spa_vdev_state_exit(spa, vd, 0);
 				goto top;
 			}
-			ASSERT3U(tvd->vdev_stat.vs_alloc, ==, 0);
+			ASSERT0(tvd->vdev_stat.vs_alloc);
 		}
 
 		/*
--- old/usr/src/uts/common/fs/zfs/vdev_raidz.c	Wed Jul 18 15:48:46 2012
+++ new/usr/src/uts/common/fs/zfs/vdev_raidz.c	Wed Jul 18 15:48:46 2012
@@ -281,7 +281,7 @@
 {
 	raidz_map_t *rm = zio->io_vsd;
 
-	ASSERT3U(rm->rm_freed, ==, 0);
+	ASSERT0(rm->rm_freed);
 	rm->rm_freed = 1;
 
 	if (rm->rm_reports == 0)
@@ -1134,7 +1134,7 @@
 	 */
 	for (i = 0; i < nmissing; i++) {
 		for (j = 0; j < missing[i]; j++) {
-			ASSERT3U(rows[i][j], ==, 0);
+			ASSERT0(rows[i][j]);
 		}
 		ASSERT3U(rows[i][missing[i]], !=, 0);
 
@@ -1175,7 +1175,7 @@
 			if (j == missing[i]) {
 				ASSERT3U(rows[i][j], ==, 1);
 			} else {
-				ASSERT3U(rows[i][j], ==, 0);
+				ASSERT0(rows[i][j]);
 			}
 		}
 	}
--- old/usr/src/uts/common/fs/zfs/zap.c	Wed Jul 18 15:48:47 2012
+++ new/usr/src/uts/common/fs/zfs/zap.c	Wed Jul 18 15:48:47 2012
@@ -162,7 +162,7 @@
 	} else {
 		newblk = zap_allocate_blocks(zap, tbl->zt_numblks * 2);
 		tbl->zt_nextblk = newblk;
-		ASSERT3U(tbl->zt_blks_copied, ==, 0);
+		ASSERT0(tbl->zt_blks_copied);
 		dmu_prefetch(zap->zap_objset, zap->zap_object,
 		    tbl->zt_blk << bs, tbl->zt_numblks << bs);
 	}
@@ -339,7 +339,7 @@
 
 		ASSERT3U(zap->zap_f.zap_phys->zap_ptrtbl.zt_shift, ==,
 		    ZAP_EMBEDDED_PTRTBL_SHIFT(zap));
-		ASSERT3U(zap->zap_f.zap_phys->zap_ptrtbl.zt_blk, ==, 0);
+		ASSERT0(zap->zap_f.zap_phys->zap_ptrtbl.zt_blk);
 
 		newblk = zap_allocate_blocks(zap, 1);
 		err = dmu_buf_hold(zap->zap_objset, zap->zap_object,
@@ -475,7 +475,7 @@
 	 * chain.  There should be no chained leafs (as we have removed
 	 * support for them).
 	 */
-	ASSERT3U(l->l_phys->l_hdr.lh_pad1, ==, 0);
+	ASSERT0(l->l_phys->l_hdr.lh_pad1);
 
 	/*
 	 * There should be more hash entries than there can be
@@ -658,9 +658,9 @@
 	zap_leaf_split(l, nl, zap->zap_normflags != 0);
 
 	/* set sibling pointers */
-	for (i = 0; i < (1ULL<<prefix_diff); i++) {
+	for (i = 0; i < (1ULL << prefix_diff); i++) {
 		err = zap_set_idx_to_blk(zap, sibling+i, nl->l_blkid, tx);
-		ASSERT3U(err, ==, 0); /* we checked for i/o errors above */
+		ASSERT0(err); /* we checked for i/o errors above */
 	}
 
 	if (hash & (1ULL << (64 - l->l_phys->l_hdr.lh_prefix_len))) {
--- old/usr/src/uts/common/fs/zfs/zap_micro.c	Wed Jul 18 15:48:48 2012
+++ new/usr/src/uts/common/fs/zfs/zap_micro.c	Wed Jul 18 15:48:48 2012
@@ -506,7 +506,7 @@
 			return (mzap_upgrade(zapp, tx, 0));
 		}
 		err = dmu_object_set_blocksize(os, obj, newsz, 0, tx);
-		ASSERT3U(err, ==, 0);
+		ASSERT0(err);
 		zap->zap_m.zap_num_chunks =
 		    db->db_size / MZAP_ENT_LEN - 1;
 	}
@@ -601,7 +601,7 @@
 		/* Only fat zap supports flags; upgrade immediately. */
 		VERIFY(0 == zap_lockdir(os, obj, tx, RW_WRITER,
 		    B_FALSE, B_FALSE, &zap));
-		VERIFY3U(0, ==, mzap_upgrade(&zap, tx, flags));
+		VERIFY0(mzap_upgrade(&zap, tx, flags));
 		zap_unlockdir(zap);
 	}
 }
--- old/usr/src/uts/common/fs/zfs/zfeature.c	Wed Jul 18 15:48:49 2012
+++ new/usr/src/uts/common/fs/zfs/zfeature.c	Wed Jul 18 15:48:48 2012
@@ -346,7 +346,7 @@
 spa_feature_enable(spa_t *spa, zfeature_info_t *feature, dmu_tx_t *tx)
 {
 	ASSERT3U(spa_version(spa), >=, SPA_VERSION_FEATURES);
-	VERIFY3U(0, ==, feature_do_action(spa->spa_meta_objset,
+	VERIFY0(feature_do_action(spa->spa_meta_objset,
 	    spa->spa_feat_for_read_obj, spa->spa_feat_for_write_obj,
 	    spa->spa_feat_desc_obj, feature, FEATURE_ACTION_ENABLE, tx));
 }
@@ -361,7 +361,7 @@
 spa_feature_incr(spa_t *spa, zfeature_info_t *feature, dmu_tx_t *tx)
 {
 	ASSERT3U(spa_version(spa), >=, SPA_VERSION_FEATURES);
-	VERIFY3U(0, ==, feature_do_action(spa->spa_meta_objset,
+	VERIFY0(feature_do_action(spa->spa_meta_objset,
 	    spa->spa_feat_for_read_obj, spa->spa_feat_for_write_obj,
 	    spa->spa_feat_desc_obj, feature, FEATURE_ACTION_INCR, tx));
 }
@@ -376,7 +376,7 @@
 spa_feature_decr(spa_t *spa, zfeature_info_t *feature, dmu_tx_t *tx)
 {
 	ASSERT3U(spa_version(spa), >=, SPA_VERSION_FEATURES);
-	VERIFY3U(0, ==, feature_do_action(spa->spa_meta_objset,
+	VERIFY0(feature_do_action(spa->spa_meta_objset,
 	    spa->spa_feat_for_read_obj, spa->spa_feat_for_write_obj,
 	    spa->spa_feat_desc_obj, feature, FEATURE_ACTION_DECR, tx));
 }
--- old/usr/src/uts/common/fs/zfs/zfs_debug.c	Wed Jul 18 15:48:50 2012
+++ new/usr/src/uts/common/fs/zfs/zfs_debug.c	Wed Jul 18 15:48:49 2012
@@ -20,8 +20,10 @@
  */
 /*
  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
+
 #include <sys/zfs_context.h>
 
 list_t zfs_dbgmsgs;
@@ -48,12 +50,12 @@
 		zfs_dbgmsg_size -= size;
 	}
 	mutex_destroy(&zfs_dbgmsgs_lock);
-	ASSERT3U(zfs_dbgmsg_size, ==, 0);
+	ASSERT0(zfs_dbgmsg_size);
 }
 
 /*
  * Print these messages by running:
- * 	echo ::zfs_dbgmsg | mdb -k
+ * echo ::zfs_dbgmsg | mdb -k
  *
  * Monitor these messages by running:
  * 	dtrace -q -n 'zfs-dbgmsg{printf("%s\n", stringof(arg0))}'
--- old/usr/src/uts/common/fs/zfs/zfs_dir.c	Wed Jul 18 15:48:51 2012
+++ new/usr/src/uts/common/fs/zfs/zfs_dir.c	Wed Jul 18 15:48:50 2012
@@ -20,6 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
 #include <sys/types.h>
@@ -454,8 +455,8 @@
 	ASSERT(zp->z_unlinked);
 	ASSERT(zp->z_links == 0);
 
-	VERIFY3U(0, ==,
-	    zap_add_int(zfsvfs->z_os, zfsvfs->z_unlinkedobj, zp->z_id, tx));
+	VERIFY0(zap_add_int(zfsvfs->z_os, zfsvfs->z_unlinkedobj,
+	    zp->z_id, tx));
 }
 
 /*
@@ -671,8 +672,8 @@
 	}
 
 	/* Remove this znode from the unlinked set */
-	VERIFY3U(0, ==,
-	    zap_remove_int(zfsvfs->z_os, zfsvfs->z_unlinkedobj, zp->z_id, tx));
+	VERIFY0(zap_remove_int(zfsvfs->z_os, zfsvfs->z_unlinkedobj,
+	    xzp->z_id, tx));
 
 	zfs_znode_delete(zp, tx);
 
--- old/usr/src/uts/common/fs/zfs/zfs_ioctl.c	Wed Jul 18 15:48:52 2012
+++ new/usr/src/uts/common/fs/zfs/zfs_ioctl.c	Wed Jul 18 15:48:51 2012
@@ -1958,7 +1958,7 @@
 			error = zvol_get_stats(os, nv);
 			if (error == EIO)
 				return (error);
-			VERIFY3S(error, ==, 0);
+			VERIFY0(error);
 		}
 		error = put_nvlist(zc, nv);
 		nvlist_free(nv);
--- old/usr/src/uts/common/fs/zfs/zfs_rlock.c	Wed Jul 18 15:48:53 2012
+++ new/usr/src/uts/common/fs/zfs/zfs_rlock.c	Wed Jul 18 15:48:52 2012
@@ -24,6 +24,12 @@
  */
 
 /*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+
+
+/*
  * This file contains the code to implement file range locking in
  * ZFS, although there isn't much specific to ZFS (all that comes to mind
  * support for growing the blocksize).
@@ -481,9 +487,9 @@
 			cv_destroy(&remove->r_rd_cv);
 		}
 	} else {
-		ASSERT3U(remove->r_cnt, ==, 0);
-		ASSERT3U(remove->r_write_wanted, ==, 0);
-		ASSERT3U(remove->r_read_wanted, ==, 0);
+		ASSERT0(remove->r_cnt);
+		ASSERT0(remove->r_write_wanted);
+		ASSERT0(remove->r_read_wanted);
 		/*
 		 * Find start proxy representing this reader lock,
 		 * then decrement ref count on all proxies
--- old/usr/src/uts/common/fs/zfs/zfs_vfsops.c	Wed Jul 18 15:48:54 2012
+++ new/usr/src/uts/common/fs/zfs/zfs_vfsops.c	Wed Jul 18 15:48:53 2012
@@ -2243,7 +2243,7 @@
 
 		error = zap_add(os, MASTER_NODE_OBJ,
 		    ZFS_SA_ATTRS, 8, 1, &sa_obj, tx);
-		ASSERT3U(error, ==, 0);
+		ASSERT0(error);
 
 		VERIFY(0 == sa_set_sa_object(os, sa_obj));
 		sa_register_update_callback(os, zfs_sa_upgrade);
--- old/usr/src/uts/common/fs/zfs/zfs_vnops.c	Wed Jul 18 15:48:55 2012
+++ new/usr/src/uts/common/fs/zfs/zfs_vnops.c	Wed Jul 18 15:48:54 2012
@@ -20,8 +20,12 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
+
+
+
 /* Portions Copyright 2007 Jeremy Teo */
 /* Portions Copyright 2010 Robert Milkowski */
 
@@ -1641,7 +1645,7 @@
 	    &xattr_obj, sizeof (xattr_obj));
 	if (error == 0 && xattr_obj) {
 		error = zfs_zget(zfsvfs, xattr_obj, &xzp);
-		ASSERT3U(error, ==, 0);
+		ASSERT0(error);
 		dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_TRUE);
 		dmu_tx_hold_sa(tx, xzp->z_sa_hdl, B_FALSE);
 	}
@@ -1719,11 +1723,11 @@
 				error = sa_update(zp->z_sa_hdl,
 				    SA_ZPL_XATTR(zfsvfs), &null_xattr,
 				    sizeof (uint64_t), tx);
-			ASSERT3U(error, ==, 0);
+			ASSERT0(error);
 		}
 		mutex_enter(&vp->v_lock);
 		vp->v_count--;
-		ASSERT3U(vp->v_count, ==, 0);
+		ASSERT0(vp->v_count);
 		mutex_exit(&vp->v_lock);
 		mutex_exit(&zp->z_lock);
 		zfs_znode_delete(zp, tx);
@@ -3096,7 +3100,7 @@
 		zp->z_mode = new_mode;
 		ASSERT3U((uintptr_t)aclp, !=, NULL);
 		err = zfs_aclset_common(zp, aclp, cr, tx);
-		ASSERT3U(err, ==, 0);
+		ASSERT0(err);
 		if (zp->z_acl_cached)
 			zfs_acl_free(zp->z_acl_cached);
 		zp->z_acl_cached = aclp;
@@ -3619,7 +3623,7 @@
 
 			error = sa_update(szp->z_sa_hdl, SA_ZPL_FLAGS(zfsvfs),
 			    (void *)&szp->z_pflags, sizeof (uint64_t), tx);
-			ASSERT3U(error, ==, 0);
+			ASSERT0(error);
 
 			error = zfs_link_destroy(sdl, szp, tx, ZRENAMING, NULL);
 			if (error == 0) {
--- old/usr/src/uts/common/fs/zfs/zfs_znode.c	Wed Jul 18 15:48:56 2012
+++ new/usr/src/uts/common/fs/zfs/zfs_znode.c	Wed Jul 18 15:48:55 2012
@@ -20,8 +20,10 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
+
 /* Portions Copyright 2007 Jeremy Teo */
 
 #ifdef _KERNEL
@@ -806,7 +808,7 @@
 			err = zap_create_claim_norm(zfsvfs->z_os, obj,
 			    zfsvfs->z_norm, DMU_OT_DIRECTORY_CONTENTS,
 			    obj_type, bonuslen, tx);
-			ASSERT3U(err, ==, 0);
+			ASSERT0(err);
 		} else {
 			obj = zap_create_norm(zfsvfs->z_os,
 			    zfsvfs->z_norm, DMU_OT_DIRECTORY_CONTENTS,
@@ -817,7 +819,7 @@
 			err = dmu_object_claim(zfsvfs->z_os, obj,
 			    DMU_OT_PLAIN_FILE_CONTENTS, 0,
 			    obj_type, bonuslen, tx);
-			ASSERT3U(err, ==, 0);
+			ASSERT0(err);
 		} else {
 			obj = dmu_object_alloc(zfsvfs->z_os,
 			    DMU_OT_PLAIN_FILE_CONTENTS, 0,
@@ -999,7 +1001,7 @@
 	if (obj_type == DMU_OT_ZNODE ||
 	    acl_ids->z_aclp->z_version < ZFS_ACL_VERSION_FUID) {
 		err = zfs_aclset_common(*zpp, acl_ids->z_aclp, cr, tx);
-		ASSERT3P(err, ==, 0);
+		ASSERT0(err);
 	}
 	ZFS_OBJ_HOLD_EXIT(zfsvfs, obj);
 }
@@ -1420,7 +1422,7 @@
 
 	if (error == ENOTSUP)
 		return;
-	ASSERT3U(error, ==, 0);
+	ASSERT0(error);
 
 	/* What blocksize did we actually get? */
 	dmu_object_size_from_db(sa_get_db(zp->z_sa_hdl), &zp->z_blksz, &dummy);
--- old/usr/src/uts/common/fs/zfs/zil.c	Wed Jul 18 15:48:57 2012
+++ new/usr/src/uts/common/fs/zfs/zil.c	Wed Jul 18 15:48:56 2012
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
 /* Portions Copyright 2010 Robert Milkowski */
@@ -1062,7 +1062,7 @@
 	lwb->lwb_nused += reclen + dlen;
 	lwb->lwb_max_txg = MAX(lwb->lwb_max_txg, txg);
 	ASSERT3U(lwb->lwb_nused, <=, lwb->lwb_sz);
-	ASSERT3U(P2PHASE(lwb->lwb_nused, sizeof (uint64_t)), ==, 0);
+	ASSERT0(P2PHASE(lwb->lwb_nused, sizeof (uint64_t)));
 
 	return (lwb);
 }
--- old/usr/src/uts/common/fs/zfs/zio.c	Wed Jul 18 15:48:58 2012
+++ new/usr/src/uts/common/fs/zfs/zio.c	Wed Jul 18 15:48:57 2012
@@ -2138,7 +2138,7 @@
 	}
 
 	ASSERT(BP_IS_HOLE(bp));
-	ASSERT3U(BP_GET_NDVAS(bp), ==, 0);
+	ASSERT0(BP_GET_NDVAS(bp));
 	ASSERT3U(zio->io_prop.zp_copies, >, 0);
 	ASSERT3U(zio->io_prop.zp_copies, <=, spa_max_replication(spa));
 	ASSERT3U(zio->io_size, ==, BP_GET_PSIZE(bp));
--- old/usr/src/uts/common/sys/debug.h	Wed Jul 18 15:48:59 2012
+++ new/usr/src/uts/common/sys/debug.h	Wed Jul 18 15:48:58 2012
@@ -23,6 +23,10 @@
  * Use is subject to license terms.
  */
 
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved	*/
 
@@ -114,14 +118,18 @@
 #define	VERIFY3S(x, y, z)	VERIFY3_IMPL(x, y, z, int64_t)
 #define	VERIFY3U(x, y, z)	VERIFY3_IMPL(x, y, z, uint64_t)
 #define	VERIFY3P(x, y, z)	VERIFY3_IMPL(x, y, z, uintptr_t)
+#define	VERIFY0(x)		VERIFY3_IMPL(x, ==, 0, uintmax_t)
+
 #if DEBUG
 #define	ASSERT3S(x, y, z)	VERIFY3_IMPL(x, y, z, int64_t)
 #define	ASSERT3U(x, y, z)	VERIFY3_IMPL(x, y, z, uint64_t)
 #define	ASSERT3P(x, y, z)	VERIFY3_IMPL(x, y, z, uintptr_t)
+#define	ASSERT0(x)		VERIFY3_IMPL(x, ==, 0, uintmax_t)
 #else
 #define	ASSERT3S(x, y, z)	((void)0)
 #define	ASSERT3U(x, y, z)	((void)0)
 #define	ASSERT3P(x, y, z)	((void)0)
+#define	ASSERT0(x)		((void)0)
 #endif
 
 #ifdef	_KERNEL
