summaryrefslogtreecommitdiffstats
path: root/fs/pstore/Kconfig
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2016-02-18 22:04:22 +0800
committerKees Cook <keescook@chromium.org>2016-06-02 10:59:31 -0700
commit8cfc8ddc99df9509a46043b14af81f5c6a223eab (patch)
treefd5bb1b71a1c8418b672ccfa039babf84251b95a /fs/pstore/Kconfig
parent235f6d157d43a761052e643b8799f86fdc87b47f (diff)
downloadlinux-8cfc8ddc99df9509a46043b14af81f5c6a223eab.tar.gz
linux-8cfc8ddc99df9509a46043b14af81f5c6a223eab.tar.bz2
linux-8cfc8ddc99df9509a46043b14af81f5c6a223eab.zip
pstore: add lzo/lz4 compression support
Like zlib compression in pstore, this patch added lzo and lz4 compression support so that users can have more options and better compression ratio. The original code treats the compressed data together with the uncompressed ECC correction notice by using zlib decompress. The ECC correction notice is missing in the decompression process. The treatment also makes lzo and lz4 not working. So I treat them separately by using pstore_decompress() to treat the compressed data, and memcpy() to treat the uncompressed ECC correction notice. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'fs/pstore/Kconfig')
-rw-r--r--fs/pstore/Kconfig31
1 files changed, 29 insertions, 2 deletions
diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig
index 360ae43f590c..be40813eff52 100644
--- a/fs/pstore/Kconfig
+++ b/fs/pstore/Kconfig
@@ -1,8 +1,6 @@
config PSTORE
tristate "Persistent store support"
default n
- select ZLIB_DEFLATE
- select ZLIB_INFLATE
help
This option enables generic access to platform level
persistent storage via "pstore" filesystem that can
@@ -14,6 +12,35 @@ config PSTORE
If you don't have a platform persistent store driver,
say N.
+choice
+ prompt "Choose compression algorithm"
+ depends on PSTORE
+ default PSTORE_ZLIB_COMPRESS
+ help
+ This option chooses compression algorithm.
+
+config PSTORE_ZLIB_COMPRESS
+ bool "ZLIB"
+ select ZLIB_DEFLATE
+ select ZLIB_INFLATE
+ help
+ This option enables ZLIB compression algorithm support.
+
+config PSTORE_LZO_COMPRESS
+ bool "LZO"
+ select LZO_COMPRESS
+ select LZO_DECOMPRESS
+ help
+ This option enables LZO compression algorithm support.
+
+config PSTORE_LZ4_COMPRESS
+ bool "LZ4"
+ select LZ4_COMPRESS
+ select LZ4_DECOMPRESS
+ help
+ This option enables LZ4 compression algorithm support.
+endchoice
+
config PSTORE_CONSOLE
bool "Log kernel console messages"
depends on PSTORE