diff options
author | Rui Salvaterra <rsalvaterra@gmail.com> | 2021-04-05 18:29:35 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2021-04-15 23:00:26 +0300 |
commit | ba4884a6dbf002401081a8eb0ba85e5dc87025e1 (patch) | |
tree | 979d104939883eb6a877e5f58ac62703a8b35b66 /fs/ubifs | |
parent | 3e903315790baf4a966436e7f32e9c97864570ac (diff) | |
download | linux-ba4884a6dbf002401081a8eb0ba85e5dc87025e1.tar.xz |
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 <rsalvaterra@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs')
-rw-r--r-- | fs/ubifs/sb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c index c160f718c288..e7693b94e5b5 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; |