]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
smb: client: allow more DFS referrals to be cached
authorPaulo Alcantara <pc@manguebit.com>
Tue, 26 Nov 2024 20:19:18 +0000 (17:19 -0300)
committerSteve French <stfrench@microsoft.com>
Wed, 27 Nov 2024 00:46:15 +0000 (18:46 -0600)
In some DFS setups, a single DFS share may contain hundreds of DFS
links and increasing the DFS cache to allow more referrals to be
cached improves DFS failover as the client will likely find a cached
DFS referral when reconnecting and then avoiding unnecessary remounts.

Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/dfs_cache.c

index 00820f57b434e22dbe3708c2d30711481ac5407b..541608b0267efff53ac4d60eac4559a52539f7d8 100644 (file)
@@ -24,8 +24,8 @@
 
 #include "dfs_cache.h"
 
-#define CACHE_HTABLE_SIZE      32
-#define CACHE_MAX_ENTRIES      64
+#define CACHE_HTABLE_SIZE      512
+#define CACHE_MAX_ENTRIES      1024
 #define CACHE_MIN_TTL          120 /* 2 minutes */
 #define CACHE_DEFAULT_TTL      300 /* 5 minutes */