[PATCH] switch to enable multi-channel

Michael Adam obnox at samba.org
Tue Mar 15 10:45:15 UTC 2016


Reseding an earlier patch based on discussions with
Metze and Karo. -- sorry for the delay. got distracted...

This introduces an smb.conf switch that can be used
to enable the multi-channel feature at runtime.

Will send patches with the implementation of the
channel sequence number and request counters next.
And more patches to test cases.

Cheers - Michael

-------------- next part --------------
From 78ee1eea0acba387f355adc6893510ca01193e1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd at samba.org>
Date: Wed, 20 Jan 2016 17:44:45 +0100
Subject: [PATCH 1/2] param: add parameter "server multi channel support",
 defaults to off.

Guenther

Pair-Programmed-With: Michael Adam <obnox at samba.org>

Signed-off-by: Guenther Deschner <gd at samba.org>
Signed-off-by: Michael Adam <obnox at samba.org>
---
 .../protocol/servermultichannelsupport.xml          | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 docs-xml/smbdotconf/protocol/servermultichannelsupport.xml

diff --git a/docs-xml/smbdotconf/protocol/servermultichannelsupport.xml b/docs-xml/smbdotconf/protocol/servermultichannelsupport.xml
new file mode 100644
index 0000000..14db171
--- /dev/null
+++ b/docs-xml/smbdotconf/protocol/servermultichannelsupport.xml
@@ -0,0 +1,21 @@
+<samba:parameter name="server multi channel support"
+                 context="G"
+                 type="boolean"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+    <para>This boolean parameter controls whether
+    <citerefentry><refentrytitle>smbd</refentrytitle>
+    <manvolnum>8</manvolnum></citerefentry> will support
+    SMB3 multi-channel.
+    </para>
+    <para>This parameter has been added with version 4.4.</para>
+    <para>
+    Warning: Note that this feature is considered experimental in Samba 4.4.
+    Use it at your own risk: Even though it may seem to work well in testing,
+    it may result in data corruption under some race conditions.
+    Future 4.4.x release may improve this situation.
+    </para>
+</description>
+
+<value type="default">no</value>
+</samba:parameter>
-- 
2.5.0


From 376a21a3bc3c157c9b4fb55012be86a3280c7efc Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Tue, 26 Jan 2016 08:16:51 +0100
Subject: [PATCH 2/2] smbd: enable multi-channel if 'server multi channel
 support = yes' in the config

Signed-off-by: Michael Adam <obnox at samba.org>
---
 source3/smbd/smbXsrv_client.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/source3/smbd/smbXsrv_client.c b/source3/smbd/smbXsrv_client.c
index d8ba2f7..7286b6e 100644
--- a/source3/smbd/smbXsrv_client.c
+++ b/source3/smbd/smbXsrv_client.c
@@ -511,6 +511,8 @@ NTSTATUS smbXsrv_client_create(TALLOC_CTX *mem_ctx,
 	client->ev_ctx = ev_ctx;
 	client->msg_ctx = msg_ctx;
 
+	client->server_multi_channel_enabled = lp_server_multi_channel_support();
+
 	client->table = talloc_move(client, &table);
 	table = client->table;
 
-- 
2.5.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160315/fac9c573/signature.sig>


More information about the samba-technical mailing list