-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "zstreamdump" integrity check program #905
Comments
Upstream is here: https://github.com/illumos/illumos-gate/tree/master/usr/src/cmd/zstreamdump @mmatuska wrote a man page for FreeBSD here: https://github.com/freebsd/freebsd-head/tree/master/cddl/contrib/opensolaris/cmd/zstreamdump |
It looks pretty straight forward to bring in. It's also CDDL licensed and in the Illumos tree so there no issue there. I'd suggest it be added in cmd/zstreamdump/ and we'll want to pull in the man page too. |
References: openzfs#905 openzfs@b79fc3f change @safe_malloc(size_t size) (void) fprintf(stderr, "ERROR; failed to allocate %u bytes\n", to (void) fprintf(stderr, "ERROR; failed to allocate %zu bytes\n", and (unsigned)size); to size);
Reviewed by: Christopher Siden <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Bayard Bell <[email protected]> Approved by: Albert Lee <[email protected]> References: illumos/illumos-gate@98110f0 https://www.illumos.org/issues/5746 openzfs#905 (Add "zstreamdump" integrity check program openzfs#905) openzfs@b79fc3f (Add zstreamdump(8) command to examine ZFS send streams.) Porting notes: account for ISO C90 warnings (-Werror=declaration-after-statement) account for error: format '%llx' expects argument of type 'long long unsigned int', but argument X has type 'uint64_t' [-Werror=format=] arc_buf_t *abuf; dmu_buf_t *bonus; zio_cksum_t cksum_orig; zio_cksum_t *cksump; Fix whitespace change (void) fprintf(stderr, "ERROR; failed to allocate %u bytes\n", (unsigned)size); to (void) fprintf(stderr, "ERROR; failed to allocate %zu bytes\n", size); and to account for long unsigned int & match upstream Ported-by: kernelOfTruth [email protected]
Reviewed by: Christopher Siden <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Bayard Bell <[email protected]> Approved by: Albert Lee <[email protected]> References: illumos/illumos-gate@98110f0 https://www.illumos.org/issues/5746 openzfs#905 (Add "zstreamdump" integrity check program openzfs#905) openzfs@b79fc3f (Add zstreamdump(8) command to examine ZFS send streams.) Porting notes: Some of those changes were somewhat hard to track due to: openzfs@2024041 Remove superfluous statement openzfs@044baf0 Use taskq for dump_bytes() openzfs@88904bb Illumos 5162 - zfs recv should use loaned arc buffer to avoid copy kmem_alloc calls were changed to vmem_alloc in accordance with openzfs@77aef6f (Use vmem_alloc() for nvlists) and the kmem-rework account for ISO C90 warnings (-Werror=declaration-after-statement) account for error: format '%llx' expects argument of type 'long long unsigned int', but argument X has type 'uint64_t' [-Werror=format=] arc_buf_t *abuf; dmu_buf_t *bonus; zio_cksum_t cksum_orig; zio_cksum_t *cksump; Fix whitespace change (void) fprintf(stderr, "ERROR; failed to allocate %u bytes\n", (unsigned)size); to (void) fprintf(stderr, "ERROR; failed to allocate %zu bytes\n", size); and to account for long unsigned int & match upstream Ported-by: kernelOfTruth [email protected]
Reviewed by: Christopher Siden <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Bayard Bell <[email protected]> Approved by: Albert Lee <[email protected]> References: illumos/illumos-gate@98110f0 https://www.illumos.org/issues/5746 openzfs#905 (Add "zstreamdump" integrity check program openzfs#905) openzfs@b79fc3f (Add zstreamdump(8) command to examine ZFS send streams.) Porting notes: Some of those changes were somewhat hard to track due to: openzfs@2024041 Remove superfluous statement openzfs@044baf0 Use taskq for dump_bytes() openzfs@88904bb Illumos 5162 - zfs recv should use loaned arc buffer to avoid copy kmem_alloc calls were changed to vmem_alloc in accordance with openzfs@77aef6f (Use vmem_alloc() for nvlists) and the kmem-rework account for ISO C90 warnings (-Werror=declaration-after-statement) account for error: format '%llx' expects argument of type 'long long unsigned int', but argument X has type 'uint64_t' [-Werror=format=] arc_buf_t *abuf; dmu_buf_t *bonus; zio_cksum_t cksum_orig; zio_cksum_t *cksump; Fix whitespace change (void) fprintf(stderr, "ERROR; failed to allocate %u bytes\n", (unsigned)size); to (void) fprintf(stderr, "ERROR; failed to allocate %zu bytes\n", size); and to account for long unsigned int & match upstream Ported-by: kernelOfTruth [email protected]
Reviewed by: Christopher Siden <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Bayard Bell <[email protected]> Approved by: Albert Lee <[email protected]> References: illumos/illumos-gate@98110f0 https://www.illumos.org/issues/5746 openzfs#905 (Add "zstreamdump" integrity check program openzfs#905) openzfs@b79fc3f (Add zstreamdump(8) command to examine ZFS send streams.) Porting notes: Some of those changes were somewhat hard to track due to: openzfs@2024041 Remove superfluous statement openzfs@044baf0 Use taskq for dump_bytes() openzfs@88904bb Illumos 5162 - zfs recv should use loaned arc buffer to avoid copy kmem_alloc calls were changed to vmem_alloc in accordance with openzfs@77aef6f (Use vmem_alloc() for nvlists) and the kmem-rework account for ISO C90 warnings (-Werror=declaration-after-statement) account for error: format '%llx' expects argument of type 'long long unsigned int', but argument X has type 'uint64_t' [-Werror=format=] arc_buf_t *abuf; dmu_buf_t *bonus; zio_cksum_t cksum_orig; zio_cksum_t *cksump; Fix whitespace change (void) fprintf(stderr, "ERROR; failed to allocate %u bytes\n", (unsigned)size); to (void) fprintf(stderr, "ERROR; failed to allocate %zu bytes\n", size); and to account for long unsigned int & match upstream Ported-by: kernelOfTruth [email protected]
Reviewed by: Christopher Siden <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Bayard Bell <[email protected]> Approved by: Albert Lee <[email protected]> References: illumos/illumos-gate@98110f0 https://www.illumos.org/issues/5746 openzfs#905 (Add "zstreamdump" integrity check program openzfs#905) openzfs@b79fc3f (Add zstreamdump(8) command to examine ZFS send streams.) Porting notes: Some of those changes were somewhat hard to track due to: openzfs@2024041 Remove superfluous statement openzfs@044baf0 Use taskq for dump_bytes() openzfs@88904bb Illumos 5162 - zfs recv should use loaned arc buffer to avoid copy kmem_alloc calls were changed to vmem_alloc in accordance with openzfs@77aef6f (Use vmem_alloc() for nvlists) and the kmem-rework account for ISO C90 warnings (-Werror=declaration-after-statement) account for error: format '%llx' expects argument of type 'long long unsigned int', but argument X has type 'uint64_t' [-Werror=format=] arc_buf_t *abuf; dmu_buf_t *bonus; zio_cksum_t cksum_orig; zio_cksum_t *cksump; Fix whitespace change (void) fprintf(stderr, "ERROR; failed to allocate %u bytes\n", (unsigned)size); to (void) fprintf(stderr, "ERROR; failed to allocate %zu bytes\n", size); and to account for long unsigned int & match upstream Ported-by: kernelOfTruth [email protected]
Reviewed by: Christopher Siden <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Bayard Bell <[email protected]> Approved by: Albert Lee <[email protected]> References: illumos/illumos-gate@98110f0 https://www.illumos.org/issues/5746 openzfs#905 (Add "zstreamdump" integrity check program openzfs#905) openzfs@b79fc3f (Add zstreamdump(8) command to examine ZFS send streams.) Porting notes: Some of those changes were somewhat hard to track due to: openzfs@2024041 Remove superfluous statement openzfs@044baf0 Use taskq for dump_bytes() openzfs@88904bb Illumos 5162 - zfs recv should use loaned arc buffer to avoid copy kmem_alloc calls were changed to vmem_alloc in accordance with openzfs@77aef6f (Use vmem_alloc() for nvlists) and the kmem-rework account for ISO C90 warnings (-Werror=declaration-after-statement) account for error: format '%llx' expects argument of type 'long long unsigned int', but argument X has type 'uint64_t' [-Werror=format=] arc_buf_t *abuf; dmu_buf_t *bonus; zio_cksum_t cksum_orig; zio_cksum_t *cksump; Fix whitespace change (void) fprintf(stderr, "ERROR; failed to allocate %u bytes\n", (unsigned)size); to (void) fprintf(stderr, "ERROR; failed to allocate %zu bytes\n", size); and to account for long unsigned int & match upstream Ported-by: kernelOfTruth [email protected]
5746 more checksumming in zfs send Reviewed by: Christopher Siden <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Bayard Bell <[email protected]> Approved by: Albert Lee <[email protected]> References: https://www.illumos.org/issues/5746 illumos/illumos-gate@98110f0 #905 Porting notes: - Minor conflicts due to: - 2024041 - 044baf0 - 88904bb - Fix ISO C90 warnings (-Werror=declaration-after-statement) - arc_buf_t *abuf; - dmu_buf_t *bonus; - zio_cksum_t cksum_orig; - zio_cksum_t *cksump; - Fix format '%llx' format specifier warning - Align message in zstreamdump safe_malloc() with upstream Ported-by: kernelOfTruth [email protected] Signed-off-by: Brian Behlendorf <[email protected]> Closes #3611
5746 more checksumming in zfs send Reviewed by: Christopher Siden <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Bayard Bell <[email protected]> Approved by: Albert Lee <[email protected]> References: https://www.illumos.org/issues/5746 illumos/illumos-gate@98110f0 openzfs#905 Porting notes: - Minor conflicts due to: - openzfs@2024041 - openzfs@044baf0 - openzfs@88904bb - Fix ISO C90 warnings (-Werror=declaration-after-statement) - arc_buf_t *abuf; - dmu_buf_t *bonus; - zio_cksum_t cksum_orig; - zio_cksum_t *cksump; - Fix format '%llx' format specifier warning - Align message in zstreamdump safe_malloc() with upstream Ported-by: kernelOfTruth [email protected] Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#3611
5746 more checksumming in zfs send Reviewed by: Christopher Siden <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Bayard Bell <[email protected]> Approved by: Albert Lee <[email protected]> References: https://www.illumos.org/issues/5746 illumos/illumos-gate@98110f0 openzfs#905 Porting notes: - Minor conflicts due to: - 2024041 - 044baf0 - 88904bb - Fix ISO C90 warnings (-Werror=declaration-after-statement) - arc_buf_t *abuf; - dmu_buf_t *bonus; - zio_cksum_t cksum_orig; - zio_cksum_t *cksump; - Fix format '%llx' format specifier warning - Align message in zstreamdump safe_malloc() with upstream Ported-by: kernelOfTruth [email protected] Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#3611
There exists a program called "zstreamdump" that can be used to check the integrity of a "zfs send" stream: http://blog.richardelling.com/2009/10/check-integrity-of-zfs-send-streams.html
It would be nice to have it available in ZoL.
The text was updated successfully, but these errors were encountered: