aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2023-02-27 17:41:02 -0500
committerGitHub <[email protected]>2023-02-27 14:41:02 -0800
commitbff26b022066c92dfdb405c3c67d841269b5a2a3 (patch)
tree370ef2bbc2af3856c493985a77e790f2a48347ca /include/sys
parentf58e513f7408f353bf0151fdaf235d4e062e8950 (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.h2
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);