]> git.proxmox.com Git - mirror_zfs.git/commit
zstream: allow decompress to fix metadata for uncompressed records
authorAlan Somers <asomers@FreeBSD.org>
Fri, 14 Oct 2022 20:40:00 +0000 (14:40 -0600)
committerGitHub <noreply@github.com>
Fri, 14 Oct 2022 20:40:00 +0000 (13:40 -0700)
commita1034ee90978042c3c744ef11549cd732dd1dcfd
treed5ddbf3486841c93bce5365fc643a748fca00c1d
parent6a42939fcd62533b7675e4c3fce12ded70806583
zstream: allow decompress to fix metadata for uncompressed records

If a record is uncompressed on-disk but the block pointer insists
otherwise, reading it will return EIO.  This commit adds an "off" type
to the "zstream decompress" command.  Using it will set the compression
field in a zfs stream to "off" without changing the record's data.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Alan Somers <asomers@FreeBSD.org>
Sponsored by: Axcient
Closes #13997
cmd/zstream/zstream_decompress.c
man/man8/zstream.8