summaryrefslogtreecommitdiffstats
path: root/module/zfs/bptree.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/bptree.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/bptree.c')
-rw-r--r--module/zfs/bptree.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/module/zfs/bptree.c b/module/zfs/bptree.c
index 8c5a7d40e..db0a2d3c6 100644
--- a/module/zfs/bptree.c
+++ b/module/zfs/bptree.c
@@ -94,9 +94,9 @@ bptree_free(objset_t *os, uint64_t obj, dmu_tx_t *tx)
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));
@@ -197,7 +197,7 @@ bptree_iterate(objset_t *os, uint64_t obj, boolean_t free, bptree_itor_t func,
/* 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 @@ bptree_iterate(objset_t *os, uint64_t obj, boolean_t free, bptree_itor_t func,
/* 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);