mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
compress: change compression providers API to use ABDs
This commit changes the provider compress and decompress API to take ABD pointers instead of buffer pointers for both data source and destination. It then updates all providers to match. This doesn't actually change the providers to do chunked compression, just changes the API to allow such an update in the future. Helper macros are added to easily adapt the ABD functions to their buffer-based implementations. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
This commit is contained in:
@@ -90,12 +90,12 @@ typedef struct zfs_zstd_meta {
|
||||
int zstd_init(void);
|
||||
void zstd_fini(void);
|
||||
|
||||
size_t zfs_zstd_compress(void *s_start, void *d_start, size_t s_len,
|
||||
size_t zfs_zstd_compress(abd_t *src, abd_t *dst, size_t s_len,
|
||||
size_t d_len, int level);
|
||||
int zfs_zstd_get_level(void *s_start, size_t s_len, uint8_t *level);
|
||||
int zfs_zstd_decompress_level(void *s_start, void *d_start, size_t s_len,
|
||||
int zfs_zstd_decompress_level(abd_t *src, abd_t *dst, size_t s_len,
|
||||
size_t d_len, uint8_t *level);
|
||||
int zfs_zstd_decompress(void *s_start, void *d_start, size_t s_len,
|
||||
int zfs_zstd_decompress(abd_t *src, abd_t *dst, size_t s_len,
|
||||
size_t d_len, int n);
|
||||
void zfs_zstd_cache_reap_now(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user