diff options
author | Giuseppe Di Natale <[email protected]> | 2018-01-24 16:19:55 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-01-25 10:01:02 -0800 |
commit | cf232b53d5deb8fba4665ce4fd039b444eb3201a (patch) | |
tree | 56976d67e93a3c2b34dfef2a858bbf53c0612617 /module | |
parent | 6bc4a2376c694f813d2ee78af3d749aa2684f391 (diff) |
Revert "Remove wrong ASSERT in annotate_ecksum"
This reverts commit 093911f1945b5c164a45bb077103283dafdcae0c.
Reviewed-by: Chunwei Chen <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes #7079
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/zfs_fm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/zfs_fm.c b/module/zfs/zfs_fm.c index 3b17d3ac2..c68ab772a 100644 --- a/module/zfs/zfs_fm.c +++ b/module/zfs/zfs_fm.c @@ -486,8 +486,7 @@ update_histogram(uint64_t value_arg, uint16_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)) { - if (hist[63 - i] < UINT16_MAX) - hist[63 - i]++; + hist[63 - i]++; ++bits; } } @@ -644,6 +643,7 @@ annotate_ecksum(nvlist_t *ereport, zio_bad_cksum_t *info, if (badabd == NULL || goodabd == NULL) return (eip); + ASSERT3U(nui64s, <=, UINT16_MAX); ASSERT3U(size, ==, nui64s * sizeof (uint64_t)); ASSERT3U(size, <=, SPA_MAXBLOCKSIZE); ASSERT3U(size, <=, UINT32_MAX); |