summaryrefslogtreecommitdiffstats
path: root/module/zfs/zap.c
diff options
context:
space:
mode:
authorMadhav Suresh <[email protected]>2013-05-10 14:17:03 -0700
committerBrian Behlendorf <[email protected]>2013-06-19 15:14:10 -0700
commitc99c90015ece64746e20b74245caca41d1dbefe1 (patch)
treecc4e993d3796f076a2dd1de43b4a2bd38ba10cc8 /module/zfs/zap.c
parent9eaf0832ad945fb8584c39fb9aeb5e8578912aeb (diff)
Illumos #3006
3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument is zero Reviewed by Matt Ahrens <[email protected]> Reviewed by George Wilson <[email protected]> Approved by Eric Schrock <[email protected]> References: illumos/illumos-gate@fb09f5aad449c97fe309678f3f604982b563a96f https://illumos.org/issues/3006 Requires: zfsonlinux/spl@1c6d149feb4033e4a56fb987004edc5d45288bcb Ported-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1509
Diffstat (limited to 'module/zfs/zap.c')
-rw-r--r--module/zfs/zap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/zfs/zap.c b/module/zfs/zap.c
index a6c8c82ff..a7bae5e4e 100644
--- a/module/zfs/zap.c
+++ b/module/zfs/zap.c
@@ -162,7 +162,7 @@ zap_table_grow(zap_t *zap, zap_table_phys_t *tbl,
} 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 @@ zap_grow_ptrtbl(zap_t *zap, dmu_tx_t *tx)
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 @@ zap_open_leaf(uint64_t blkid, dmu_buf_t *db)
* 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_expand_leaf(zap_name_t *zn, zap_leaf_t *l, dmu_tx_t *tx, zap_leaf_t **lp)
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))) {