aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/metaslab.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/metaslab.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/metaslab.c')
-rw-r--r--module/zfs/metaslab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c
index 459f4dbbc..2fc017b5b 100644
--- a/module/zfs/metaslab.c
+++ b/module/zfs/metaslab.c
@@ -3354,7 +3354,7 @@ metaslab_passivate_allocator(metaslab_group_t *mg, metaslab_t *msp,
static void
metaslab_passivate(metaslab_t *msp, uint64_t weight)
{
- ASSERTV(uint64_t size = weight & ~METASLAB_WEIGHT_TYPE);
+ uint64_t size __maybe_unused = weight & ~METASLAB_WEIGHT_TYPE;
/*
* If size < SPA_MINBLOCKSIZE, then we will not allocate from
@@ -5959,7 +5959,7 @@ static void
metaslab_check_free_impl(vdev_t *vd, uint64_t offset, uint64_t size)
{
metaslab_t *msp;
- ASSERTV(spa_t *spa = vd->vdev_spa);
+ spa_t *spa __maybe_unused = vd->vdev_spa;
if ((zfs_flags & ZFS_DEBUG_ZIO_FREE) == 0)
return;