Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/boot/zfs/zfssubr.c
Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | typedef struct zio_compress_info { | ||||
zio_decompress_func_t *ci_decompress; /* decompression function */ | zio_decompress_func_t *ci_decompress; /* decompression function */ | ||||
int ci_level; /* level parameter */ | int ci_level; /* level parameter */ | ||||
const char *ci_name; /* algorithm name */ | const char *ci_name; /* algorithm name */ | ||||
} zio_compress_info_t; | } zio_compress_info_t; | ||||
#include "lzjb.c" | #include "lzjb.c" | ||||
#include "zle.c" | #include "zle.c" | ||||
#include "lz4.c" | #include "lz4.c" | ||||
#include "zstd.c" | |||||
/* | /* | ||||
* Compression vectors. | * Compression vectors. | ||||
*/ | */ | ||||
static zio_compress_info_t zio_compress_table[ZIO_COMPRESS_FUNCTIONS] = { | static zio_compress_info_t zio_compress_table[ZIO_COMPRESS_FUNCTIONS] = { | ||||
{NULL, NULL, 0, "inherit"}, | {NULL, NULL, 0, "inherit"}, | ||||
{NULL, NULL, 0, "on"}, | {NULL, NULL, 0, "on"}, | ||||
{NULL, NULL, 0, "uncompressed"}, | {NULL, NULL, 0, "uncompressed"}, | ||||
{NULL, lzjb_decompress, 0, "lzjb"}, | {NULL, lzjb_decompress, 0, "lzjb"}, | ||||
{NULL, NULL, 0, "empty"}, | {NULL, NULL, 0, "empty"}, | ||||
{NULL, NULL, 1, "gzip-1"}, | {NULL, NULL, 1, "gzip-1"}, | ||||
{NULL, NULL, 2, "gzip-2"}, | {NULL, NULL, 2, "gzip-2"}, | ||||
{NULL, NULL, 3, "gzip-3"}, | {NULL, NULL, 3, "gzip-3"}, | ||||
{NULL, NULL, 4, "gzip-4"}, | {NULL, NULL, 4, "gzip-4"}, | ||||
{NULL, NULL, 5, "gzip-5"}, | {NULL, NULL, 5, "gzip-5"}, | ||||
{NULL, NULL, 6, "gzip-6"}, | {NULL, NULL, 6, "gzip-6"}, | ||||
{NULL, NULL, 7, "gzip-7"}, | {NULL, NULL, 7, "gzip-7"}, | ||||
{NULL, NULL, 8, "gzip-8"}, | {NULL, NULL, 8, "gzip-8"}, | ||||
{NULL, NULL, 9, "gzip-9"}, | {NULL, NULL, 9, "gzip-9"}, | ||||
{NULL, zle_decompress, 64, "zle"}, | {NULL, zle_decompress, 64, "zle"}, | ||||
{NULL, lz4_decompress, 0, "lz4"}, | {NULL, lz4_decompress, 0, "lz4"}, | ||||
{NULL, zstd_decompress, 0, "zstd"}, | |||||
}; | }; | ||||
static void | static void | ||||
byteswap_uint64_array(void *vbuf, size_t size) | byteswap_uint64_array(void *vbuf, size_t size) | ||||
{ | { | ||||
uint64_t *buf = vbuf; | uint64_t *buf = vbuf; | ||||
size_t count = size >> 3; | size_t count = size >> 3; | ||||
int i; | int i; | ||||
▲ Show 20 Lines • Show All 1,594 Lines • Show Last 20 Lines |