zio_ereport_post() and zio_ereport_start() return values are ignored

use (void) to silence analyzers.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Toomas Soome <tsoome@me.com>
Closes #10857
This commit is contained in:
Toomas Soome 2020-09-01 05:35:11 +03:00 committed by Brian Behlendorf
parent b73a8b1dc2
commit 8a06356e24
8 changed files with 24 additions and 20 deletions

View File

@ -2187,7 +2187,7 @@ arc_untransform(arc_buf_t *buf, spa_t *spa, const zbookmark_phys_t *zb,
*/ */
ret = SET_ERROR(EIO); ret = SET_ERROR(EIO);
spa_log_error(spa, zb); spa_log_error(spa, zb);
zfs_ereport_post(FM_EREPORT_ZFS_AUTHENTICATION, (void) zfs_ereport_post(FM_EREPORT_ZFS_AUTHENTICATION,
spa, NULL, zb, NULL, 0, 0); spa, NULL, zb, NULL, 0, 0);
} }
@ -5652,7 +5652,8 @@ arc_read_done(zio_t *zio)
error = SET_ERROR(EIO); error = SET_ERROR(EIO);
if ((zio->io_flags & ZIO_FLAG_SPECULATIVE) == 0) { if ((zio->io_flags & ZIO_FLAG_SPECULATIVE) == 0) {
spa_log_error(zio->io_spa, &acb->acb_zb); spa_log_error(zio->io_spa, &acb->acb_zb);
zfs_ereport_post(FM_EREPORT_ZFS_AUTHENTICATION, (void) zfs_ereport_post(
FM_EREPORT_ZFS_AUTHENTICATION,
zio->io_spa, NULL, &acb->acb_zb, zio, 0, 0); zio->io_spa, NULL, &acb->acb_zb, zio, 0, 0);
} }
} }
@ -5928,7 +5929,7 @@ top:
rc = SET_ERROR(EIO); rc = SET_ERROR(EIO);
if ((zio_flags & ZIO_FLAG_SPECULATIVE) == 0) { if ((zio_flags & ZIO_FLAG_SPECULATIVE) == 0) {
spa_log_error(spa, zb); spa_log_error(spa, zb);
zfs_ereport_post( (void) zfs_ereport_post(
FM_EREPORT_ZFS_AUTHENTICATION, FM_EREPORT_ZFS_AUTHENTICATION,
spa, NULL, zb, NULL, 0, 0); spa, NULL, zb, NULL, 0, 0);
} }

View File

@ -2868,7 +2868,8 @@ spa_load(spa_t *spa, spa_load_state_t state, spa_import_type_t type)
spa->spa_loaded_ts.tv_nsec = 0; spa->spa_loaded_ts.tv_nsec = 0;
} }
if (error != EBADF) { if (error != EBADF) {
zfs_ereport_post(ereport, spa, NULL, NULL, NULL, 0, 0); (void) zfs_ereport_post(ereport, spa,
NULL, NULL, NULL, 0, 0);
} }
} }
spa->spa_load_state = error ? SPA_LOAD_ERROR : SPA_LOAD_NONE; spa->spa_load_state = error ? SPA_LOAD_ERROR : SPA_LOAD_NONE;

View File

@ -314,7 +314,8 @@ spa_write_cachefile(spa_t *target, boolean_t removing, boolean_t postsysevent)
* resource issues are resolved. * resource issues are resolved.
*/ */
if (target->spa_ccw_fail_time == 0) { if (target->spa_ccw_fail_time == 0) {
zfs_ereport_post(FM_EREPORT_ZFS_CONFIG_CACHE_WRITE, (void) zfs_ereport_post(
FM_EREPORT_ZFS_CONFIG_CACHE_WRITE,
target, NULL, NULL, NULL, 0, 0); target, NULL, NULL, NULL, 0, 0);
} }
target->spa_ccw_fail_time = gethrtime(); target->spa_ccw_fail_time = gethrtime();

View File

