]> granicus.if.org Git - zfs/commit
Make zpool status counters match error events count
authorTony Hutter <hutter2@llnl.gov>
Fri, 15 Mar 2019 01:21:53 +0000 (18:21 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 15 Mar 2019 01:21:53 +0000 (18:21 -0700)
commit2bbec1c910a24bf61c6f41e0762e50face4b8907
tree01cf1bd456a7d1589ece6b4600592471e0c74ad0
parent04a3b0796c622201e2cde6b7288043f90da1ba33
Make zpool status counters match error events count

The number of IO and checksum events should match the number of errors
seen in zpool status.  Previously there was a mismatch between the
two counts because zpool status would only count unrecovered errors,
while zpool events would get an event for *all* errors (recovered or
not).  This lead to situations where disks could be faulted for
"too many errors", while at the same time showing zero errors in zpool
status.

This fixes the zpool status error counters to increment at the same
times we post the error events.

Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #4851
Closes #7817
module/zfs/vdev.c
module/zfs/vdev_raidz.c
module/zfs/zio.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/cli_root/zpool_events/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_errors.ksh [new file with mode: 0755]