Skip to content

Commit

Permalink
Linux 3.11 compat: Rename LZ4 symbols
Browse files Browse the repository at this point in the history
Linus Torvalds merged LZ4 into Linux 3.11. This causes a conflict
whenever CONFIG_LZ4_DECOMPRESS=y or CONFIG_LZ4_COMPRESS=y are set in the
kernel's .config. We rename the symbols to avoid the conflict.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1789
  • Loading branch information
ryao authored and behlendorf committed Oct 22, 2013
1 parent 2e2ddc3 commit b3c49d3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/sys/zio_compress.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ extern size_t zle_compress(void *src, void *dst, size_t s_len, size_t d_len,
int level);
extern int zle_decompress(void *src, void *dst, size_t s_len, size_t d_len,
int level);
extern size_t lz4_compress(void *src, void *dst, size_t s_len, size_t d_len,
extern size_t lz4_compress_zfs(void *src, void *dst, size_t s_len, size_t d_len,
int level);
extern int lz4_decompress(void *src, void *dst, size_t s_len, size_t d_len,
extern int lz4_decompress_zfs(void *src, void *dst, size_t s_len, size_t d_len,
int level);

/*
Expand Down
4 changes: 2 additions & 2 deletions module/zfs/lz4.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static kmem_cache_t *lz4_cache;

/*ARGSUSED*/
size_t
lz4_compress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
lz4_compress_zfs(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
{
uint32_t bufsiz;
char *dest = d_start;
Expand All @@ -74,7 +74,7 @@ lz4_compress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)

/*ARGSUSED*/
int
lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
lz4_decompress_zfs(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
{
const char *src = s_start;
uint32_t bufsiz = BE_IN32(src);
Expand Down
2 changes: 1 addition & 1 deletion module/zfs/zio_compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ zio_compress_info_t zio_compress_table[ZIO_COMPRESS_FUNCTIONS] = {
{gzip_compress, gzip_decompress, 8, "gzip-8"},
{gzip_compress, gzip_decompress, 9, "gzip-9"},
{zle_compress, zle_decompress, 64, "zle"},
{lz4_compress, lz4_decompress, 0, "lz4"},
{lz4_compress_zfs, lz4_decompress_zfs, 0, "lz4"},
};

enum zio_compress
Expand Down

0 comments on commit b3c49d3

Please sign in to comment.