summaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev_removal.c
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-12-05 12:37:00 -0800
committerBrian Behlendorf <[email protected]>2019-12-05 12:37:00 -0800
commit2a8ba608d3eace43010174aa4f67c8b8af4aacf3 (patch)
treeb6393b38c9f31ee69fac7f42414b09ca900f2737 /module/zfs/vdev_removal.c
parent12395c7b0bbd2eaaae96d4105bdc83c3d0c73bec (diff)
Replace ASSERTV macro with compiler annotation
Remove the ASSERTV macro and handle suppressing unused compiler warnings for variables only in ASSERTs using the __attribute__((unused)) compiler annotation. The annotation is understood by both gcc and clang. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9671
Diffstat (limited to 'module/zfs/vdev_removal.c')
-rw-r--r--module/zfs/vdev_removal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/zfs/vdev_removal.c b/module/zfs/vdev_removal.c
index 8089571e1..005e9baa8 100644
--- a/module/zfs/vdev_removal.c
+++ b/module/zfs/vdev_removal.c
@@ -248,7 +248,7 @@ vdev_remove_initiate_sync(void *arg, dmu_tx_t *tx)
vdev_indirect_config_t *vic = &vd->vdev_indirect_config;
objset_t *mos = spa->spa_dsl_pool->dp_meta_objset;
spa_vdev_removal_t *svr = NULL;
- ASSERTV(uint64_t txg = dmu_tx_get_txg(tx));
+ uint64_t txg __maybe_unused = dmu_tx_get_txg(tx);
ASSERT3P(vd->vdev_ops, !=, &vdev_raidz_ops);
svr = spa_vdev_removal_create(vd);
@@ -268,7 +268,7 @@ vdev_remove_initiate_sync(void *arg, dmu_tx_t *tx)
VERIFY0(zap_add(spa->spa_meta_objset, vd->vdev_top_zap,
VDEV_TOP_ZAP_OBSOLETE_COUNTS_ARE_PRECISE, sizeof (one), 1,
&one, tx));
- ASSERTV(boolean_t are_precise);
+ boolean_t are_precise __maybe_unused;
ASSERT0(vdev_obsolete_counts_are_precise(vd, &are_precise));
ASSERT3B(are_precise, ==, B_TRUE);
}
@@ -725,7 +725,7 @@ vdev_mapping_sync(void *arg, dmu_tx_t *tx)
spa_vdev_removal_t *svr = arg;
spa_t *spa = dmu_tx_pool(tx)->dp_spa;
vdev_t *vd = vdev_lookup_top(spa, svr->svr_vdev_id);
- ASSERTV(vdev_indirect_config_t *vic = &vd->vdev_indirect_config);
+ vdev_indirect_config_t *vic __maybe_unused = &vd->vdev_indirect_config;
uint64_t txg = dmu_tx_get_txg(tx);
vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping;