mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Don't emit checksum histograms in ereport.fs.zfs.checksum events
The checksum histograms were intended to be used with ATA and parallel SCSI, which are obsolete. With modern storage hardware, they will almost always look like white noise; all bits will be wrong. They only serve to bloat the event. That's a particular problem on FreeBSD, where events must fit into a 1016 byte buffer. This fixes issue #14717 for RAIDZ pools, but not for mirror pools. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rich Ercolani <rincebrain@gmail.com> Signed-off-by: Alan Somers <asomers@gmail.com> Sponsored-by: Axcient Closes #15052
This commit is contained in:
committed by
Brian Behlendorf
parent
ab0b0393cb
commit
cf2a225b24
+4
-21
@@ -754,10 +754,6 @@ zfs_ereport_start(nvlist_t **ereport_out, nvlist_t **detector_out,
|
||||
#define MAX_RANGES 16
|
||||
|
||||
typedef struct zfs_ecksum_info {
|
||||
/* histograms of set and cleared bits by bit number in a 64-bit word */
|
||||
uint8_t zei_histogram_set[sizeof (uint64_t) * NBBY];
|
||||
uint8_t zei_histogram_cleared[sizeof (uint64_t) * NBBY];
|
||||
|
||||
/* inline arrays of bits set and cleared. */
|
||||
uint64_t zei_bits_set[ZFM_MAX_INLINE];
|
||||
uint64_t zei_bits_cleared[ZFM_MAX_INLINE];
|
||||
@@ -781,7 +777,7 @@ typedef struct zfs_ecksum_info {
|
||||
} zfs_ecksum_info_t;
|
||||
|
||||
static void
|
||||
update_histogram(uint64_t value_arg, uint8_t *hist, uint32_t *count)
|
||||
update_bad_bits(uint64_t value_arg, uint32_t *count)
|
||||
{
|
||||
size_t i;
|
||||
size_t bits = 0;
|
||||
@@ -789,10 +785,8 @@ update_histogram(uint64_t value_arg, uint8_t *hist, uint32_t *count)
|
||||
|
||||
/* We store the bits in big-endian (largest-first) order */
|
||||
for (i = 0; i < 64; i++) {
|
||||
if (value & (1ull << i)) {
|
||||
hist[63 - i] = MAX(hist[63 - i], hist[63 - i] + 1);
|
||||
if (value & (1ull << i))
|
||||
++bits;
|
||||
}
|
||||
}
|
||||
/* update the count of bits changed */
|
||||
*count += bits;
|
||||
@@ -1010,10 +1004,8 @@ annotate_ecksum(nvlist_t *ereport, zio_bad_cksum_t *info,
|
||||
offset++;
|
||||
}
|
||||
|
||||
update_histogram(set, eip->zei_histogram_set,
|
||||
&eip->zei_range_sets[range]);
|
||||
update_histogram(cleared, eip->zei_histogram_cleared,
|
||||
&eip->zei_range_clears[range]);
|
||||
update_bad_bits(set, &eip->zei_range_sets[range]);
|
||||
update_bad_bits(cleared, &eip->zei_range_clears[range]);
|
||||
}
|
||||
|
||||
/* convert to byte offsets */
|
||||
@@ -1049,15 +1041,6 @@ annotate_ecksum(nvlist_t *ereport, zio_bad_cksum_t *info,
|
||||
DATA_TYPE_UINT8_ARRAY,
|
||||
inline_size, (uint8_t *)eip->zei_bits_cleared,
|
||||
NULL);
|
||||
} else {
|
||||
fm_payload_set(ereport,
|
||||
FM_EREPORT_PAYLOAD_ZFS_BAD_SET_HISTOGRAM,
|
||||
DATA_TYPE_UINT8_ARRAY,
|
||||
NBBY * sizeof (uint64_t), eip->zei_histogram_set,
|
||||
FM_EREPORT_PAYLOAD_ZFS_BAD_CLEARED_HISTOGRAM,
|
||||
DATA_TYPE_UINT8_ARRAY,
|
||||
NBBY * sizeof (uint64_t), eip->zei_histogram_cleared,
|
||||
NULL);
|
||||
}
|
||||
return (eip);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user