summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorLudovic Stordeur <Ludovic.Stordeur@inria.fr>2011-07-11 14:00:01 +0000
committerLudovic Stordeur <Ludovic.Stordeur@inria.fr>2011-07-11 14:00:01 +0000
commite381c7c38582236d5bd361fb87fe4fe055d94ba2 (patch)
tree220e7ae10472f92b6edfb20eae9e09abb1561291 /pkgs/os-specific
parente739dc7d6cc89c7e170c8a5f8d73bb471499225d (diff)
downloadnixlib-e381c7c38582236d5bd361fb87fe4fe055d94ba2.tar
nixlib-e381c7c38582236d5bd361fb87fe4fe055d94ba2.tar.gz
nixlib-e381c7c38582236d5bd361fb87fe4fe055d94ba2.tar.bz2
nixlib-e381c7c38582236d5bd361fb87fe4fe055d94ba2.tar.lz
nixlib-e381c7c38582236d5bd361fb87fe4fe055d94ba2.tar.xz
nixlib-e381c7c38582236d5bd361fb87fe4fe055d94ba2.tar.zst
nixlib-e381c7c38582236d5bd361fb87fe4fe055d94ba2.zip
Added CIFS timeout patch for Linux 2.6.15
svn path=/nixpkgs/trunk/; revision=27715
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/kernel/cifs-timeout-2.6.15.patch44
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix6
2 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kernel/cifs-timeout-2.6.15.patch b/pkgs/os-specific/linux/kernel/cifs-timeout-2.6.15.patch
new file mode 100644
index 000000000000..4e399af8300d
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/cifs-timeout-2.6.15.patch
@@ -0,0 +1,44 @@
+--- a/fs/cifs/transport.c	2011-04-12 15:16:00.253887813 +0200
++++ b/fs/cifs/transport.c	2011-04-12 15:17:22.650296413 +0200
+@@ -247,9 +247,9 @@
+ 				    n_vec - first_vec, total_len);
+ 		if ((rc == -ENOSPC) || (rc == -EAGAIN)) {
+ 			i++;
+-			if(i >= 14) {
++			if(i >= 119) {
+ 				cERROR(1,
+-				   ("sends on sock %p stuck for 15 seconds",
++				   ("sends on sock %p stuck for 120 seconds",
+ 				    ssocket));
+ 				rc = -EAGAIN;
+ 				break;
+@@ -421,12 +421,12 @@
+ 	else if (long_op == 2) /* writes past end of file can take loong time */
+ 		timeout = 180 * HZ;
+ 	else if (long_op == 1)
+-		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 > 2) {
+ 		timeout = MAX_SCHEDULE_TIMEOUT;
+ 	} else
+-		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 */
+ 	if (signal_pending(current)) {
+@@ -687,12 +687,12 @@
+ 	else if (long_op == 2) /* writes past end of file can take loong time */
+ 		timeout = 180 * HZ;
+ 	else if (long_op == 1)
+-		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 > 2) {
+ 		timeout = MAX_SCHEDULE_TIMEOUT;
+ 	} else
+-		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 */
+ 	if (signal_pending(current)) {
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 65400427cbe5..902be41f874c 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -235,6 +235,12 @@ rec {
 
   # Increase the timeout on CIFS requests from 15 to 120 seconds to
   # make CIFS more resilient to high load on the CIFS server.
+  cifs_timeout_2_6_15 =
+    { name = "cifs-timeout";
+      patch = ./cifs-timeout-2.6.15.patch;
+      features.cifsTimeout = true;
+    };
+
   cifs_timeout_2_6_25 =
     { name = "cifs-timeout";
       patch = ./cifs-timeout-2.6.25.patch;