summaryrefslogtreecommitdiffstats
path: root/fs/smb/client/cifsglob.h
diff options
context:
space:
mode:
authorShyam Prasad N <sprasad@microsoft.com>2024-01-21 03:32:47 +0000
committerSteve French <stfrench@microsoft.com>2024-01-23 20:23:29 -0600
commit4f1fffa2376922f3d1d506e49c0fd445b023a28e (patch)
tree7e5bf09ccdeecf68f6d978c3066a4ef7b885b82a /fs/smb/client/cifsglob.h
parent64cc377b7628b81ffdbdb1c6bacfba895dcac3f8 (diff)
downloadlinux-stable-4f1fffa2376922f3d1d506e49c0fd445b023a28e.tar.gz
linux-stable-4f1fffa2376922f3d1d506e49c0fd445b023a28e.tar.bz2
linux-stable-4f1fffa2376922f3d1d506e49c0fd445b023a28e.zip
cifs: commands that are retried should have replay flag set
MS-SMB2 states that the header flag SMB2_FLAGS_REPLAY_OPERATION needs to be set when a command needs to be retried, so that the server is aware that this is a replay for an operation that appeared before. This can be very important, for example, for state changing operations and opens which get retried following a reconnect; since the client maybe unaware of the status of the previous open. This is particularly important for multichannel scenario, since disconnection of one connection does not mean that the session is lost. The requests can be replayed on another channel. This change also makes use of exponential back-off before replays and also limits the number of retries to "retrans" mount option value. Also, this change does not modify the read/write codepath. Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/cifsglob.h')
-rw-r--r--fs/smb/client/cifsglob.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h
index 4eb706e27c82..ceaf9857885d 100644
--- a/fs/smb/client/cifsglob.h
+++ b/fs/smb/client/cifsglob.h
@@ -50,6 +50,11 @@
#define CIFS_DEF_ACTIMEO (1 * HZ)
/*
+ * max sleep time before retry to server
+ */
+#define CIFS_MAX_SLEEP 2000
+
+/*
* max attribute cache timeout (jiffies) - 2^30
*/
#define CIFS_MAX_ACTIMEO (1 << 30)