Skip to content
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

Closed
dalbani opened this issue Aug 28, 2012 · 2 comments
Closed

Add "zstreamdump" integrity check program #905

dalbani opened this issue Aug 28, 2012 · 2 comments
Labels
Type: Feature Feature request or new feature
Milestone

Comments

@dalbani
Copy link
Contributor

dalbani commented Aug 28, 2012

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.

@behlendorf
Copy link
Contributor

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.

kernelOfTruth added a commit to kernelOfTruth/zfs that referenced this issue Jul 19, 2015
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);
kernelOfTruth pushed a commit to kernelOfTruth/zfs that referenced this issue Jul 19, 2015
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]
kernelOfTruth pushed a commit to kernelOfTruth/zfs that referenced this issue Jul 19, 2015
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]
kernelOfTruth pushed a commit to kernelOfTruth/zfs that referenced this issue Jul 19, 2015
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]
kernelOfTruth pushed a commit to kernelOfTruth/zfs that referenced this issue Nov 21, 2015
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]
kernelOfTruth pushed a commit to kernelOfTruth/zfs that referenced this issue Dec 10, 2015
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]
kernelOfTruth pushed a commit to kernelOfTruth/zfs that referenced this issue Dec 22, 2015
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]
behlendorf pushed a commit that referenced this issue Dec 30, 2015
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
goulvenriou pushed a commit to Alyseo/zfs that referenced this issue Jan 17, 2016
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
kernelOfTruth pushed a commit to kernelOfTruth/zfs that referenced this issue Aug 27, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Feature request or new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants