]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Initialize LastIo to avoid huge balance values that effectively disable disker
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 26 Sep 2011 21:05:15 +0000 (15:05 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 26 Sep 2011 21:05:15 +0000 (15:05 -0600)
by forcing it to ignore I/O requests for current_time seconds.

src/DiskIO/IpcIo/IpcIoFile.cc

index 3bc587e51c8e11a39b87d8b215c780dccc7dc25d..3bb2e83739b0c4fd31bc19b1fb97ddec02d6a93d 100644 (file)
@@ -679,7 +679,7 @@ IpcIoFile::WaitBeforePop()
         return false;
     }
 
-    static timeval LastIo;
+    static timeval LastIo = current_time;
 
     const double ioDuration = 1.0 / maxRate; // ideal distance between two I/Os
     // do not accumulate more than 100ms or 100 I/Os, whichever is smaller