mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 11:29:36 +03:00
Revert "Remove wrong ASSERT in annotate_ecksum"
This reverts commit 093911f194
.
Reviewed-by: Chunwei Chen <tuxoko@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes #7079
This commit is contained in:
parent
6bc4a2376c
commit
cf232b53d5
@ -486,7 +486,6 @@ update_histogram(uint64_t value_arg, uint16_t *hist, uint32_t *count)
|
|||||||
/* We store the bits in big-endian (largest-first) order */
|
/* We store the bits in big-endian (largest-first) order */
|
||||||
for (i = 0; i < 64; i++) {
|
for (i = 0; i < 64; i++) {
|
||||||
if (value & (1ull << i)) {
|
if (value & (1ull << i)) {
|
||||||
if (hist[63 - i] < UINT16_MAX)
|
|
||||||
hist[63 - i]++;
|
hist[63 - i]++;
|
||||||
++bits;
|
++bits;
|
||||||
}
|
}
|
||||||
@ -644,6 +643,7 @@ annotate_ecksum(nvlist_t *ereport, zio_bad_cksum_t *info,
|
|||||||
if (badabd == NULL || goodabd == NULL)
|
if (badabd == NULL || goodabd == NULL)
|
||||||
return (eip);
|
return (eip);
|
||||||
|
|
||||||
|
ASSERT3U(nui64s, <=, UINT16_MAX);
|
||||||
ASSERT3U(size, ==, nui64s * sizeof (uint64_t));
|
ASSERT3U(size, ==, nui64s * sizeof (uint64_t));
|
||||||
ASSERT3U(size, <=, SPA_MAXBLOCKSIZE);
|
ASSERT3U(size, <=, SPA_MAXBLOCKSIZE);
|
||||||
ASSERT3U(size, <=, UINT32_MAX);
|
ASSERT3U(size, <=, UINT32_MAX);
|
||||||
|
Loading…
Reference in New Issue
Block a user