summary refs log tree commit diff
path: root/pkgs/os-specific/linux
diff options
context:
space:
mode:
authorLudovic Stordeur <Ludovic.Stordeur@inria.fr>2011-07-11 13:59:43 +0000
committerLudovic Stordeur <Ludovic.Stordeur@inria.fr>2011-07-11 13:59:43 +0000
commitc551998c82c3db0c09a43578d5d132e05652303a (patch)
tree3037c4586de3d53baeb537e598a2004cff002591 /pkgs/os-specific/linux
parentdf0a6394b31fac21f29ce6230d012f592e1ef33a (diff)
downloadnixlib-c551998c82c3db0c09a43578d5d132e05652303a.tar
nixlib-c551998c82c3db0c09a43578d5d132e05652303a.tar.gz
nixlib-c551998c82c3db0c09a43578d5d132e05652303a.tar.bz2
nixlib-c551998c82c3db0c09a43578d5d132e05652303a.tar.lz
nixlib-c551998c82c3db0c09a43578d5d132e05652303a.tar.xz
nixlib-c551998c82c3db0c09a43578d5d132e05652303a.tar.zst
nixlib-c551998c82c3db0c09a43578d5d132e05652303a.zip
Added CIFS timeout patch for Linux 2.6.{35 --> 38}
svn path=/nixpkgs/trunk/; revision=27710
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r--pkgs/os-specific/linux/kernel/cifs-timeout-2.6.35.patch45
-rw-r--r--pkgs/os-specific/linux/kernel/cifs-timeout-2.6.38.patch13
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix12
3 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kernel/cifs-timeout-2.6.35.patch b/pkgs/os-specific/linux/kernel/cifs-timeout-2.6.35.patch
new file mode 100644
index 000000000000..8043739ee9a8
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/cifs-timeout-2.6.35.patch
@@ -0,0 +1,45 @@
+--- /tmp/linux-2.6.32.14/fs/cifs/transport.c	2010-11-22 20:01:26.000000000 +0100
++++ linux-2.6.32.14/fs/cifs/transport.c	2011-03-29 15:31:14.926510480 +0200
+@@ -166,8 +166,8 @@
+ 			   after the retries we will kill the socket and
+ 			   reconnect which may clear the network problem.
+ 			*/
+-			if ((i >= 14) || (!server->noblocksnd && (i > 2))) {
+-				cERROR(1, "sends on sock %p stuck for 15 seconds",
++			if ((i >= 119) || (!server->noblocksnd && (i > 2))) {
++				cERROR(1, "sends on sock %p stuck for 119 seconds",
+ 				    ssocket);
+ 				rc = -EAGAIN;
+ 				break;
+@@ -458,11 +458,11 @@
+ 		goto out;
+ 
+ 	if (long_op == CIFS_STD_OP)
+-		timeout = 15 * HZ;
++		timeout = 120 * HZ;
+ 	else if (long_op == CIFS_VLONG_OP) /* e.g. slow writes past EOF */
+ 		timeout = 180 * HZ;
+ 	else if (long_op == CIFS_LONG_OP)
+-		timeout = 45 * HZ; /* should be greater than
++		timeout = 120 * HZ; /* should be greater than
+ 			servers oplock break timeout (about 43 seconds) */
+ 	else if (long_op == CIFS_ASYNC_OP)
+ 		goto out;
+@@ -650,7 +650,7 @@
+ 		goto out;
+ 
+ 	if (long_op == CIFS_STD_OP)
+-		timeout = 15 * HZ;
++		timeout = 120 * HZ;
+ 	/* wait for 15 seconds or until woken up due to response arriving or
+ 	   due to last connection to this server being unmounted */
+ 	else if (long_op == CIFS_ASYNC_OP)
+@@ -658,7 +658,7 @@
+ 	else if (long_op == CIFS_VLONG_OP) /* writes past EOF can be slow */
+ 		timeout = 180 * HZ;
+ 	else if (long_op == CIFS_LONG_OP)
+-		timeout = 45 * HZ; /* should be greater than
++		timeout = 120 * HZ; /* should be greater than
+ 			servers oplock break timeout (about 43 seconds) */
+ 	else if (long_op == CIFS_BLOCKING_OP)
+ 		timeout = 0x7FFFFFFF; /* large but no so large as to wrap */
diff --git a/pkgs/os-specific/linux/kernel/cifs-timeout-2.6.38.patch b/pkgs/os-specific/linux/kernel/cifs-timeout-2.6.38.patch
new file mode 100644
index 000000000000..8168ffb5a1af
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/cifs-timeout-2.6.38.patch
@@ -0,0 +1,13 @@
+--- /tmp/linux-2.6.32.14/fs/cifs/transport.c	2011-03-27 20:37:20.000000000 +0200
++++ linux-2.6.32.14/fs/cifs/transport.c	2011-04-01 11:07:17.700305670 +0200
+@@ -182,8 +182,8 @@
+ 			   after the retries we will kill the socket and
+ 			   reconnect which may clear the network problem.
+ 			*/
+-			if ((i >= 14) || (!server->noblocksnd && (i > 2))) {
+-				cERROR(1, "sends on sock %p stuck for 15 seconds",
++			if ((i >= 119) || (!server->noblocksnd && (i > 2))) {
++				cERROR(1, "sends on sock %p stuck for 119 seconds",
+ 				    ssocket);
+ 				rc = -EAGAIN;
+ 				break;
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 92e07f3cdefe..d662d2bc65ad 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -241,6 +241,18 @@ rec {
       features.cifsTimeout = true;
     };
 
+  cifs_timeout_2_6_35 =
+    { name = "cifs-timeout";
+      patch = ./cifs-timeout-2.6.35.patch;
+      features.cifsTimeout = true;
+    };
+
+  cifs_timeout_2_6_38 =
+    { name = "cifs-timeout";
+      patch = ./cifs-timeout-2.6.38.patch;
+      features.cifsTimeout = true;
+    };
+
   cifs_timeout = cifs_timeout_2_6_32;
 
   no_xsave =