Bug 3002 pt2: store initialization (-z) does not work with SMP configs.
In SMP mode, when -z command line option is specified, start kids and allow
them to create their cache_dirs instead of trying to create macro-dependent
cache_dirs in the Master process.
In SMP mode, quit if cache_dir option is found before the workers option.
static void
parse_cachedir(SquidConfig::_cacheSwap * swap)
{
+ // The workers option must preceed cache_dir for the IamWorkerProcess check
+ // below to work. TODO: Redo IamWorkerProcess to work w/o Config and remove
+ if (KidIdentifier > 1 && Config.workers == 1) {
+ debugs(3, DBG_CRITICAL,
+ "FATAL: cache_dir found before the workers option. Reorder.");
+ self_destruct();
+ }
+
+ // Among all processes, only workers may need and can handle cache_dir.
+ if (!IamWorkerProcess())
+ return;
+
char *type_str;
char *path_str;
RefCount<SwapDir> sd;
The directory must exist and be writable by the Squid
process. Squid will NOT create this directory for you.
+ In SMP configurations, cache_dir must not precede the workers option
+ and should use configuration macros or conditionals to give each
+ worker interested in disk caching a dedicated cache directory.
+
The ufs store type:
"ufs" is the old well-known Squid storage format that has always