@ -1480,7 +1480,7 @@ vdev_probe_done(zio_t *zio)
} else { } else {
ASSERT(zio->io_error != 0); ASSERT(zio->io_error != 0);
vdev_dbgmsg(vd, "failed probe"); vdev_dbgmsg(vd, "failed probe");
zfs_ereport_post(FM_EREPORT_ZFS_PROBE_FAILURE, (void) zfs_ereport_post(FM_EREPORT_ZFS_PROBE_FAILURE,
spa, vd, NULL, NULL, 0, 0); spa, vd, NULL, NULL, 0, 0);
zio->io_error = SET_ERROR(ENXIO); zio->io_error = SET_ERROR(ENXIO);
} }
@ -1860,7 +1860,8 @@ vdev_open(vdev_t *vd)
*/ */
if (vd->vdev_ashift > vd->vdev_top->vdev_ashift && if (vd->vdev_ashift > vd->vdev_top->vdev_ashift &&
vd->vdev_ops->vdev_op_leaf) { vd->vdev_ops->vdev_op_leaf) {
zfs_ereport_post(FM_EREPORT_ZFS_DEVICE_BAD_ASHIFT, (void) zfs_ereport_post(
FM_EREPORT_ZFS_DEVICE_BAD_ASHIFT,
spa, vd, NULL, NULL, 0, 0); spa, vd, NULL, NULL, 0, 0);
vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN, vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN,
VDEV_AUX_BAD_LABEL); VDEV_AUX_BAD_LABEL);
@ -4757,7 +4758,7 @@ vdev_set_state(vdev_t *vd, boolean_t isopen, vdev_state_t state, vdev_aux_t aux)
class = FM_EREPORT_ZFS_DEVICE_UNKNOWN; class = FM_EREPORT_ZFS_DEVICE_UNKNOWN;
} }
zfs_ereport_post(class, spa, vd, NULL, NULL, (void) zfs_ereport_post(class, spa, vd, NULL, NULL,
save_state, 0); save_state, 0);
} }

View File

@ -1403,7 +1403,7 @@ vdev_indirect_checksum_error(zio_t *zio,
zio_bad_cksum_t zbc = {{{ 0 }}}; zio_bad_cksum_t zbc = {{{ 0 }}};
abd_t *bad_abd = ic->ic_data; abd_t *bad_abd = ic->ic_data;
abd_t *good_abd = is->is_good_child->ic_data; abd_t *good_abd = is->is_good_child->ic_data;
zfs_ereport_post_checksum(zio->io_spa, vd, NULL, zio, (void) zfs_ereport_post_checksum(zio->io_spa, vd, NULL, zio,
is->is_target_offset, is->is_size, good_abd, bad_abd, &zbc); is->is_target_offset, is->is_size, good_abd, bad_abd, &zbc);
} }
@ -1478,8 +1478,8 @@ vdev_indirect_all_checksum_errors(zio_t *zio)
vd->vdev_stat.vs_checksum_errors++; vd->vdev_stat.vs_checksum_errors++;
mutex_exit(&vd->vdev_stat_lock); mutex_exit(&vd->vdev_stat_lock);
zfs_ereport_post_checksum(zio->io_spa, vd, NULL, zio, (void) zfs_ereport_post_checksum(zio->io_spa, vd,
is->is_target_offset, is->is_size, NULL, zio, is->is_target_offset, is->is_size,
NULL, NULL, NULL); NULL, NULL, NULL);
} }
} }

View File

@ -1797,7 +1797,7 @@ raidz_checksum_error(zio_t *zio, raidz_col_t *rc, abd_t *bad_data)
zbc.zbc_has_cksum = 0; zbc.zbc_has_cksum = 0;
zbc.zbc_injected = rm->rm_ecksuminjected; zbc.zbc_injected = rm->rm_ecksuminjected;
zfs_ereport_post_checksum(zio->io_spa, vd, (void) zfs_ereport_post_checksum(zio->io_spa, vd,
&zio->io_bookmark, zio, rc->rc_offset, rc->rc_size, &zio->io_bookmark, zio, rc->rc_offset, rc->rc_size,
rc->rc_abd, bad_data, &zbc); rc->rc_abd, bad_data, &zbc);
} }

View File

