Author: stordeur
Date: Mon Jul 11 14:00:01 2011
New Revision: 27715
URL: https://svn.nixos.org/websvn/nix/?rev=27715&sc=1

Log:
Added CIFS timeout patch for Linux 2.6.15

Added:
   nixpkgs/trunk/pkgs/os-specific/linux/kernel/cifs-timeout-2.6.15.patch
Modified:
   nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix

Added: nixpkgs/trunk/pkgs/os-specific/linux/kernel/cifs-timeout-2.6.15.patch
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/os-specific/linux/kernel/cifs-timeout-2.6.15.patch       
Mon Jul 11 14:00:01 2011        (r27715)
@@ -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)) {

Modified: nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix
==============================================================================
--- nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix     Mon Jul 11 
13:59:58 2011        (r27714)
+++ nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix     Mon Jul 11 
14:00:01 2011        (r27715)
@@ -235,6 +235,12 @@
 
   # 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;
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to