summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Salvaterra <rsalvaterra@gmail.com>2021-04-05 17:29:35 +0200
committerRichard Weinberger <richard@nod.at>2021-04-15 22:00:26 +0200
commitba4884a6dbf002401081a8eb0ba85e5dc87025e1 (patch)
tree979d104939883eb6a877e5f58ac62703a8b35b66
parentubifs: Only check replay with inode type to judge if inode linked (diff)
downloadlinux-ba4884a6dbf002401081a8eb0ba85e5dc87025e1.tar.xz
linux-ba4884a6dbf002401081a8eb0ba85e5dc87025e1.zip
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>
-rw-r--r--fs/ubifs/sb.c3
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;