mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 10:54:35 +03:00
Prefer VERIFY0(n) over VERIFY(n == 0)
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #17591
This commit is contained in:
committed by
Brian Behlendorf
parent
2564308cb2
commit
c39e076f23
+5
-5
@@ -509,7 +509,7 @@ dnode_buf_byteswap(void *vbuf, size_t size)
|
||||
int i = 0;
|
||||
|
||||
ASSERT3U(sizeof (dnode_phys_t), ==, (1<<DNODE_SHIFT));
|
||||
ASSERT((size & (sizeof (dnode_phys_t)-1)) == 0);
|
||||
ASSERT0((size & (sizeof (dnode_phys_t)-1)));
|
||||
|
||||
while (i < size) {
|
||||
dnode_phys_t *dnp = (void *)(((char *)vbuf) + i);
|
||||
@@ -673,7 +673,7 @@ dnode_destroy(dnode_t *dn)
|
||||
objset_t *os = dn->dn_objset;
|
||||
boolean_t complete_os_eviction = B_FALSE;
|
||||
|
||||
ASSERT((dn->dn_id_flags & DN_ID_NEW_EXIST) == 0);
|
||||
ASSERT0((dn->dn_id_flags & DN_ID_NEW_EXIST));
|
||||
|
||||
mutex_enter(&os->os_lock);
|
||||
POINTER_INVALIDATE(&dn->dn_objset);
|
||||
@@ -958,7 +958,7 @@ dnode_move_impl(dnode_t *odn, dnode_t *ndn)
|
||||
ndn->dn_dirty_txg = odn->dn_dirty_txg;
|
||||
ndn->dn_dirtyctx = odn->dn_dirtyctx;
|
||||
ndn->dn_dirtyctx_firstset = odn->dn_dirtyctx_firstset;
|
||||
ASSERT(zfs_refcount_count(&odn->dn_tx_holds) == 0);
|
||||
ASSERT0(zfs_refcount_count(&odn->dn_tx_holds));
|
||||
zfs_refcount_transfer(&ndn->dn_holds, &odn->dn_holds);
|
||||
ASSERT(avl_is_empty(&ndn->dn_dbufs));
|
||||
avl_swap(&ndn->dn_dbufs, &odn->dn_dbufs);
|
||||
@@ -2304,7 +2304,7 @@ dnode_free_range(dnode_t *dn, uint64_t off, uint64_t len, dmu_tx_t *tx)
|
||||
if ((off >> blkshift) > dn->dn_maxblkid)
|
||||
return;
|
||||
} else {
|
||||
ASSERT(dn->dn_maxblkid == 0);
|
||||
ASSERT0(dn->dn_maxblkid);
|
||||
if (off == 0 && len >= blksz) {
|
||||
/*
|
||||
* Freeing the whole block; fast-track this request.
|
||||
@@ -2524,7 +2524,7 @@ dnode_diduse_space(dnode_t *dn, int64_t delta)
|
||||
}
|
||||
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);
|
||||
ASSERT0((dn->dn_phys->dn_flags & DNODE_FLAG_USED_BYTES));
|
||||
ASSERT0(P2PHASE(space, 1<<DEV_BSHIFT));
|
||||
dn->dn_phys->dn_used = space >> DEV_BSHIFT;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user