Skip to contentSkip to conversation

ubifs: default to zstd compression

PATCH In review Rui Salvaterra 2 participants 3 messages Apr 5, 2021 – Apr 8, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 fs/ubifs/sb.c | 3 +++
 1 file changed, 3 insertions(+)
fs/ubifs/sb.c +3 -0
index c160f718c288..e7693b94e5b5 100644
@@ -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;
 
Signature · 1 line
2.31.1
#1 lore raw
Quoted 3 lines · Rui Salvaterra

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.

I was about to NACK this patch but by looking at the diff I realized that you change
the default compressor only for the default filesystem as created by UBIFS itself.
Queued for the merge window. :-)

Signature · 2 lines
Thanks,
//richard
#2 lore raw

Hi, Richard,

Quoted 5 lines · Richard Weinberger

I was about to NACK this patch but by looking at the diff I realized that you change
the default compressor only for the default filesystem as created by UBIFS itself.

Yes, that was the idea. :)

Quoted 1 line

Queued for the merge window. :-)

Thanks a lot!

Rui