mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
DLPX-44812 integrate EP-220 large memory scalability
This commit is contained in:
committed by
Brian Behlendorf
parent
616fa7c02b
commit
a6255b7fce
@@ -22,12 +22,14 @@
|
||||
/*
|
||||
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
* Copyright (c) 2015 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2015, 2016 by Delphix. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _SYS_ZIO_COMPRESS_H
|
||||
#define _SYS_ZIO_COMPRESS_H
|
||||
|
||||
#include <sys/abd.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -59,14 +61,21 @@ typedef size_t zio_compress_func_t(void *src, void *dst,
|
||||
typedef int zio_decompress_func_t(void *src, void *dst,
|
||||
size_t s_len, size_t d_len, int);
|
||||
|
||||
/*
|
||||
* Common signature for all zio decompress functions using an ABD as input.
|
||||
* This is helpful if you have both compressed ARC and scatter ABDs enabled,
|
||||
* but is not a requirement for all compression algorithms.
|
||||
*/
|
||||
typedef int zio_decompress_abd_func_t(abd_t *src, void *dst,
|
||||
size_t s_len, size_t d_len, int);
|
||||
/*
|
||||
* Information about each compression function.
|
||||
*/
|
||||
typedef const struct zio_compress_info {
|
||||
zio_compress_func_t *ci_compress; /* compression function */
|
||||
zio_decompress_func_t *ci_decompress; /* decompression function */
|
||||
int ci_level; /* level parameter */
|
||||
char *ci_name; /* algorithm name */
|
||||
char *ci_name;
|
||||
int ci_level;
|
||||
zio_compress_func_t *ci_compress;
|
||||
zio_decompress_func_t *ci_decompress;
|
||||
} zio_compress_info_t;
|
||||
|
||||
extern zio_compress_info_t zio_compress_table[ZIO_COMPRESS_FUNCTIONS];
|
||||
@@ -96,13 +105,16 @@ extern size_t lz4_compress_zfs(void *src, void *dst, size_t s_len, size_t d_len,
|
||||
int level);
|
||||
extern int lz4_decompress_zfs(void *src, void *dst, size_t s_len, size_t d_len,
|
||||
int level);
|
||||
|
||||
extern int lz4_decompress_abd(abd_t *src, void *dst, size_t s_len, size_t d_len,
|
||||
int level);
|
||||
/*
|
||||
* Compress and decompress data if necessary.
|
||||
*/
|
||||
extern size_t zio_compress_data(enum zio_compress c, void *src, void *dst,
|
||||
extern size_t zio_compress_data(enum zio_compress c, abd_t *src, void *dst,
|
||||
size_t s_len);
|
||||
extern int zio_decompress_data(enum zio_compress c, void *src, void *dst,
|
||||
extern int zio_decompress_data(enum zio_compress c, abd_t *src, void *dst,
|
||||
size_t s_len, size_t d_len);
|
||||
extern int zio_decompress_data_buf(enum zio_compress c, void *src, void *dst,
|
||||
size_t s_len, size_t d_len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user