diff options
author | Eric Dillmann <[email protected]> | 2013-01-23 10:54:30 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-01-29 09:28:20 -0800 |
commit | 9759c60f1a1503e48dc5c45a209c3edd5758319f (patch) | |
tree | ad56536c5e57c831f38f4b0df81f816470f28c1c /module/zfs/zio_compress.c | |
parent | ff5b1c8065c8a43add534892172f0aa5aba90f3d (diff) |
Illumos #3035 LZ4 compression support in ZFS and GRUB
3035 LZ4 compression support in ZFS and GRUB
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: Christopher Siden <[email protected]>
Reviewed by: George Wilson <[email protected]>
Approved by: Christopher Siden <[email protected]>
References:
illumos/illumos-gate@a6f561b4aee75d0d028e7b36b151c8ed8a86bc76
https://www.illumos.org/issues/3035
http://wiki.illumos.org/display/illumos/LZ4+Compression+In+ZFS
This patch has been slightly modified from the upstream Illumos
version to be compatible with Linux. Due to the very limited
stack space in the kernel a lz4 workspace kmem cache is used.
Since we are using gcc we are also able to take advantage of the
gcc optimized __builtin_ctz functions.
Support for GRUB has been dropped from this patch. That code
is available but those changes will need to made to the upstream
GRUB package.
Lastly, several hunks of dead code were dropped for clarity. They
include the functions real_LZ4_uncompress(), LZ4_compressBound()
and the Visual Studio specific hunks wrapped in _MSC_VER.
Ported-by: Eric Dillmann <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #1217
Diffstat (limited to 'module/zfs/zio_compress.c')
-rw-r--r-- | module/zfs/zio_compress.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/module/zfs/zio_compress.c b/module/zfs/zio_compress.c index f148977c4..1dc780d4b 100644 --- a/module/zfs/zio_compress.c +++ b/module/zfs/zio_compress.c @@ -23,6 +23,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + */ #include <sys/zfs_context.h> #include <sys/compress.h> @@ -50,6 +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"}, }; enum zio_compress |