Skip to content

Commit e28c5bc

Browse files
namjaejeonsmfrench
authored andcommitted
ksmbd: increase session and share hash table bits
Increases the number of bits for the hash table from 3 to 12. The thousands of sessions and shares can be connected. So the current 3-bit size can lead to frequent hash collisions. Signed-off-by: Namjae Jeon <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 0bcc831 commit e28c5bc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fs/smb/server/mgmt/share_config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "../transport_ipc.h"
2020
#include "../misc.h"
2121

22-
#define SHARE_HASH_BITS 3
22+
#define SHARE_HASH_BITS 12
2323
static DEFINE_HASHTABLE(shares_table, SHARE_HASH_BITS);
2424
static DECLARE_RWSEM(shares_table_lock);
2525

fs/smb/server/mgmt/user_session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
static DEFINE_IDA(session_ida);
2020

21-
#define SESSION_HASH_BITS 3
21+
#define SESSION_HASH_BITS 12
2222
static DEFINE_HASHTABLE(sessions_table, SESSION_HASH_BITS);
2323
static DECLARE_RWSEM(sessions_table_lock);
2424

0 commit comments

Comments
 (0)