summaryrefslogtreecommitdiffstats
path: root/cmd/zstream
diff options
context:
space:
mode:
authorPaul Dagnelie <[email protected]>2022-02-26 11:24:27 -0800
committerTony Hutter <[email protected]>2022-03-01 09:45:48 -0800
commitddcdccbcc448ad5dcdafc872a2fa777e0b953680 (patch)
tree937aceac98bdf349a860ce2f1cc77f7f9f3777db /cmd/zstream
parentf2eaa978402bd342ec84425f0722af709dd02e48 (diff)
Fix erroneous zstreamdump warning
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Amanakis <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #13154
Diffstat (limited to 'cmd/zstream')
-rw-r--r--cmd/zstream/zstream_dump.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/zstream/zstream_dump.c b/cmd/zstream/zstream_dump.c
index af69a1494..04a4986b4 100644
--- a/cmd/zstream/zstream_dump.c
+++ b/cmd/zstream/zstream_dump.c
@@ -297,6 +297,7 @@ zstream_do_dump(int argc, char *argv[])
fletcher_4_init();
while (read_hdr(drr, &zc)) {
+ uint64_t featureflags = 0;
/*
* If this is the first DMU record being processed, check for
@@ -362,6 +363,9 @@ zstream_do_dump(int argc, char *argv[])
BSWAP_64(drrb->drr_fromguid);
}
+ featureflags =
+ DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo);
+
(void) printf("BEGIN record\n");
(void) printf("\thdrtype = %lld\n",
DMU_GET_STREAM_HDRTYPE(drrb->drr_versioninfo));
@@ -461,7 +465,8 @@ zstream_do_dump(int argc, char *argv[])
BSWAP_64(drro->drr_maxblkid);
}
- if (drro->drr_bonuslen > drro->drr_raw_bonuslen) {
+ if (featureflags & DMU_BACKUP_FEATURE_RAW &&
+ drro->drr_bonuslen > drro->drr_raw_bonuslen) {
(void) fprintf(stderr,
"Warning: Object %llu has bonuslen = "
"%u > raw_bonuslen = %u\n\n",