From: Rui Salvaterra Date: Mon, 5 Apr 2021 15:29:35 +0000 (+0100) Subject: ubifs: Default to zstd compression X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ba4884a6dbf002401081a8eb0ba85e5dc87025e1;p=linux.git ubifs: Default to zstd compression Compared to lzo and zlib, zstd is the best all-around performer, both in terms of speed and compression ratio. Set it as the default, if available. Signed-off-by: Rui Salvaterra Signed-off-by: Richard Weinberger --- diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c index c160f718c2882..e7693b94e5b55 100644 --- a/fs/ubifs/sb.c +++ b/fs/ubifs/sb.c @@ -53,6 +53,9 @@ static int get_default_compressor(struct ubifs_info *c) { + if (ubifs_compr_present(c, UBIFS_COMPR_ZSTD)) + return UBIFS_COMPR_ZSTD; + if (ubifs_compr_present(c, UBIFS_COMPR_LZO)) return UBIFS_COMPR_LZO;