--------------------- PatchSet 386 Date: 2002/12/14 21:32:10 Author: rbcollins Branch: unify-io Tag: (none) Log: use nextEntry virtual method Members: src/SwapDir.h:1.1.2.33->1.1.2.34 src/store_dir.cc:1.4.10.15->1.4.10.16 src/ufscommon.cc:1.4.10.36->1.4.10.37 src/ufscommon.h:1.1.20.55->1.1.20.56 src/fs/aufs/store_dir_aufs.cc:1.2.12.31->1.2.12.32 src/fs/coss/store_dir_coss.cc:1.4.10.31->1.4.10.32 src/fs/diskd/store_dir_diskd.cc:1.2.16.39->1.2.16.40 src/fs/ufs/store_dir_ufs.cc:1.1.20.34->1.1.20.35 Index: squid3/src/SwapDir.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/SwapDir.h,v retrieving revision 1.1.2.33 retrieving revision 1.1.2.34 diff -u -r1.1.2.33 -r1.1.2.34 --- squid3/src/SwapDir.h 14 Dec 2002 21:25:28 -0000 1.1.2.33 +++ squid3/src/SwapDir.h 14 Dec 2002 21:32:10 -0000 1.1.2.34 @@ -1,6 +1,6 @@ /* - * $Id: SwapDir.h,v 1.1.2.33 2002/12/14 21:25:28 rbcollins Exp $ + * $Id: SwapDir.h,v 1.1.2.34 2002/12/14 21:32:10 rbcollins Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -35,7 +35,6 @@ #define SQUID_SWAPDIR_H #include "StoreIOState.h" -typedef const StoreEntry *STLOGCLEANNEXTENTRY(SwapDir *); typedef void STLOGCLEANWRITE(SwapDir *, const StoreEntry *); struct SwapDir { @@ -87,7 +86,6 @@ }; struct { struct { - STLOGCLEANNEXTENTRY *nextentry; STLOGCLEANWRITE *write; CleanLog *state; } clean; Index: squid3/src/store_dir.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/store_dir.cc,v retrieving revision 1.4.10.15 retrieving revision 1.4.10.16 diff -u -r1.4.10.15 -r1.4.10.16 --- squid3/src/store_dir.cc 14 Dec 2002 21:27:48 -0000 1.4.10.15 +++ squid3/src/store_dir.cc 14 Dec 2002 21:32:10 -0000 1.4.10.16 @@ -1,6 +1,6 @@ /* - * $Id: store_dir.cc,v 1.4.10.15 2002/12/14 21:27:48 rbcollins Exp $ + * $Id: store_dir.cc,v 1.4.10.16 2002/12/14 21:32:10 rbcollins Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -397,7 +397,7 @@ sd = INDEXSD(dirn); if (NULL == sd->log.clean.state) continue; - e = sd->log.clean.nextentry(sd); + e = sd->log.clean.state->nextEntry(); if (!e) continue; notdone = 1; Index: squid3/src/ufscommon.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ufscommon.cc,v retrieving revision 1.4.10.36 retrieving revision 1.4.10.37 diff -u -r1.4.10.36 -r1.4.10.37 --- squid3/src/ufscommon.cc 14 Dec 2002 21:25:28 -0000 1.4.10.36 +++ squid3/src/ufscommon.cc 14 Dec 2002 21:32:10 -0000 1.4.10.37 @@ -1,5 +1,5 @@ /* - * $Id: ufscommon.cc,v 1.4.10.36 2002/12/14 21:25:28 rbcollins Exp $ + * $Id: ufscommon.cc,v 1.4.10.37 2002/12/14 21:32:10 rbcollins Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -961,12 +961,6 @@ * Get the next entry that is a candidate for clean log writing */ const StoreEntry * -commonUfsDirCleanLogNextEntry(SwapDir * sd) -{ - return sd->log.clean.state->nextEntry(); -} - -const StoreEntry * UFSCleanLog::nextEntry() { const StoreEntry *entry = NULL; Index: squid3/src/ufscommon.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ufscommon.h,v retrieving revision 1.1.20.55 retrieving revision 1.1.20.56 diff -u -r1.1.20.55 -r1.1.20.56 --- squid3/src/ufscommon.h 14 Dec 2002 11:41:08 -0000 1.1.20.55 +++ squid3/src/ufscommon.h 14 Dec 2002 21:32:10 -0000 1.1.20.56 @@ -1,6 +1,6 @@ /* - * $Id: ufscommon.h,v 1.1.20.55 2002/12/14 11:41:08 rbcollins Exp $ + * $Id: ufscommon.h,v 1.1.20.56 2002/12/14 21:32:10 rbcollins Exp $ * * SQUID Web Proxy Cache http://www.squid-cache.org/ * ---------------------------------------------------------- @@ -56,7 +56,6 @@ /* Common UFS routines */ FREE storeSwapLogDataFree; -const StoreEntry *commonUfsDirCleanLogNextEntry(SwapDir * sd); void commonUfsDirUnlinkFile(SwapDir * SD, sfileno f); void commonUfsDirMaintain(SwapDir * SD); void commonUfsDirRefObj(SwapDir * SD, StoreEntry * e); 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.31 retrieving revision 1.2.12.32 diff -u -r1.2.12.31 -r1.2.12.32 --- squid3/src/fs/aufs/store_dir_aufs.cc 14 Dec 2002 11:41:09 -0000 1.2.12.31 +++ squid3/src/fs/aufs/store_dir_aufs.cc 14 Dec 2002 21:32:10 -0000 1.2.12.32 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_aufs.cc,v 1.2.12.31 2002/12/14 11:41:09 rbcollins Exp $ + * $Id: store_dir_aufs.cc,v 1.2.12.32 2002/12/14 21:32:10 rbcollins Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -188,7 +188,6 @@ aioinfo->map = NULL; /* Debugging purposes */ aioinfo->suggest = 0; aioinfo->io.storeDirUnlinkFile = storeAufsDirIOUnlinkFile; - sd->log.clean.nextentry = commonUfsDirCleanLogNextEntry; parse_cachedir_options(sd, options, 0); 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.31 retrieving revision 1.4.10.32 diff -u -r1.4.10.31 -r1.4.10.32 --- squid3/src/fs/coss/store_dir_coss.cc 14 Dec 2002 21:27:48 -0000 1.4.10.31 +++ squid3/src/fs/coss/store_dir_coss.cc 14 Dec 2002 21:32:10 -0000 1.4.10.32 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_coss.cc,v 1.4.10.31 2002/12/14 21:27:48 rbcollins Exp $ + * $Id: store_dir_coss.cc,v 1.4.10.32 2002/12/14 21:32:10 rbcollins Exp $ * * DEBUG: section 47 Store COSS Directory Routines * AUTHOR: Eric Stern @@ -75,7 +75,6 @@ static void storeCossDirRebuild(SwapDir * sd); static void storeCossDirCloseTmpSwapLog(SwapDir * sd); static FILE *storeCossDirOpenTmpSwapLog(SwapDir *, int *, int *); -static STLOGCLEANNEXTENTRY storeCossDirCleanLogNextEntry; static STLOGCLEANWRITE storeCossDirWriteCleanEntry; static STFSPARSE storeCossDirParse; static STFSRECONFIGURE storeCossDirReconfigure; @@ -511,12 +510,6 @@ return 0; } -static const StoreEntry * -storeCossDirCleanLogNextEntry(SwapDir * sd) -{ - return sd->log.clean.state->nextEntry(); -} - const StoreEntry * CossCleanLog::nextEntry() { @@ -770,7 +763,6 @@ cs->swaplog_fd = -1; sd->log.clean.write = storeCossDirWriteCleanEntry; - sd->log.clean.nextentry = storeCossDirCleanLogNextEntry; cs->current_offset = 0; cs->fd = -1; 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.39 retrieving revision 1.2.16.40 diff -u -r1.2.16.39 -r1.2.16.40 --- squid3/src/fs/diskd/store_dir_diskd.cc 14 Dec 2002 11:41:09 -0000 1.2.16.39 +++ squid3/src/fs/diskd/store_dir_diskd.cc 14 Dec 2002 21:32:10 -0000 1.2.16.40 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_diskd.cc,v 1.2.16.39 2002/12/14 11:41:09 rbcollins Exp $ + * $Id: store_dir_diskd.cc,v 1.2.16.40 2002/12/14 21:32:10 rbcollins Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -393,7 +393,6 @@ ufsinfo->map = NULL; /* Debugging purposes */ ufsinfo->suggest = 0; ufsinfo->io.storeDirUnlinkFile = storeDiskdDirIOUnlinkFile; - sd->log.clean.nextentry = commonUfsDirCleanLogNextEntry; parse_cachedir_options(sd, options, 0); 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.34 retrieving revision 1.1.20.35 diff -u -r1.1.20.34 -r1.1.20.35 --- squid3/src/fs/ufs/store_dir_ufs.cc 14 Dec 2002 11:41:09 -0000 1.1.20.34 +++ squid3/src/fs/ufs/store_dir_ufs.cc 14 Dec 2002 21:32:11 -0000 1.1.20.35 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_ufs.cc,v 1.1.20.34 2002/12/14 11:41:09 rbcollins Exp $ + * $Id: store_dir_ufs.cc,v 1.1.20.35 2002/12/14 21:32:11 rbcollins Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -169,7 +169,6 @@ ufsinfo->map = NULL; /* Debugging purposes */ ufsinfo->suggest = 0; ufsinfo->io.storeDirUnlinkFile = storeUfsDirIOUnlinkFile; - sd->log.clean.nextentry = commonUfsDirCleanLogNextEntry; parse_cachedir_options(sd, options, 1);