diff options
author | Richard Yao <[email protected]> | 2023-02-27 17:41:02 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2023-02-27 14:41:02 -0800 |
commit | bff26b022066c92dfdb405c3c67d841269b5a2a3 (patch) | |
tree | 370ef2bbc2af3856c493985a77e790f2a48347ca /include/sys | |
parent | f58e513f7408f353bf0151fdaf235d4e062e8950 (diff) |
Skip memory allocation when compressing holes
Hole detection in the zio compression code allows us to
opportunistically skip compression on holes. We can go a step further
by not doing memory allocations on holes either.
Reviewed-by: Brian Atkinson <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Sponsored-by: Wasabi Technology, Inc.
Closes #14500
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/zio_compress.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/zio_compress.h b/include/sys/zio_compress.h index 19fc44952..691d7b624 100644 --- a/include/sys/zio_compress.h +++ b/include/sys/zio_compress.h @@ -183,7 +183,7 @@ extern int lz4_decompress_zfs(void *src, void *dst, size_t s_len, size_t d_len, /* * Compress and decompress data if necessary. */ -extern size_t zio_compress_data(enum zio_compress c, abd_t *src, void *dst, +extern size_t zio_compress_data(enum zio_compress c, abd_t *src, void **dst, size_t s_len, uint8_t level); extern int zio_decompress_data(enum zio_compress c, abd_t *src, void *dst, size_t s_len, size_t d_len, uint8_t *level); |