This patch is part of the patchset I'm using in the Debian squid-2.4.3
package. Though the patches here are against 2.4.3, they should apply
to 2.5 with minor difficulty.
unlinkd.patch Compile in unlinkd support even with async io
When async io is compiled in, unlinkd support is not compiled in. This
patch makes sure that unlinkd is always compiled in, but only starts
it if there is at least one cache_dir of type "ufs".
Miquel van Smoorenburg 06-Nov-2000
diff -ruN squid-2.4.1.orig/src/main.c squid-2.4.1/src/main.c
--- squid-2.4.1.orig/src/main.c Fri Jan 12 01:51:50 2001
+++ squid-2.4.1/src/main.c Thu Mar 22 21:17:28 2001
@@ -320,6 +320,20 @@
asnFreeMemory();
}
+#if USE_UNLINKD
+static int
+needUnlinkd(void)
+{
+ int i;
+ int r = 0;
+ for (i = 0; i < Config.cacheSwap.n_configured; i++) {
+ if (strcmp(Config.cacheSwap.swapDirs[i].type, "ufs") == 0)
+ r++;
+ }
+ return r;
+}
+#endif
+
static void
mainReconfigure(void)
{
@@ -344,6 +358,9 @@
#endif
redirectShutdown();
authenticateShutdown();
+#if USE_UNLINKD
+ unlinkdClose();
+#endif
storeDirCloseSwapLogs();
errorClean();
mimeFreeMemory();
@@ -362,6 +379,9 @@
#if USE_WCCP
wccpInit();
#endif
+#if USE_UNLINKD
+ if (needUnlinkd()) unlinkdInit();
+#endif
serverConnectionsOpen();
if (theOutIcpConnection >= 0) {
if (!Config2.Accel.on || Config.onoff.accel_with_proxy)
@@ -507,7 +527,7 @@
if (!configured_once) {
#if USE_UNLINKD
- unlinkdInit();
+ if (needUnlinkd()) unlinkdInit();
#endif
urlInitialize();
cachemgrInit();
Received on Mon Dec 10 2001 - 19:04:37 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:40 MST