summaryrefslogtreecommitdiff
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-09-19 03:20:35 +0400
committerSteve French <smfrench@gmail.com>2012-09-25 06:46:31 +0400
commitb8eed28375a43e1c9aaa9d15af2a052aae0d0725 (patch)
treee63b713d5ae69afee73bf40487e5f067f2a66eb9 /fs/cifs/connect.c
parent6f49f46b187df34539f1e5df2469b8a541897700 (diff)
downloadlinux-b8eed28375a43e1c9aaa9d15af2a052aae0d0725.tar.xz
cifs: cork the socket before a send and uncork it afterward
We want to send SMBs as "atomically" as possible. Prior to sending any data on the socket, cork it to make sure that no non-full frames go out. Afterward, uncork it to make sure all of the data gets pushed out to the wire. Note that this more or less renders the socket=TCP_NODELAY mount option obsolete. When TCP_CORK and TCP_NODELAY are used on the same socket, TCP_NODELAY is essentially ignored. Acked-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 549409b1c776..5210bc82b1dc 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1680,6 +1680,10 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
if (string == NULL)
goto out_nomem;
+ /*
+ * FIXME: since we now cork/uncork the socket while
+ * sending, should we deprecate this option?
+ */
if (strnicmp(string, "TCP_NODELAY", 11) == 0)
vol->sockopt_tcp_nodelay = 1;
break;