diff options
author | Ned Bass <[email protected]> | 2019-12-30 09:14:40 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-12-30 09:14:40 -0800 |
commit | 8b3438e5034c192c652eafe3180464a57a839174 (patch) | |
tree | 373c2dd712599cc1a98017f0ce1b4e296ffaf95e /cmd/zdb | |
parent | 153db761979524e0d91ef3596d3d705aa5690148 (diff) |
zdb: print block checksums with 6 d's of verbosity
Include checksums in the output of 'zdb -dddddd' along
with other indirect block information already displayed.
Example output follows (with long lines trimmed):
$ zdb -dddddd tank/fish 128
Dataset tank/fish [ZPL], ID 259, cr_txg 10, 16.2M, 93 objects, rootbp DV
Object lvl iblk dblk dsize dnsize lsize %full type
128 2 128K 128K 634K 512 1M 100.00 ZFS plain f
168 bonus System attri
dnode flags: USED_BYTES USERUSED_ACCOUNTED USEROBJUSED_ACCOUNTED
dnode maxblkid: 7
path /c
uid 0
gid 0
atime Sat Dec 21 10:49:26 2019
mtime Sat Dec 21 10:49:26 2019
ctime Sat Dec 21 10:49:26 2019
crtime Sat Dec 21 10:49:26 2019
gen 41
mode 100755
size 964592
parent 34
links 1
pflags 40800000104
Indirect blocks:
0 L1 0:2c0000:400 0:c021e00:400 20000L/400P F=8 B=41/41
0 L0 0:227800:13800 20000L/13800P F=1 B=41/41 cksum=167a
20000 L0 0:25ec00:17c00 20000L/17c00P F=1 B=41/41 cksum=2312
40000 L0 0:276800:18400 20000L/18400P F=1 B=41/41 cksum=24e0
60000 L0 0:2a7800:18800 20000L/18800P F=1 B=41/41 cksum=25be
80000 L0 0:28ec00:18c00 20000L/18c00P F=1 B=41/41 cksum=2579
a0000 L0 0:24d000:11c00 20000L/11c00P F=1 B=41/41 cksum=140a
c0000 L0 0:23b000:12000 20000L/12000P F=1 B=41/41 cksum=164e
e0000 L0 0:221e00:5a00 20000L/5a00P F=1 B=41/41 cksum=9de790
segment [0000000000000000, 0000000000100000) size 1M
Reviewed-by: Kjeld Schouten <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ned Bass <[email protected]>
Closes #9765
Diffstat (limited to 'cmd/zdb')
-rw-r--r-- | cmd/zdb/zdb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 91ead1d55..c76076a39 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -1568,6 +1568,12 @@ snprintf_blkptr_compact(char *blkbuf, size_t buflen, const blkptr_t *bp, if (bp_freed) (void) snprintf(blkbuf + strlen(blkbuf), buflen - strlen(blkbuf), " %s", "FREE"); + (void) snprintf(blkbuf + strlen(blkbuf), + buflen - strlen(blkbuf), " cksum=%llx:%llx:%llx:%llx", + (u_longlong_t)bp->blk_cksum.zc_word[0], + (u_longlong_t)bp->blk_cksum.zc_word[1], + (u_longlong_t)bp->blk_cksum.zc_word[2], + (u_longlong_t)bp->blk_cksum.zc_word[3]); } } |