Skip to content

Commit

Permalink
ubifs: Default to zstd compression
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
  • Loading branch information
rsalvaterra authored and richardweinberger committed Apr 15, 2021
1 parent 3e90331 commit ba4884a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/ubifs/sb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ba4884a

Please sign in to comment.