ztest_record_enospc(FTAG);
return (error);
}
- ASSERT3U(error, ==, 0);
+ ASSERT0(error);
setpoint = umem_alloc(MAXPATHLEN, UMEM_NOFAIL);
VERIFY3U(dsl_prop_get(osname, propname, sizeof (curval),
ztest_record_enospc(FTAG);
return (error);
}
- ASSERT3U(error, ==, 0);
+ ASSERT0(error);
return (error);
}
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);
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);
}
*/
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.
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);
if (error == ENOENT)
goto out;
- ASSERT3U(error, ==, 0);
+ ASSERT0(error);
tx = dmu_tx_create(os);
dmu_tx_hold_zap(tx, object, B_TRUE, NULL);
data->zcd_called = B_TRUE;
if (error == ECANCELED) {
- ASSERT3U(data->zcd_txg, ==, 0);
+ ASSERT0(data->zcd_txg);
ASSERT(!data->zcd_added);
/*
(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);
}
ASSERT(error == 0 || error == EEXIST);
- VERIFY3U(dmu_objset_hold(name, zd, &os), ==, 0);
+ VERIFY0(dmu_objset_hold(name, zd, &os));
(void) rw_exit(&ztest_name_lock);
ztest_zd_init(zd, ZTEST_GET_SHARED_DS(d), os);
/* Verify that at least one commit cb was called in a timely fashion */
if (zc_cb_counter >= ZTEST_COMMIT_CB_MIN_REG)
- VERIFY3U(zc_min_txg_delay, ==, 0);
+ VERIFY0(zc_min_txg_delay);
spa_close(spa, FTAG);
#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
#include <sys/u8_textprep.h>
#include <sys/fm/fs/zfs.h>
#include <sys/sunddi.h>
+#include <sys/debug.h>
/*
* Stack
#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, uint64_t)
#ifdef NDEBUG
#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)
#define ASSERTV(x)
#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)
+#define ASSERT0(x) VERIFY0(x)
#define ASSERTV(x) x
#endif /* NDEBUG */
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);
}
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);
}
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);
}
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);
}
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
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
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
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
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
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
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 *
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
fnvlist_lookup_uint8(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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
fnvpair_value_byte(nvpair_t *nvp)
{
uchar_t rv;
- VERIFY3U(nvpair_value_byte(nvp, &rv), ==, 0);
+ VERIFY0(nvpair_value_byte(nvp, &rv));
return (rv);
}
fnvpair_value_int8(nvpair_t *nvp)
{
int8_t rv;
- VERIFY3U(nvpair_value_int8(nvp, &rv), ==, 0);
+ VERIFY0(nvpair_value_int8(nvp, &rv));
return (rv);
}
fnvpair_value_int16(nvpair_t *nvp)
{
int16_t rv;
- VERIFY3U(nvpair_value_int16(nvp, &rv), ==, 0);
+ VERIFY0(nvpair_value_int16(nvp, &rv));
return (rv);
}
fnvpair_value_int32(nvpair_t *nvp)
{
int32_t rv;
- VERIFY3U(nvpair_value_int32(nvp, &rv), ==, 0);
+ VERIFY0(nvpair_value_int32(nvp, &rv));
return (rv);
}
fnvpair_value_int64(nvpair_t *nvp)
{
int64_t rv;
- VERIFY3U(nvpair_value_int64(nvp, &rv), ==, 0);
+ VERIFY0(nvpair_value_int64(nvp, &rv));
return (rv);
}
fnvpair_value_uint8(nvpair_t *nvp)
{
uint8_t rv;
- VERIFY3U(nvpair_value_uint8(nvp, &rv), ==, 0);
+ VERIFY0(nvpair_value_uint8(nvp, &rv));
return (rv);
}
fnvpair_value_uint16(nvpair_t *nvp)
{
uint16_t rv;
- VERIFY3U(nvpair_value_uint16(nvp, &rv), ==, 0);
+ VERIFY0(nvpair_value_uint16(nvp, &rv));
return (rv);
}
fnvpair_value_uint32(nvpair_t *nvp)
{
uint32_t rv;
- VERIFY3U(nvpair_value_uint32(nvp, &rv), ==, 0);
+ VERIFY0(nvpair_value_uint32(nvp, &rv));
return (rv);
}
fnvpair_value_uint64(nvpair_t *nvp)
{
uint64_t rv;
- VERIFY3U(nvpair_value_uint64(nvp, &rv), ==, 0);
+ VERIFY0(nvpair_value_uint64(nvp, &rv));
return (rv);
}
fnvpair_value_string(nvpair_t *nvp)
{
char *rv;
- VERIFY3U(nvpair_value_string(nvp, &rv), ==, 0);
+ VERIFY0(nvpair_value_string(nvp, &rv));
return (rv);
}
fnvpair_value_nvlist(nvpair_t *nvp)
{
nvlist_t *rv;
- VERIFY3U(nvpair_value_nvlist(nvp, &rv), ==, 0);
+ VERIFY0(nvpair_value_nvlist(nvp, &rv));
return (rv);
}
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;
}
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;
* 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;
}
/* 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 */
mutex_exit(&l2arc_buflist_mtx);
if (pio == NULL) {
- ASSERT3U(write_sz, ==, 0);
+ ASSERT0(write_sz);
kmem_cache_free(hdr_cache, head);
return (0);
}
if (spa_feature_is_enabled(spa, empty_bpobj_feat)) {
if (!spa_feature_is_active(spa, empty_bpobj_feat)) {
- ASSERT3U(dp->dp_empty_bpobj, ==, 0);
+ ASSERT0(dp->dp_empty_bpobj);
dp->dp_empty_bpobj =
bpobj_alloc(os, SPA_MAXBLOCKSIZE, tx);
VERIFY(zap_add(os,
VERIFY3U(0, ==, 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));
/* 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;
/* 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);
} 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);
}
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);
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) {
dmu_sendarg_t *dsp = dbi->dbi_dsp;
dsl_dataset_t *ds = dsp->dsa_os->os_dsl_dataset;
ssize_t resid; /* have to get resid to get detailed errno */
- ASSERT3U(dbi->dbi_len % 8, ==, 0);
+ ASSERT0(dbi->dbi_len % 8);
fletcher_4_incremental_native(dbi->dbi_buf, dbi->dbi_len, &dsp->dsa_zc);
dsp->dsa_err = vn_rdwr(UIO_WRITE, dsp->dsa_vp,
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;
(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);
}
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));
}
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) {
DMU_TX_STAT_BUMP(dmu_tx_error);
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);
-
- ASSERT3U(dn->dn_dbufs_count, ==, 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);
+
+ ASSERT0(dn->dn_dbufs_count);
list_destroy(&dn->dn_dbufs);
}
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, <,
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;
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) ||
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);
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)
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;
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) {
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);
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) {
* 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]);
* remove this one.
*/
if (err != ENOENT) {
- VERIFY3U(err, ==, 0);
+ VERIFY0(err);
}
ASSERT3U(0, ==, zap_count(mos, ds->ds_phys->ds_next_clones_obj,
&count));
poa.pio = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED);
VERIFY3U(0, ==, 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 */
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);
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));
err = dsl_dataset_snap_lookup(ds_head,
ds->ds_snapname, &val);
- ASSERT3U(err, ==, 0);
+ ASSERT0(err);
ASSERT3U(val, ==, obj);
}
#endif
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(LOG_DS_RENAME, dd->dd_pool->dp_spa, tx,
"dataset = %llu", ds->ds_object);
zap_cursor_fini(&zc);
}
- ASSERT3U(dsl_prop_numcb(ds), ==, 0);
+ ASSERT0(dsl_prop_numcb(ds));
}
/*
dsl_dir_set_reservation_sync(ds, &psa, 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));
ASSERT(dmu_tx_is_syncing(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;
/* 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);
/* 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);
spa_history_log_internal(LOG_DS_RENAME, dd->dd_pool->dp_spa,
tx, "dataset = %llu", dd->dd_phys->dd_head_dataset_obj);
/* 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));
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
for (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);
* 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);
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));
}
/*
* 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>
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);
}
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);
zio_buf_free(entry_map, bufsize);
sm->sm_space -= delta;
- VERIFY3U(sm->sm_space, ==, 0);
+ VERIFY0(sm->sm_space);
}
void
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.
if (vd->vdev_detached) {
if (smo->smo_object != 0) {
- VERIFY(0 == dmu_object_free(mos, smo->smo_object, tx));
+ VERIFY0(dmu_object_free(mos, smo->smo_object, tx));
smo->smo_object = 0;
}
dmu_tx_commit(tx);
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;
}
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;
}
(void) spa_vdev_state_exit(spa, vd, 0);
goto top;
}
- ASSERT3U(tvd->vdev_stat.vs_alloc, ==, 0);
+ ASSERT0(tvd->vdev_stat.vs_alloc);
}
/*
{
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)
*/
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);
if (j == missing[i]) {
ASSERT3U(rows[i][j], ==, 1);
} else {
- ASSERT3U(rows[i][j], ==, 0);
+ ASSERT0(rows[i][j]);
}
}
}
} 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);
}
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,
* 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
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))) {
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;
}
*/
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
*/
#include <sys/zfs_context.h>
error = zvol_get_stats(os, nv);
if (error == EIO)
return (error);
- VERIFY3S(error, ==, 0);
+ VERIFY0(error);
}
if (error == 0)
error = put_nvlist(zc, nv);
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
/*
* This file contains the code to implement file range locking in
list_insert_tail(free_list, remove);
} 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
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);
*/
/*
* 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 */
&xattr_obj, sizeof (xattr_obj));
if (error == 0 && xattr_obj) {
error = zfs_zget(zsb, 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);
}
zp->z_mode = new_mode;
ASSERT3P(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;
error = sa_update(szp->z_sa_hdl, SA_ZPL_FLAGS(zsb),
(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) {
*/
/*
* 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 */
err = zap_create_claim_norm(zsb->z_os, obj,
zsb->z_norm, DMU_OT_DIRECTORY_CONTENTS,
obj_type, bonuslen, tx);
- ASSERT3U(err, ==, 0);
+ ASSERT0(err);
} else {
obj = zap_create_norm(zsb->z_os,
zsb->z_norm, DMU_OT_DIRECTORY_CONTENTS,
err = dmu_object_claim(zsb->z_os, obj,
DMU_OT_PLAIN_FILE_CONTENTS, 0,
obj_type, bonuslen, tx);
- ASSERT3U(err, ==, 0);
+ ASSERT0(err);
} else {
obj = dmu_object_alloc(zsb->z_os,
DMU_OT_PLAIN_FILE_CONTENTS, 0,
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);
- ASSERT3S(err, ==, 0);
+ ASSERT0(err);
}
kmem_free(sa_attrs, sizeof(sa_bulk_attr_t) * ZPL_END);
ZFS_OBJ_HOLD_EXIT(zsb, obj);
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);
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);
}
}
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));