Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secret sauce for enabling multi channel in Samba #1523

Merged
merged 1 commit into from Jul 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 15 additions & 2 deletions src/freenas-sysctl/services.c
Expand Up @@ -76,11 +76,16 @@ static struct {
struct service_timeout s_st;
} smart;

/*
* This should get its own file. We should add lots more
* performance tuning options here as well. Coming soon?
*/
struct {
struct service_timeout s_st;
struct {
int server_min_protocol;
int server_max_protocol;
unsigned int server_min_protocol;
unsigned int server_max_protocol;
unsigned int server_multi_channel;
} config;
} smb;

Expand Down Expand Up @@ -324,7 +329,9 @@ services_init(void)

g_services->smb.config.server_min_protocol = SMB2;
g_services->smb.config.server_max_protocol = SMB3;
g_services->smb.config.server_multi_channel = 0;

/* SMB config */
if ((tmptree2 = SYSCTL_ADD_NODE(&g_freenas_sysctl_ctx,
SYSCTL_CHILDREN(tmptree), OID_AUTO,
"config", CTLFLAG_RD, NULL, NULL)) == NULL) {
Expand All @@ -343,6 +350,12 @@ services_init(void)
&g_services->smb.config.server_max_protocol, 0,
sysctl_smb_server_proto, "A", "server max protocol");

SYSCTL_ADD_UINT(&g_freenas_sysctl_ctx,
SYSCTL_CHILDREN(tmptree2), OID_AUTO,
"server_multi_channel", CTLFLAG_RW,
&g_services->smb.config.server_multi_channel, 0,
"server multi channel support");

/* SNMP node */
if ((tmptree = SYSCTL_ADD_NODE(&g_freenas_sysctl_ctx,
SYSCTL_CHILDREN(stree), OID_AUTO,
Expand Down
4 changes: 4 additions & 0 deletions src/freenas/usr/local/libexec/nas/generate_smb4_conf.py
Expand Up @@ -955,6 +955,10 @@ def generate_smb4_conf(client, smb4_conf, role):
if server_max_protocol != 'NONE':
confset2(smb4_conf, "server max protocol = %s", server_max_protocol)

server_multi_channel = fs().services.smb.config.server_multi_channel
if server_multi_channel != 0:
confset1(smb4_conf, "server multi channel support = yes")

if cifs.bindip:
interfaces = []

Expand Down