From: wessels <> Date: Tue, 4 May 1999 04:59:56 +0000 (+0000) Subject: move some store initialization stuff into storeUfsDirInit() X-Git-Tag: SQUID_3_0_PRE1~2229 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9838d6c806a6934c01c3e28ff4fdf5b7a175e6b9;p=thirdparty%2Fsquid.git move some store initialization stuff into storeUfsDirInit() --- diff --git a/src/protos.h b/src/protos.h index dd5f92aa16..51effa5743 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,7 +1,7 @@ /* - * $Id: protos.h,v 1.326 1999/05/03 22:41:10 wessels Exp $ - * $Id: protos.h,v 1.326 1999/05/03 22:41:10 wessels Exp $ + * $Id: protos.h,v 1.327 1999/05/03 22:59:56 wessels Exp $ + * $Id: protos.h,v 1.327 1999/05/03 22:59:56 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -918,13 +918,13 @@ extern int storeDirNumber(int fileno); extern int storeDirProperFileno(int dirn, int fn); extern int storeDirValidFileno(int fn); extern int storeDirWriteCleanLogs(int reopen); -extern int storeVerifyCacheDirs(void); extern int storeVerifySwapDirs(void); extern void storeCreateSwapDirectories(void); extern void storeDirCloseSwapLogs(void); extern void storeDirCloseTmpSwapLog(int dirn); extern void storeDirConfigure(void); extern void storeDirDiskFull(int fn); +extern void storeDirInit(void); extern void storeDirMapBitReset(int fn); extern void storeDirMapBitSet(int fn); extern void storeDirOpenSwapLogs(void); @@ -939,10 +939,10 @@ extern OBJH storeUfsDirStats; extern char *storeUfsDirSwapLogFile(int, const char *); extern int storeUfsDirWriteCleanLogs(int reopen); extern int storeUfsFilenoBelongsHere(int, int, int, int); -extern int storeUfsVerifyCacheDirs(void); extern void storeUfsCreateSwapDirectories(void); extern void storeUfsDirCloseSwapLogs(void); extern void storeUfsDirCloseTmpSwapLog(int dirn); +extern void storeUfsDirInit(void); extern void storeUfsDirOpenSwapLogs(void); extern void storeUfsDirSwapLog(const StoreEntry *, int op); @@ -959,7 +959,7 @@ extern void storeSwapTLVFree(tlv * n); * store_rebuild.c */ extern void storeDoRebuildFromSwapFiles(void *data); -extern void storeRebuildStart(void); +extern void storeUfsRebuildStart(void); /* * store_swapin.c diff --git a/src/store.cc b/src/store.cc index 128084dfd4..740a75a9de 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,7 +1,7 @@ /* - * $Id: store.cc,v 1.493 1999/05/03 22:43:34 wessels Exp $ - * $Id: store.cc,v 1.493 1999/05/03 22:43:34 wessels Exp $ + * $Id: store.cc,v 1.494 1999/05/03 22:59:58 wessels Exp $ + * $Id: store.cc,v 1.494 1999/05/03 22:59:58 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -921,20 +921,11 @@ storeInit(void) store_hash_buckets, storeKeyHashHash); storeDigestInit(); storeLogOpen(); - if (storeVerifyCacheDirs() < 0) { - xstrncpy(tmp_error_buf, - "\tFailed to verify one of the swap directories, Check cache.log\n" - "\tfor details. Run 'squid -z' to create swap directories\n" - "\tif needed, or if running Squid for the first time.", - ERROR_BUF_SZ); - fatal(tmp_error_buf); - } - storeDirOpenSwapLogs(); store_list.head = store_list.tail = NULL; inmem_list.head = inmem_list.tail = NULL; stackInit(&LateReleaseStack); eventAdd("storeLateRelease", storeLateRelease, NULL, 1.0, 1); - storeRebuildStart(); + storeDirInit(); cachemgrRegister("storedir", "Store Directory Stats", storeDirStats, 0, 1); diff --git a/src/store_dir.cc b/src/store_dir.cc index dea107c8d8..747176b926 100644 --- a/src/store_dir.cc +++ b/src/store_dir.cc @@ -1,7 +1,7 @@ /* - * $Id: store_dir.cc,v 1.88 1999/05/03 22:41:13 wessels Exp $ - * $Id: store_dir.cc,v 1.88 1999/05/03 22:41:13 wessels Exp $ + * $Id: store_dir.cc,v 1.89 1999/05/03 23:00:00 wessels Exp $ + * $Id: store_dir.cc,v 1.89 1999/05/03 23:00:00 wessels Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -36,21 +36,16 @@ #include "squid.h" -char * -storeSwapFullPath(sfileno f, char *buf) +void +storeDirInit(void) { - return storeUfsFullPath(f, buf); + storeUfsDirInit(); } -/* - * This function is called by storeInit(). If this returns < 0, - * then Squid exits, complains about swap directories not - * existing, and instructs the admin to run 'squid -z' - */ -int -storeVerifyCacheDirs(void) +char * +storeSwapFullPath(sfileno f, char *buf) { - return storeUfsVerifyCacheDirs(); + return storeUfsFullPath(f, buf); } void @@ -347,7 +342,7 @@ storeDirDiskFull(int fn) void storeDirOpenSwapLogs(void) { - return storeUfsDirCloseSwapLogs(); + return storeUfsDirOpenSwapLogs(); } void diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc index f838b338fc..7f26c81aa6 100644 --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@ -1,6 +1,6 @@ /* - * $Id: store_rebuild.cc,v 1.58 1999/05/03 22:41:14 wessels Exp $ + * $Id: store_rebuild.cc,v 1.59 1999/05/03 23:00:01 wessels Exp $ * * DEBUG: section 20 Store Rebuild Routines * AUTHOR: Duane Wessels @@ -674,7 +674,7 @@ storeRebuildComplete(void) } void -storeRebuildStart(void) +storeUfsRebuildStart(void) { rebuild_dir *d; int clean = 0;