mirror_zfs/cmd
Andriy Tkachuk 6d378564b4 zdb: fix checksum calculation for decompressed blocks
Currently, when reading compressed blocks with -R and decompressing
them with :d option and specifying lsize, which is normally bigger
than psize for compressed blocks, the checksum is calculated on
decompressed data. But it makes no sense since zfs always calculates
checksum on physical, i.e. compressed data. So reading the same block
produces different checksum results depending on how we read it,
whether we decompress it or not, which, again, makes no sense.

Fix: use psize instead of lsize when calculating the checksum so that
it is always calculated on the physical block size, no matter was it
compressed or not.

Signed-off-by: Andriy Tkachuk <andriy.tkachuk@seagate.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Closes #17547
2025-08-05 12:33:00 -04:00
..
raidz_test SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zdb zdb: fix checksum calculation for decompressed blocks 2025-08-05 12:33:00 -04:00
zed ZED: Fix device type detection and pool iteration logic 2025-08-05 12:32:28 -04:00
zfs Validate mountpoint on path-based unmount using statx 2025-08-05 12:27:25 -04:00
zinject SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpool zpool: clarify ZPOOL_STATUS_REMOVED_DEV status message 2025-06-17 10:50:26 -07:00
zpool_influxdb SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zstream SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
arc_summary SPDX: license tags: BSD-2-Clause 2025-04-16 09:59:44 -07:00
arcstat.in arcstat: prevent ZeroDivisionError when L2ARC becomes empty 2025-05-28 16:00:28 -07:00
dbufstat.in SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
fsck.zfs.in cmd: move single-file binaries up, extract udev programs to udev/ 2022-05-10 10:20:34 -07:00
Makefile.am build: rename FORCEDEBUG_CPPFLAGS to LIBZPOOL_CPPFLAGS 2024-08-27 12:53:27 -07:00
mount_zfs.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs_ids_to_path.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zgenhostid.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zhack.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zilstat.in SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
ztest.c dmu_tx: rename dmu_tx_assign() flags from TXG_* to DMU_TX_* (#17143) 2025-04-16 09:59:45 -07:00
zvol_wait zvol_wait logic may terminate prematurely 2022-10-11 12:12:04 -07:00