kernel: bump 5.10 to 5.10.109
[openwrt/openwrt.git] / target / linux / generic / backport-5.10 / 500-v5.13-ubifs-default-to-zstd-compression.patch
1 From dcdf415b740923530dc71d89fecc8361078473f5 Mon Sep 17 00:00:00 2001
2 From: Rui Salvaterra <rsalvaterra@gmail.com>
3 Date: Mon, 5 Apr 2021 16:11:55 +0100
4 Subject: [PATCH] ubifs: default to zstd compression
5
6 Compared to lzo and zlib, zstd is the best all-around performer, both in terms
7 of speed and compression ratio. Set it as the default, if available.
8
9 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
10 ---
11 fs/ubifs/sb.c | 3 +++
12 1 file changed, 3 insertions(+)
13
14 --- a/fs/ubifs/sb.c
15 +++ b/fs/ubifs/sb.c
16 @@ -53,6 +53,9 @@
17
18 static int get_default_compressor(struct ubifs_info *c)
19 {
20 + if (ubifs_compr_present(c, UBIFS_COMPR_ZSTD))
21 + return UBIFS_COMPR_ZSTD;
22 +
23 if (ubifs_compr_present(c, UBIFS_COMPR_LZO))
24 return UBIFS_COMPR_LZO;
25