aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorAndriy Gapon <[email protected]>2017-10-26 18:55:19 +0300
committerBrian Behlendorf <[email protected]>2018-01-25 10:02:11 -0800
commit1b18c6d791d567499daa2c35467897d950a698e6 (patch)
treec57f2b48c2b392495e0aa5245368bffa4a180253 /module/zfs
parentcf232b53d5deb8fba4665ce4fd039b444eb3201a (diff)
OpenZFS 8731 - ASSERT3U(nui64s, <=, UINT16_MAX) fails for large blocks
Authored by: Andriy Gapon <[email protected]> Approved by: Dan McDonald <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed-by: Chunwei Chen <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Ported-by: Giuseppe Di Natale <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/8731 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/4c08500788 Closes #7079
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/zfs_fm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/module/zfs/zfs_fm.c b/module/zfs/zfs_fm.c
index c68ab772a..b3c38f5b2 100644
--- a/module/zfs/zfs_fm.c
+++ b/module/zfs/zfs_fm.c
@@ -451,8 +451,8 @@ zfs_ereport_start(nvlist_t **ereport_out, nvlist_t **detector_out,
typedef struct zfs_ecksum_info {
/* histograms of set and cleared bits by bit number in a 64-bit word */
- uint16_t zei_histogram_set[sizeof (uint64_t) * NBBY];
- uint16_t zei_histogram_cleared[sizeof (uint64_t) * NBBY];
+ uint32_t zei_histogram_set[sizeof (uint64_t) * NBBY];
+ uint32_t zei_histogram_cleared[sizeof (uint64_t) * NBBY];
/* inline arrays of bits set and cleared. */
uint64_t zei_bits_set[ZFM_MAX_INLINE];
@@ -477,7 +477,7 @@ typedef struct zfs_ecksum_info {
} zfs_ecksum_info_t;
static void
-update_histogram(uint64_t value_arg, uint16_t *hist, uint32_t *count)
+update_histogram(uint64_t value_arg, uint32_t *hist, uint32_t *count)
{
size_t i;
size_t bits = 0;
@@ -643,7 +643,7 @@ annotate_ecksum(nvlist_t *ereport, zio_bad_cksum_t *info,
if (badabd == NULL || goodabd == NULL)
return (eip);
- ASSERT3U(nui64s, <=, UINT16_MAX);
+ ASSERT3U(nui64s, <=, UINT32_MAX);
ASSERT3U(size, ==, nui64s * sizeof (uint64_t));
ASSERT3U(size, <=, SPA_MAXBLOCKSIZE);
ASSERT3U(size, <=, UINT32_MAX);
@@ -754,10 +754,10 @@ annotate_ecksum(nvlist_t *ereport, zio_bad_cksum_t *info,
} else {
fm_payload_set(ereport,
FM_EREPORT_PAYLOAD_ZFS_BAD_SET_HISTOGRAM,
- DATA_TYPE_UINT16_ARRAY,
+ DATA_TYPE_UINT32_ARRAY,
NBBY * sizeof (uint64_t), eip->zei_histogram_set,
FM_EREPORT_PAYLOAD_ZFS_BAD_CLEARED_HISTOGRAM,
- DATA_TYPE_UINT16_ARRAY,
+ DATA_TYPE_UINT32_ARRAY,
NBBY * sizeof (uint64_t), eip->zei_histogram_cleared,
NULL);
}