aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/zram/zcomp.h
diff options
context:
space:
mode:
authorSergey Senozhatsky <sergey.senozhatsky@gmail.com>2014-04-07 18:38:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-07 19:36:01 -0400
commite46b8a030d76d3c94156c545c3f4c3676d813435 (patch)
tree9629389f89d3086a6428ec6a8e47bc59ddfcf3ec /drivers/block/zram/zcomp.h
parentfe8eb122c82b2049c460fc6df6e8583a2f935cff (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 'drivers/block/zram/zcomp.h')
-rw-r--r--drivers/block/zram/zcomp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/zram/zcomp.h b/drivers/block/zram/zcomp.h
index bd11d59c5dd1..8b8997f8613b 100644
--- a/drivers/block/zram/zcomp.h
+++ b/drivers/block/zram/zcomp.h
@@ -50,6 +50,8 @@ struct zcomp {
50 void (*destroy)(struct zcomp *comp); 50 void (*destroy)(struct zcomp *comp);
51}; 51};
52 52
53ssize_t zcomp_available_show(const char *comp, char *buf);
54
53struct zcomp *zcomp_create(const char *comp, int max_strm); 55struct zcomp *zcomp_create(const char *comp, int max_strm);
54void zcomp_destroy(struct zcomp *comp); 56void zcomp_destroy(struct zcomp *comp);
55 57