summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnzo Matsumiya <ematsumiya@suse.de>2026-04-13 22:07:09 +0300
committerSteve French <stfrench@microsoft.com>2026-04-22 17:55:38 +0300
commitfca46b0e68c5d4f37c1dffb854ab125f702fa9e9 (patch)
tree935aa289a991539663920d89988f1d7af0a2d948
parent20d4f9efe008be1b673f43d38d3d99fb1fd4cd68 (diff)
downloadlinux-fca46b0e68c5d4f37c1dffb854ab125f702fa9e9.tar.xz
smb: client: compress: increase LZ77_MATCH_MAX_DIST
Increase max distance (i.e. window size) from 1k to 8k. This allows better compression and is just as fast. Other: - drop LZ77_MATCH_MIN_DIST as it's nused -- main loop already checks if dist > 0 Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de> Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r--fs/smb/client/compress/lz77.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/smb/client/compress/lz77.c b/fs/smb/client/compress/lz77.c
index 61cdf1c14612..480927dcd4c6 100644
--- a/fs/smb/client/compress/lz77.c
+++ b/fs/smb/client/compress/lz77.c
@@ -17,8 +17,7 @@
* Compression parameters.
*/
#define LZ77_MATCH_MIN_LEN 4
-#define LZ77_MATCH_MIN_DIST 1
-#define LZ77_MATCH_MAX_DIST SZ_1K
+#define LZ77_MATCH_MAX_DIST SZ_8K
#define LZ77_HASH_LOG 15
#define LZ77_HASH_SIZE (1 << LZ77_HASH_LOG)
#define LZ77_STEP_SIZE sizeof(u64)