jffs2: Add a "favourlzo" compression mode to jffs2
Subsystems (4)
PATCH 4/5 jffs2: Add a "favourlzo" compression mode to jffs2
Add a "favourlzo" compression mode to jffs2 which tries to optimise by size but gives lzo an advantage when comparing sizes. This means the faster lzo algorithm can be preferred when there isn't much difference in compressed size (the exact threshold can be changed).
Signed-off-by Richard Purdie <[email protected]>
--- fs/Kconfig | 7 +++++++ fs/jffs2/compr.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++----- fs/jffs2/compr.h | 3 +++ 3 files changed, 56 insertions(+), 5 deletions(-)
fs/Kconfig +7 -0
@@ -1359,6 +1359,13 @@ config JFFS2_CMODE_SIZE Tries all compressors and chooses the one which has the smallest result. +config JFFS2_CMODE_FAVOURLZO + bool "Favour LZO" + help + Tries all compressors and chooses the one which has the smallest + result but gives some preference to LZO (which has faster + decompression) at the expense of size. + endchoice config CRAMFS
fs/jffs2/compr.c +46 -5
108 lines not on this page · raw message
fs/jffs2/compr.h +3 -0
@@ -41,6 +41,9 @@#define JFFS2_COMPR_MODE_NONE 0#define JFFS2_COMPR_MODE_PRIORITY 1#define JFFS2_COMPR_MODE_SIZE 2 +#define JFFS2_COMPR_MODE_FAVOURLZO 3 + +#define FAVOUR_LZO_PERCENT 80struct jffs2_compressor {struct list_head list;
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/