Fix the ZFS checksum error histograms with larger record sizes
authorAlan Somers <asomers@gmail.com>
Fri, 14 Jul 2023 23:13:15 +0000 (17:13 -0600)
committerGitHub <noreply@github.com>
Fri, 14 Jul 2023 23:13:15 +0000 (16:13 -0700)
commit67c5e1ba4fbb3b1df6b9260498460079eb99edac
tree38e83e5459795f04fe4224af153832656f747880
parentfdba8cbb796cb089c3d6eefa833f5176b0474c29
Fix the ZFS checksum error histograms with larger record sizes

My analysis in PR #14716 was incorrect.  Each histogram bucket contains
the number of incorrect bits, by position in a 64-bit word, over the
entire record.  8-bit buckets can overflow for record sizes above 2k.
To forestall that, saturate each bucket at 255.  That should still get
the point across: either all bits are equally wrong, or just a couple
are.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alan Somers <asomers@gmail.com>
Sponsored-by: Axcient
Closes #15049
module/zfs/zfs_fm.c