--------------------- PatchSet 345 Date: 2002/12/13 10:45:14 Author: rbcollins Branch: unify-io Tag: (none) Log: move dump to be a method, and handle an assert on header-only swapfiles (caused by crashs earlier :]) Members: src/SwapDir.cc:1.1.2.5->1.1.2.6 src/SwapDir.h:1.1.2.9->1.1.2.10 src/cache_cf.cc:1.4.12.4->1.4.12.5 src/client_side_reply.cc:1.9->1.9.12.1 src/protos.h:1.9.10.1->1.9.10.2 src/structs.h:1.9.10.5->1.9.10.6 src/ufscommon.cc:1.4.10.9->1.4.10.10 src/ufscommon.h:1.1.20.32->1.1.20.33 src/fs/aufs/store_asyncufs.h:1.2.12.34->1.2.12.35 src/fs/aufs/store_dir_aufs.cc:1.2.12.11->1.2.12.12 src/fs/coss/store_coss.h:1.3.10.11->1.3.10.12 src/fs/coss/store_dir_coss.cc:1.4.10.8->1.4.10.9 src/fs/diskd/store_dir_diskd.cc:1.2.16.18->1.2.16.19 src/fs/diskd/store_diskd.h:1.1.20.34->1.1.20.35 src/fs/null/store_null.cc:1.1.20.6->1.1.20.7 src/fs/ufs/store_dir_ufs.cc:1.1.20.10->1.1.20.11 src/fs/ufs/store_ufs.h:1.1.20.25->1.1.20.26 Index: squid3/src/SwapDir.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/SwapDir.cc,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- squid3/src/SwapDir.cc 13 Dec 2002 09:32:57 -0000 1.1.2.5 +++ squid3/src/SwapDir.cc 13 Dec 2002 10:45:14 -0000 1.1.2.6 @@ -1,6 +1,6 @@ /* - * $Id: SwapDir.cc,v 1.1.2.5 2002/12/13 09:32:57 rbcollins Exp $ + * $Id: SwapDir.cc,v 1.1.2.6 2002/12/13 10:45:14 rbcollins Exp $ * * DEBUG: section ?? Swap Dir base object * AUTHOR: Robert Collins @@ -52,3 +52,6 @@ void SwapDir::newFileSystem(){} + +void +SwapDir::dump(StoreEntry &)const{} Index: squid3/src/SwapDir.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/SwapDir.h,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -u -r1.1.2.9 -r1.1.2.10 --- squid3/src/SwapDir.h 13 Dec 2002 09:32:58 -0000 1.1.2.9 +++ squid3/src/SwapDir.h 13 Dec 2002 10:45:14 -0000 1.1.2.10 @@ -1,6 +1,6 @@ /* - * $Id: SwapDir.h,v 1.1.2.9 2002/12/13 09:32:58 rbcollins Exp $ + * $Id: SwapDir.h,v 1.1.2.10 2002/12/13 10:45:14 rbcollins Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -34,7 +34,6 @@ #ifndef SQUID_SWAPDIR_H #define SQUID_SWAPDIR_H -typedef void STDUMP(StoreEntry *, SwapDir *); typedef void STFREE(SwapDir *); typedef int STDBLCHECK(SwapDir *, StoreEntry *); typedef void STSTATFS(SwapDir *, StoreEntry *); @@ -78,7 +77,7 @@ } flags; virtual void init() = 0; /* Initialise the fs */ virtual void newFileSystem(); /* Create a new fs */ - STDUMP *dump; /* Dump fs config snippet */ + virtual void dump(StoreEntry &)const; /* Dump fs config snippet */ STFREE *freefs; /* Free the fs data */ STDBLCHECK *dblcheck; /* Double check the obj integrity */ STSTATFS *statfs; /* Dump fs statistics */ Index: squid3/src/cache_cf.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/cache_cf.cc,v retrieving revision 1.4.12.4 retrieving revision 1.4.12.5 diff -u -r1.4.12.4 -r1.4.12.5 --- squid3/src/cache_cf.cc 9 Dec 2002 09:36:31 -0000 1.4.12.4 +++ squid3/src/cache_cf.cc 13 Dec 2002 10:45:14 -0000 1.4.12.5 @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.4.12.4 2002/12/09 09:36:31 rbcollins Exp $ + * $Id: cache_cf.cc,v 1.4.12.5 2002/12/13 10:45:14 rbcollins Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -60,9 +60,9 @@ static const char *const list_sep = ", \t\n\r"; static void parse_cachedir_option_readonly(SwapDir * sd, const char *option, const char *value, int reconfiguring); -static void dump_cachedir_option_readonly(StoreEntry * e, const char *option, SwapDir * sd); +static void dump_cachedir_option_readonly(StoreEntry * e, const char *option, SwapDir const * sd); static void parse_cachedir_option_maxsize(SwapDir * sd, const char *option, const char *value, int reconfiguring); -static void dump_cachedir_option_maxsize(StoreEntry * e, const char *option, SwapDir * sd); +static void dump_cachedir_option_maxsize(StoreEntry * e, const char *option, SwapDir const * sd); static struct cache_dir_option common_cachedir_options[] = { {"read-only", parse_cachedir_option_readonly, dump_cachedir_option_readonly}, @@ -1098,7 +1098,7 @@ #endif void -dump_cachedir_options(StoreEntry * entry, struct cache_dir_option *options, SwapDir * sd) +dump_cachedir_options(StoreEntry * entry, struct cache_dir_option *options, SwapDir const * sd) { struct cache_dir_option *option; if (!options) @@ -1112,11 +1112,11 @@ { SwapDir *s; int i; + assert (entry); for (i = 0; i < swap.n_configured; i++) { s = swap.swapDirs[i]; storeAppendPrintf(entry, "%s %s %s", name, s->type, s->path); - if (s->dump) - s->dump(entry, s); + s->dump(*entry); dump_cachedir_options(entry, common_cachedir_options, s); storeAppendPrintf(entry, "\n"); } @@ -1320,7 +1320,7 @@ } static void -dump_cachedir_option_readonly(StoreEntry * e, const char *option, SwapDir * sd) +dump_cachedir_option_readonly(StoreEntry * e, const char *option, SwapDir const * sd) { if (sd->flags.read_only) storeAppendPrintf(e, " %s", option); @@ -1343,7 +1343,7 @@ } static void -dump_cachedir_option_maxsize(StoreEntry * e, const char *option, SwapDir * sd) +dump_cachedir_option_maxsize(StoreEntry * e, const char *option, SwapDir const * sd) { if (sd->max_objsize != -1) storeAppendPrintf(e, " %s=%ld", option, (long int) sd->max_objsize); Index: squid3/src/client_side_reply.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/client_side_reply.cc,v retrieving revision 1.9 retrieving revision 1.9.12.1 diff -u -r1.9 -r1.9.12.1 --- squid3/src/client_side_reply.cc 16 Nov 2002 03:13:16 -0000 1.9 +++ squid3/src/client_side_reply.cc 13 Dec 2002 10:45:14 -0000 1.9.12.1 @@ -1,6 +1,6 @@ /* - * $Id: client_side_reply.cc,v 1.9 2002/11/16 03:13:16 squidadm Exp $ + * $Id: client_side_reply.cc,v 1.9.12.1 2002/12/13 10:45:14 rbcollins Exp $ * * DEBUG: section 88 Client-side Reply Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -540,6 +540,14 @@ clientProcessMiss(context); return; } + if (result.length == 0) { + /* the store couldn't get enough data from the file for us to id the + * object + */ + /* treat as a miss */ + http->logType = LOG_TCP_MISS; + clientProcessMiss(context); + } assert(result.length > 0); mem = e->mem_obj; assert(!EBIT_TEST(e->flags, ENTRY_ABORTED)); Index: squid3/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/protos.h,v retrieving revision 1.9.10.1 retrieving revision 1.9.10.2 diff -u -r1.9.10.1 -r1.9.10.2 --- squid3/src/protos.h 3 Dec 2002 11:06:59 -0000 1.9.10.1 +++ squid3/src/protos.h 13 Dec 2002 10:45:14 -0000 1.9.10.2 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.9.10.1 2002/12/03 11:06:59 rbcollins Exp $ + * $Id: protos.h,v 1.9.10.2 2002/12/13 10:45:14 rbcollins Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -103,7 +103,7 @@ SQUIDCEXTERN void requirePathnameExists(const char *name, const char *path); SQUIDCEXTERN void parse_time_t(time_t * var); SQUIDCEXTERN void parse_cachedir_options(SwapDir * sd, struct cache_dir_option *options, int reconfiguring); -SQUIDCEXTERN void dump_cachedir_options(StoreEntry * e, struct cache_dir_option *options, SwapDir * sd); +SQUIDCEXTERN void dump_cachedir_options(StoreEntry * e, struct cache_dir_option *options, SwapDir const * sd); SQUIDCEXTERN void parse_sockaddr_in_list_token(sockaddr_in_list **, char *); Index: squid3/src/structs.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/structs.h,v retrieving revision 1.9.10.5 retrieving revision 1.9.10.6 diff -u -r1.9.10.5 -r1.9.10.6 --- squid3/src/structs.h 9 Dec 2002 09:36:31 -0000 1.9.10.5 +++ squid3/src/structs.h 13 Dec 2002 10:45:15 -0000 1.9.10.6 @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.9.10.5 2002/12/09 09:36:31 rbcollins Exp $ + * $Id: structs.h,v 1.9.10.6 2002/12/13 10:45:15 rbcollins Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -1961,7 +1961,7 @@ struct cache_dir_option { const char *name; void (*parse) (SwapDir * sd, const char *option, const char *value, int reconfiguring); - void (*dump) (StoreEntry * e, const char *option, SwapDir * sd); + void (*dump) (StoreEntry * e, const char *option, SwapDir const * sd); }; #endif /* SQUID_STRUCTS_H */ Index: squid3/src/ufscommon.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ufscommon.cc,v retrieving revision 1.4.10.9 retrieving revision 1.4.10.10 diff -u -r1.4.10.9 -r1.4.10.10 --- squid3/src/ufscommon.cc 13 Dec 2002 09:32:58 -0000 1.4.10.9 +++ squid3/src/ufscommon.cc 13 Dec 2002 10:45:15 -0000 1.4.10.10 @@ -1,5 +1,5 @@ /* - * $Id: ufscommon.cc,v 1.4.10.9 2002/12/13 09:32:58 rbcollins Exp $ + * $Id: ufscommon.cc,v 1.4.10.10 2002/12/13 10:45:15 rbcollins Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -1521,11 +1521,11 @@ #endif void -commonUfsDirDump(StoreEntry * entry, SwapDir * s) +UFSSwapDir::dump(StoreEntry & entry) const { - squidufsinfo_t *ioinfo = (squidufsinfo_t *) s->fsdata; - storeAppendPrintf(entry, " %d %d %d", - s->max_size >> 10, + squidufsinfo_t *ioinfo = (squidufsinfo_t *) fsdata; + storeAppendPrintf(&entry, " %d %d %d", + max_size >> 10, ioinfo->l1, ioinfo->l2); } Index: squid3/src/ufscommon.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ufscommon.h,v retrieving revision 1.1.20.32 retrieving revision 1.1.20.33 diff -u -r1.1.20.32 -r1.1.20.33 --- squid3/src/ufscommon.h 13 Dec 2002 09:32:59 -0000 1.1.20.32 +++ squid3/src/ufscommon.h 13 Dec 2002 10:45:15 -0000 1.1.20.33 @@ -1,6 +1,6 @@ /* - * $Id: ufscommon.h,v 1.1.20.32 2002/12/13 09:32:59 rbcollins Exp $ + * $Id: ufscommon.h,v 1.1.20.33 2002/12/13 10:45:15 rbcollins Exp $ * * SQUID Web Proxy Cache http://www.squid-cache.org/ * ---------------------------------------------------------- @@ -61,17 +61,14 @@ const StoreEntry *commonUfsDirCleanLogNextEntry(SwapDir * sd); void commonUfsDirCloseSwapLog(SwapDir * sd); int commonUfsDirWriteCleanStart(SwapDir * sd); -void commonUfsDirInit(SwapDir * sd); void commonUfsDirUnlinkFile(SwapDir * SD, sfileno f); void commonUfsDirOpenSwapLog(SwapDir * sd); -void commonUfsDirNewfs(SwapDir * sd); void commonUfsDirMaintain(SwapDir * SD); void commonUfsDirRefObj(SwapDir * SD, StoreEntry * e); void commonUfsDirUnrefObj(SwapDir * SD, StoreEntry * e); void commonUfsDirReplAdd(SwapDir * SD, StoreEntry * e); void commonUfsDirReplRemove(StoreEntry * e); void commonUfsDirStats(SwapDir * SD, StoreEntry * sentry); -void commonUfsDirDump(StoreEntry * entry, SwapDir * s); void commonUfsDirFree(SwapDir * s); char *commonUfsDirFullPath(SwapDir * SD, sfileno filn, char *fullpath); int commonUfsCleanupDoubleCheck(SwapDir * sd, StoreEntry * e); @@ -85,6 +82,7 @@ public: virtual void init(); virtual void newFileSystem(); + virtual void dump(StoreEntry &) const; private: static EVH CleanEvent; void initBitmap(); Index: squid3/src/fs/aufs/store_asyncufs.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/aufs/Attic/store_asyncufs.h,v retrieving revision 1.2.12.34 retrieving revision 1.2.12.35 diff -u -r1.2.12.34 -r1.2.12.35 --- squid3/src/fs/aufs/store_asyncufs.h 13 Dec 2002 08:22:57 -0000 1.2.12.34 +++ squid3/src/fs/aufs/store_asyncufs.h 13 Dec 2002 10:45:15 -0000 1.2.12.35 @@ -157,6 +157,8 @@ class AUFSSwapDir : public UFSSwapDir { +public: + virtual void dump(StoreEntry &)const; }; #include "IOStrategy.h" Index: squid3/src/fs/aufs/store_dir_aufs.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/aufs/Attic/store_dir_aufs.cc,v retrieving revision 1.2.12.11 retrieving revision 1.2.12.12 diff -u -r1.2.12.11 -r1.2.12.12 --- squid3/src/fs/aufs/store_dir_aufs.cc 13 Dec 2002 09:32:59 -0000 1.2.12.11 +++ squid3/src/fs/aufs/store_dir_aufs.cc 13 Dec 2002 10:45:15 -0000 1.2.12.12 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_aufs.cc,v 1.2.12.11 2002/12/13 09:32:59 rbcollins Exp $ + * $Id: store_dir_aufs.cc,v 1.2.12.12 2002/12/13 10:45:15 rbcollins Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -45,7 +45,6 @@ MemPool *aufs_qwrite_pool = NULL; static int asyncufs_initialised = 0; -static STDUMP storeAufsDirDump; static STCHECKOBJ storeAufsDirCheckObj; static void storeAufsDirIOUnlinkFile(char *path); @@ -144,10 +143,10 @@ } void -storeAufsDirDump(StoreEntry * entry, SwapDir * s) +AUFSSwapDir::dump(StoreEntry & entry) const { - commonUfsDirDump(entry, s); - dump_cachedir_options(entry, options, s); + UFSSwapDir::dump(entry); + dump_cachedir_options(&entry, options, this); } /* @@ -190,7 +189,6 @@ aioinfo->map = NULL; /* Debugging purposes */ aioinfo->suggest = 0; aioinfo->io.storeDirUnlinkFile = storeAufsDirIOUnlinkFile; - sd->dump = storeAufsDirDump; sd->freefs = commonUfsDirFree; sd->dblcheck = commonUfsCleanupDoubleCheck; sd->statfs = commonUfsDirStats; Index: squid3/src/fs/coss/store_coss.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/coss/store_coss.h,v retrieving revision 1.3.10.11 retrieving revision 1.3.10.12 diff -u -r1.3.10.11 -r1.3.10.12 --- squid3/src/fs/coss/store_coss.h 13 Dec 2002 09:32:59 -0000 1.3.10.11 +++ squid3/src/fs/coss/store_coss.h 13 Dec 2002 10:45:15 -0000 1.3.10.12 @@ -106,6 +106,7 @@ public: virtual void init(); virtual void newFileSystem(); + virtual void dump(StoreEntry &)const; }; extern off_t storeCossAllocate(SwapDir * SD, const StoreEntry * e, int which); Index: squid3/src/fs/coss/store_dir_coss.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/coss/store_dir_coss.cc,v retrieving revision 1.4.10.8 retrieving revision 1.4.10.9 diff -u -r1.4.10.8 -r1.4.10.9 --- squid3/src/fs/coss/store_dir_coss.cc 13 Dec 2002 09:33:00 -0000 1.4.10.8 +++ squid3/src/fs/coss/store_dir_coss.cc 13 Dec 2002 10:45:15 -0000 1.4.10.9 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_coss.cc,v 1.4.10.8 2002/12/13 09:33:00 rbcollins Exp $ + * $Id: store_dir_coss.cc,v 1.4.10.9 2002/12/13 10:45:15 rbcollins Exp $ * * DEBUG: section 47 Store COSS Directory Routines * AUTHOR: Eric Stern @@ -86,7 +86,6 @@ static STFREE storeCossDirShutdown; static STFSPARSE storeCossDirParse; static STFSRECONFIGURE storeCossDirReconfigure; -static STDUMP storeCossDirDump; static STCALLBACK storeCossDirCallback; /* The "only" externally visible function */ @@ -762,7 +761,6 @@ cs->fd = -1; cs->swaplog_fd = -1; - sd->dump = storeCossDirDump; sd->freefs = storeCossDirShutdown; sd->dblcheck = NULL; sd->statfs = storeCossDirStats; @@ -826,11 +824,11 @@ } void -storeCossDirDump(StoreEntry * entry, SwapDir * s) +CossSwapDir::dump(StoreEntry &entry)const { - storeAppendPrintf(entry, " %d", - s->max_size >> 20); - dump_cachedir_options(entry, NULL, s); + storeAppendPrintf(&entry, " %d", + max_size >> 20); + dump_cachedir_options(&entry, NULL, this); } #if OLD_UNUSED_CODE Index: squid3/src/fs/diskd/store_dir_diskd.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/diskd/Attic/store_dir_diskd.cc,v retrieving revision 1.2.16.18 retrieving revision 1.2.16.19 diff -u -r1.2.16.18 -r1.2.16.19 --- squid3/src/fs/diskd/store_dir_diskd.cc 13 Dec 2002 09:33:00 -0000 1.2.16.18 +++ squid3/src/fs/diskd/store_dir_diskd.cc 13 Dec 2002 10:45:15 -0000 1.2.16.19 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_diskd.cc,v 1.2.16.18 2002/12/13 09:33:00 rbcollins Exp $ + * $Id: store_dir_diskd.cc,v 1.2.16.19 2002/12/13 10:45:15 rbcollins Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -50,7 +50,6 @@ static int diskd_initialised = 0; -static STDUMP storeDiskdDirDump; static STCHECKOBJ storeDiskdDirCheckObj; static void storeDiskdDirStats(SwapDir *, StoreEntry *); static void storeDiskdStats(StoreEntry * sentry); @@ -272,7 +271,7 @@ } static void -storeDiskdDirDumpQ1(StoreEntry * e, const char *option, SwapDir * sd) +storeDiskdDirDumpQ1(StoreEntry * e, const char *option, SwapDir const * sd) { DiskdIO *IO = dynamic_cast(sd->IO); storeAppendPrintf(e, " Q1=%d", IO->magic1); @@ -299,7 +298,7 @@ } static void -storeDiskdDirDumpQ2(StoreEntry * e, const char *option, SwapDir * sd) +storeDiskdDirDumpQ2(StoreEntry * e, const char *option, SwapDir const * sd) { DiskdIO *IO = dynamic_cast(sd->IO); storeAppendPrintf(e, " Q2=%d", IO->magic2); @@ -354,10 +353,10 @@ } void -storeDiskdDirDump(StoreEntry * entry, SwapDir * s) +DiskdSwapDir::dump(StoreEntry & entry)const { - commonUfsDirDump (entry, s); - dump_cachedir_options(entry, options, s); + UFSSwapDir::dump (entry); + dump_cachedir_options(&entry, options, this); } /* @@ -397,7 +396,6 @@ ufsinfo->map = NULL; /* Debugging purposes */ ufsinfo->suggest = 0; ufsinfo->io.storeDirUnlinkFile = storeDiskdDirIOUnlinkFile; - sd->dump = storeDiskdDirDump; sd->freefs = commonUfsDirFree; sd->dblcheck = commonUfsCleanupDoubleCheck; sd->statfs = storeDiskdDirStats; Index: squid3/src/fs/diskd/store_diskd.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/diskd/Attic/store_diskd.h,v retrieving revision 1.1.20.34 retrieving revision 1.1.20.35 diff -u -r1.1.20.34 -r1.1.20.35 --- squid3/src/fs/diskd/store_diskd.h 13 Dec 2002 08:22:58 -0000 1.1.20.34 +++ squid3/src/fs/diskd/store_diskd.h 13 Dec 2002 10:45:15 -0000 1.1.20.35 @@ -140,6 +140,7 @@ class DiskdSwapDir : public UFSSwapDir { virtual void init(); + virtual void dump(StoreEntry &)const; }; #define SHMBUF_BLKSZ SM_PAGE_SIZE Index: squid3/src/fs/null/store_null.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/null/store_null.cc,v retrieving revision 1.1.20.6 retrieving revision 1.1.20.7 diff -u -r1.1.20.6 -r1.1.20.7 --- squid3/src/fs/null/store_null.cc 13 Dec 2002 08:22:58 -0000 1.1.20.6 +++ squid3/src/fs/null/store_null.cc 13 Dec 2002 10:45:15 -0000 1.1.20.7 @@ -1,6 +1,6 @@ /* - * $Id: store_null.cc,v 1.1.20.6 2002/12/13 08:22:58 rbcollins Exp $ + * $Id: store_null.cc,v 1.1.20.7 2002/12/13 10:45:15 rbcollins Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -53,6 +53,7 @@ class NullSwapDir : public SwapDir { +public: virtual void init(); }; Index: squid3/src/fs/ufs/store_dir_ufs.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/ufs/store_dir_ufs.cc,v retrieving revision 1.1.20.10 retrieving revision 1.1.20.11 diff -u -r1.1.20.10 -r1.1.20.11 --- squid3/src/fs/ufs/store_dir_ufs.cc 13 Dec 2002 09:33:00 -0000 1.1.20.10 +++ squid3/src/fs/ufs/store_dir_ufs.cc 13 Dec 2002 10:45:15 -0000 1.1.20.11 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_ufs.cc,v 1.1.20.10 2002/12/13 09:33:00 rbcollins Exp $ + * $Id: store_dir_ufs.cc,v 1.1.20.11 2002/12/13 10:45:15 rbcollins Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -42,7 +42,6 @@ #include "SwapDir.h" static int ufs_initialised = 0; -static STDUMP storeUfsDirDump; static STCHECKOBJ storeUfsDirCheckObj; static void storeUfsDirIOUnlinkFile(char *path); @@ -124,10 +123,10 @@ } void -storeUfsDirDump(StoreEntry * entry, SwapDir * s) +UfsSwapDir::dump(StoreEntry & entry)const { - commonUfsDirDump (entry, s); - dump_cachedir_options(entry, options, s); + UFSSwapDir::dump (entry); + dump_cachedir_options(&entry, options, this); } /* @@ -171,7 +170,6 @@ ufsinfo->map = NULL; /* Debugging purposes */ ufsinfo->suggest = 0; ufsinfo->io.storeDirUnlinkFile = storeUfsDirIOUnlinkFile; - sd->dump = storeUfsDirDump; sd->freefs = commonUfsDirFree; sd->dblcheck = commonUfsCleanupDoubleCheck; sd->statfs = commonUfsDirStats; Index: squid3/src/fs/ufs/store_ufs.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/ufs/Attic/store_ufs.h,v retrieving revision 1.1.20.25 retrieving revision 1.1.20.26 diff -u -r1.1.20.25 -r1.1.20.26 --- squid3/src/fs/ufs/store_ufs.h 13 Dec 2002 08:22:58 -0000 1.1.20.25 +++ squid3/src/fs/ufs/store_ufs.h 13 Dec 2002 10:45:15 -0000 1.1.20.26 @@ -58,6 +58,11 @@ extern STOBJCLOSE storeUfsClose; extern STOBJUNLINK storeUfsUnlink; +/* For things that aren't factored well yet */ +class UfsSwapDir: public UFSSwapDir { + virtual void dump(StoreEntry &)const; +}; + #include "IOStrategy.h" class UfsIO : public UFSStrategy {