Skip to content
This repository has been archived by the owner on Nov 13, 2019. It is now read-only.

Commit

Permalink
zram: Move default compression algorithm choice to Kconfig
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
[@0ctobot: Enforce Zstandard compression algorithm]
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
  • Loading branch information
nathanchance authored and 0ctobot committed Dec 6, 2018
1 parent e91d01c commit af09634
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions drivers/block/zram/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ config ZRAM_MEMORY_TRACKING
/sys/kernel/debug/zram/zramX/block_state.

See Documentation/blockdev/zram.txt for more information.

config ZRAM_DEFAULT_COMP_ALGORITHM
string "Default ZRAM algorithm"
default "zstd"
2 changes: 1 addition & 1 deletion drivers/block/zram/zram_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static DEFINE_IDR(zram_index_idr);
static DEFINE_MUTEX(zram_index_mutex);

static int zram_major;
static const char *default_compressor = "lzo";
static const char *default_compressor = CONFIG_ZRAM_DEFAULT_COMP_ALGORITHM;

/* Module params (documentation at end) */
static unsigned int num_devices = 1;
Expand Down

0 comments on commit af09634

Please sign in to comment.