mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
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 <batkinson@lanl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Richard Yao <richard.yao@klarasystems.com> Sponsored-by: Wasabi Technology, Inc. Closes #14500
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user