diff options
| author | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | 2014-04-07 15:38:17 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2016-12-11 13:00:51 +0100 |
| commit | 4b10f7c4be47c84e2bf91d89d1d2981db93046d0 (patch) | |
| tree | aafb28bf1f1bc6dede5fb478935edb512f794efb /include | |
| parent | 6f910c187b06beacad8b85ebe154e05ab45a8cb3 (diff) | |
zram: make compression algorithm selection possible
Add and document `comp_algorithm' device attribute. This attribute allows
to show supported compression and currently selected compression
algorithms:
cat /sys/block/zram0/comp_algorithm
[lzo] lz4
and change selected compression algorithm:
echo lzo > /sys/block/zram0/comp_algorithm
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Jerome Marchand <jmarchan@redhat.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/zram_drv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/zram_drv.h b/include/linux/zram_drv.h index b6db10f35..3cca0003a 100644 --- a/include/linux/zram_drv.h +++ b/include/linux/zram_drv.h @@ -101,6 +101,7 @@ struct zram { u64 disksize; /* bytes */ int max_comp_streams; struct zram_stats stats; + char compressor[10]; }; extern struct zram *zram_devices; |