@ -846,7 +846,7 @@ zfs_ereport_start_checksum(spa_t *spa, vdev_t *vd, const zbookmark_phys_t *zb,
report->zcr_length = length; report->zcr_length = length;
#ifdef _KERNEL #ifdef _KERNEL
zfs_ereport_start(&report->zcr_ereport, &report->zcr_detector, (void) zfs_ereport_start(&report->zcr_ereport, &report->zcr_detector,
FM_EREPORT_ZFS_CHECKSUM, spa, vd, zb, zio, offset, length); FM_EREPORT_ZFS_CHECKSUM, spa, vd, zb, zio, offset, length);
if (report->zcr_ereport == NULL) { if (report->zcr_ereport == NULL) {

View File

@ -546,7 +546,7 @@ error:
zio->io_error = SET_ERROR(EIO); zio->io_error = SET_ERROR(EIO);
if ((zio->io_flags & ZIO_FLAG_SPECULATIVE) == 0) { if ((zio->io_flags & ZIO_FLAG_SPECULATIVE) == 0) {
spa_log_error(spa, &zio->io_bookmark); spa_log_error(spa, &zio->io_bookmark);
zfs_ereport_post(FM_EREPORT_ZFS_AUTHENTICATION, (void) zfs_ereport_post(FM_EREPORT_ZFS_AUTHENTICATION,
spa, NULL, &zio->io_bookmark, zio, 0, 0); spa, NULL, &zio->io_bookmark, zio, 0, 0);
} }
} else { } else {
@ -2003,7 +2003,7 @@ zio_deadman_impl(zio_t *pio, int ziodepth)
pio->io_stage, pio->io_pipeline, pio->io_pipeline_trace, pio->io_stage, pio->io_pipeline, pio->io_pipeline_trace,
zb->zb_objset, zb->zb_object, zb->zb_level, zb->zb_blkid, zb->zb_objset, zb->zb_object, zb->zb_level, zb->zb_blkid,
pio->io_offset, pio->io_size, pio->io_error); pio->io_offset, pio->io_size, pio->io_error);
zfs_ereport_post(FM_EREPORT_ZFS_DEADMAN, (void) zfs_ereport_post(FM_EREPORT_ZFS_DEADMAN,
pio->io_spa, vd, zb, pio, 0, 0); pio->io_spa, vd, zb, pio, 0, 0);
if (failmode == ZIO_FAILURE_MODE_CONTINUE && if (failmode == ZIO_FAILURE_MODE_CONTINUE &&
@ -2330,7 +2330,7 @@ zio_suspend(spa_t *spa, zio_t *zio, zio_suspend_reason_t reason)
cmn_err(CE_WARN, "Pool '%s' has encountered an uncorrectable I/O " cmn_err(CE_WARN, "Pool '%s' has encountered an uncorrectable I/O "
"failure and has been suspended.\n", spa_name(spa)); "failure and has been suspended.\n", spa_name(spa));
zfs_ereport_post(FM_EREPORT_ZFS_IO_FAILURE, spa, NULL, (void) zfs_ereport_post(FM_EREPORT_ZFS_IO_FAILURE, spa, NULL,
NULL, NULL, 0, 0); NULL, NULL, 0, 0);
mutex_enter(&spa->spa_suspend_lock); mutex_enter(&spa->spa_suspend_lock);
@ -4541,7 +4541,7 @@ zio_done(zio_t *zio)
zio->io_vd->vdev_stat.vs_slow_ios++; zio->io_vd->vdev_stat.vs_slow_ios++;
mutex_exit(&zio->io_vd->vdev_stat_lock); mutex_exit(&zio->io_vd->vdev_stat_lock);
zfs_ereport_post(FM_EREPORT_ZFS_DELAY, (void) zfs_ereport_post(FM_EREPORT_ZFS_DELAY,
zio->io_spa, zio->io_vd, &zio->io_bookmark, zio->io_spa, zio->io_vd, &zio->io_bookmark,
zio, 0, 0); zio, 0, 0);
} }
@ -4565,7 +4565,7 @@ zio_done(zio_t *zio)
} }
mutex_exit(&zio->io_vd->vdev_stat_lock); mutex_exit(&zio->io_vd->vdev_stat_lock);
zfs_ereport_post(FM_EREPORT_ZFS_IO, zio->io_spa, (void) zfs_ereport_post(FM_EREPORT_ZFS_IO, zio->io_spa,
zio->io_vd, &zio->io_bookmark, zio, 0, 0); zio->io_vd, &zio->io_bookmark, zio, 0, 0);
} }
@ -4577,8 +4577,8 @@ zio_done(zio_t *zio)
* error and generate a logical data ereport. * error and generate a logical data ereport.
*/ */
spa_log_error(zio->io_spa, &zio->io_bookmark); spa_log_error(zio->io_spa, &zio->io_bookmark);
zfs_ereport_post(FM_EREPORT_ZFS_DATA, zio->io_spa, (void) zfs_ereport_post(FM_EREPORT_ZFS_DATA,
NULL, &zio->io_bookmark, zio, 0, 0); zio->io_spa, NULL, &zio->io_bookmark, zio, 0, 0);
} }
} }