diff options
author | Brian Behlendorf <[email protected]> | 2019-07-03 13:01:54 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2019-07-03 13:01:54 -0700 |
commit | 46db9d6161d0781f00ee3cb5bc02e11685d2ffaf (patch) | |
tree | d202fd9d881de0b48b7ab0a727798e3057332f7b | |
parent | aa79910726f29cc056c260507b678dd2feba85b6 (diff) |
Check b_freeze_cksum under ZFS_DEBUG_MODIFY conditional
The b_freeze_cksum field can only have data when ZFS_DEBUG_MODIFY
is set. Therefore, the EQUIV check must be wrapped accordingly.
For the same reason the ASSERT in arc_buf_fill() in unsafe.
However, since it's largely redundant it has simply been removed.
Reviewed-by: George Wilson <[email protected]>
Reviewed-by: Allan Jude <[email protected]>
Reviewed-by: Igor Kozhukhov <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #8979
-rw-r--r-- | module/zfs/arc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 837ef1801..98bafeee2 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -1872,7 +1872,8 @@ arc_buf_try_copy_decompressed_data(arc_buf_t *buf) * There were no decompressed bufs, so there should not be a * checksum on the hdr either. */ - EQUIV(!copied, hdr->b_l1hdr.b_freeze_cksum == NULL); + if (zfs_flags & ZFS_DEBUG_MODIFY) + EQUIV(!copied, hdr->b_l1hdr.b_freeze_cksum == NULL); return (copied); } @@ -2253,7 +2254,6 @@ arc_buf_fill(arc_buf_t *buf, spa_t *spa, const zbookmark_phys_t *zb, */ if (arc_buf_try_copy_decompressed_data(buf)) { /* Skip byteswapping and checksumming (already done) */ - ASSERT3P(hdr->b_l1hdr.b_freeze_cksum, !=, NULL); return (0); } else { error = zio_decompress_data(HDR_GET_COMPRESS(hdr), |