mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
compress: rework callers to always use the zio_compress calls
This will make future refactoring easier. There are two we can't change for the moment, because zio_compress_data does hole detection & collapsing which zio_decompress_data does not actually know how to handle. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
This commit is contained in:
+5
-2
@@ -142,8 +142,11 @@ decode_embedded_bp(const blkptr_t *bp, void *buf, int buflen)
|
||||
if (BP_GET_COMPRESS(bp) != ZIO_COMPRESS_OFF) {
|
||||
uint8_t dstbuf[BPE_PAYLOAD_SIZE];
|
||||
decode_embedded_bp_compressed(bp, dstbuf);
|
||||
VERIFY0(zio_decompress_data_buf(BP_GET_COMPRESS(bp),
|
||||
dstbuf, buf, psize, buflen, NULL));
|
||||
abd_t dstabd;
|
||||
abd_get_from_buf_struct(&dstabd, dstbuf, psize);
|
||||
VERIFY0(zio_decompress_data(BP_GET_COMPRESS(bp), &dstabd,
|
||||
buf, psize, buflen, NULL));
|
||||
abd_free(&dstabd);
|
||||
} else {
|
||||
ASSERT3U(lsize, ==, psize);
|
||||
decode_embedded_bp_compressed(bp, buf);
|
||||
|
||||
Reference in New Issue
Block a user