Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v5.6 40 lines 1.1 kB view raw
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * Copyright (C) 2014 Sergey Senozhatsky. 4 */ 5 6#ifndef _ZCOMP_H_ 7#define _ZCOMP_H_ 8 9struct zcomp_strm { 10 /* compression/decompression buffer */ 11 void *buffer; 12 struct crypto_comp *tfm; 13}; 14 15/* dynamic per-device compression frontend */ 16struct zcomp { 17 struct zcomp_strm * __percpu *stream; 18 const char *name; 19 struct hlist_node node; 20}; 21 22int zcomp_cpu_up_prepare(unsigned int cpu, struct hlist_node *node); 23int zcomp_cpu_dead(unsigned int cpu, struct hlist_node *node); 24ssize_t zcomp_available_show(const char *comp, char *buf); 25bool zcomp_available_algorithm(const char *comp); 26 27struct zcomp *zcomp_create(const char *comp); 28void zcomp_destroy(struct zcomp *comp); 29 30struct zcomp_strm *zcomp_stream_get(struct zcomp *comp); 31void zcomp_stream_put(struct zcomp *comp); 32 33int zcomp_compress(struct zcomp_strm *zstrm, 34 const void *src, unsigned int *dst_len); 35 36int zcomp_decompress(struct zcomp_strm *zstrm, 37 const void *src, unsigned int src_len, void *dst); 38 39bool zcomp_set_max_streams(struct zcomp *comp, int num_strm); 40#endif /* _ZCOMP_H_ */