diff options
author | Don Brady <[email protected]> | 2021-02-19 23:33:15 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-19 22:33:15 -0800 |
commit | 03e02e5b561f7f60597dd905414eb476610740cc (patch) | |
tree | dc4d06386835440de73b526086ff797f025b08fa /module/zfs/zio.c | |
parent | e7adccf7f537a4d07281a2b74b360154bae367bc (diff) |
Checksum errors may not be counted
Fix regression seen in issue #11545 where checksum errors
where not being counted or showing up in a zpool event.
Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Don Brady <[email protected]>
Closes #11609
Diffstat (limited to 'module/zfs/zio.c')
-rw-r--r-- | module/zfs/zio.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/module/zfs/zio.c b/module/zfs/zio.c index 538a2a2cd..74d1595a8 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -4255,15 +4255,12 @@ zio_checksum_verify(zio_t *zio) zio->io_error = error; if (error == ECKSUM && !(zio->io_flags & ZIO_FLAG_SPECULATIVE)) { - int ret = zfs_ereport_start_checksum(zio->io_spa, + (void) zfs_ereport_start_checksum(zio->io_spa, zio->io_vd, &zio->io_bookmark, zio, zio->io_offset, zio->io_size, NULL, &info); - - if (ret != EALREADY) { - mutex_enter(&zio->io_vd->vdev_stat_lock); - zio->io_vd->vdev_stat.vs_checksum_errors++; - mutex_exit(&zio->io_vd->vdev_stat_lock); - } + mutex_enter(&zio->io_vd->vdev_stat_lock); + zio->io_vd->vdev_stat.vs_checksum_errors++; + mutex_exit(&zio->io_vd->vdev_stat_lock); } } |