Skip to contentSkip to conversation

cifs: implement hard mount option behaviour

PATCH New [email protected] 1 participant 1 message May 25, 2010 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: implement hard mount option behaviour

Add support for hard mount option, allow interruptable timeouts while waiting for command/request responses.
Sometimes the responses from commands/requests do not arrive within expected timeouts which results in unnecessary reconnects for server might be slow in responding ablieit response will come and a reconnect was really not warranted.

Quoted 1 line

From 8749e41f4076817ec6fea5bd845fb051d7ef79c5 Mon Sep 17 00:00:00 2001

From: Shirish Pargaonkar <[email protected]>
Date: Sun, 23 May 2010 13:08:57 -0500
Subject: [PATCH] add support for implementing hard mount option behaviour

---
 fs/cifs/cifsproto.h |    5 ++-
 fs/cifs/cifssmb.c   |   99 ++++++++++++++++++++++++++------------------------
 fs/cifs/connect.c   |    5 ++-
 fs/cifs/sess.c      |    2 +-
 fs/cifs/transport.c |   56 ++++++++++++++++++++++++++---
 5 files changed, 109 insertions(+), 58 deletions(-)
fs/cifs/cifsproto.h +3 -2
index fb1657e..c362507 100644
@@ -63,12 +63,13 @@ extern char *cifs_compose_mount_options(const char *sb_mountdata,
 extern int SendReceive(const unsigned int /* xid */ , struct cifsSesInfo *,
 			struct smb_hdr * /* input */ ,
 			struct smb_hdr * /* out */ ,
-			int * /* bytes returned */ , const int long_op);
+			int * /* bytes returned */ , const int long_op, bool);
 extern int SendReceiveNoRsp(const unsigned int xid, struct cifsSesInfo *ses,
 			struct smb_hdr *in_buf, int flags);
 extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *,
 			struct kvec *, int /* nvec to send */,
-			int * /* type of buf returned */ , const int flags);
+			int * /* type of buf returned */ , const int flags,
+			bool);
 extern int SendReceiveBlockingLock(const unsigned int xid,
 			struct cifsTconInfo *ptcon,
 			struct smb_hdr *in_buf ,
fs/cifs/cifssmb.c +51 -48

381 lines not on this page · raw message

fs/cifs/connect.c +4 -1
index 2208f06..7ddc602 100644
@@ -1809,6 +1809,9 @@ cifs_get_tcon(struct cifsSesInfo *ses, struct smb_vol *volume_info)
 		}
 	}
 
+	if (volume_info->retry)
+		tcon->retry = volume_info->retry;
+
 	if (strchr(volume_info->UNC + 3, '\\') == NULL
 	    && strchr(volume_info->UNC + 3, '/') == NULL) {
 		cERROR(1, "Missing share name");
@@ -2807,7 +2810,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
 	pSMB->ByteCount = cpu_to_le16(count);
 
 	rc = SendReceive(xid, ses, smb_buffer, smb_buffer_response, &length,
-			 CIFS_STD_OP);
+			 CIFS_STD_OP, false);
 
 	/* above now done in SendReceive */
 	if ((rc == 0) && (tcon != NULL)) {
fs/cifs/sess.c +1 -1
index 7707389..ff0dfb7 100644
@@ -866,7 +866,7 @@ ssetup_ntlmssp_authenticate:
 	BCC_LE(smb_buf) = cpu_to_le16(count);
 
 	rc = SendReceive2(xid, ses, iov, 3 /* num_iovecs */, &resp_buf_type,
-			  CIFS_STD_OP /* not long */ | CIFS_LOG_ERROR);
+		  CIFS_STD_OP /* not long */ | CIFS_LOG_ERROR, false);
 	/* SMB request buf freed in SendReceive2 */
 
 	cFYI(1, "ssetup rc from sendrecv2 is %d", rc);
fs/cifs/transport.c +50 -6

98 lines not on this page · raw message

Signature · 1 line
1.6.0.2