]> git.proxmox.com Git - mirror_zfs.git/commit
Add display of checksums to zdb -R
authorPaul Zuchowski <31706010+PaulZ-98@users.noreply.github.com>
Wed, 27 Nov 2019 18:08:18 +0000 (13:08 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 27 Nov 2019 18:08:18 +0000 (10:08 -0800)
commit894f6696b4cf7cc2562da159ba5e6e8c806f35de
tree954bd2a467bf23573297d45d838a712eec7e3aff
parent0c46813805f428038f0f5e2541cdab8034c2f082
Add display of checksums to zdb -R

The function zdb_read_block (zdb -R) was always intended to have a :c
flag which would read the DVA and length supplied by the user, and
display the checksum. Since we don't know which checksum goes with
the data, we should calculate and display them all.

For each checksum in the table, read in the data at the supplied
DVA:length, calculate the checksum, and display it. Update the man
page and create a zfs test for the new feature.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Closes #9607
cmd/zdb/zdb.c
man/man8/zdb.8
tests/runfiles/common.run
tests/zfs-tests/tests/functional/cli_root/zdb/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zdb/zdb_checksum.ksh [new file with mode: 0755]