summaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev.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/vdev.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/vdev.c')
-rw-r--r--module/zfs/vdev.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c
index c44e4f67f..7df0fd6a5 100644
--- a/module/zfs/vdev.c
+++ b/module/zfs/vdev.c
@@ -598,9 +598,9 @@ vdev_free(vdev_t *vd)
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.
@@ -1825,7 +1825,7 @@ vdev_dtl_sync(vdev_t *vd, uint64_t txg)
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);
@@ -2029,7 +2029,7 @@ vdev_remove(vdev_t *vd, uint64_t txg)
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;
}
@@ -2041,7 +2041,7 @@ vdev_remove(vdev_t *vd, uint64_t txg)
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;
}
@@ -2319,7 +2319,7 @@ top:
(void) spa_vdev_state_exit(spa, vd, 0);
goto top;
}
- ASSERT3U(tvd->vdev_stat.vs_alloc, ==, 0);
+ ASSERT0(tvd->vdev_stat.vs_alloc);
}
/*