--------------------- PatchSet 1267 Date: 2001/01/10 20:41:13 Author: adri Branch: modio Tag: (none) Log: * kill ENTRY_VALIDATED. Its a per-fS issue, not a general store issue * fix store_dirs_rebuilding to be decremented in storeRebuildComplete() so validation completes right * fix the hash store to call storeRebuildComplete() .. Members: src/store.c:1.2.2.17->1.2.2.18 src/store_rebuild.c:1.2.2.4->1.2.2.5 src/fs/hash/store_dir_hash.c:1.1.2.4->1.1.2.5 Index: squid/src/store.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store.c,v retrieving revision 1.2.2.17 retrieving revision 1.2.2.18 diff -u -r1.2.2.17 -r1.2.2.18 --- squid/src/store.c 8 Jan 2001 23:34:11 -0000 1.2.2.17 +++ squid/src/store.c 10 Jan 2001 20:41:13 -0000 1.2.2.18 @@ -1,6 +1,6 @@ /* - * $Id: store.c,v 1.2.2.17 2001/01/08 23:34:11 adri Exp $ + * $Id: store.c,v 1.2.2.18 2001/01/10 20:41:13 adri Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -396,7 +396,6 @@ e->lastref = squid_curtime; e->timestamp = -1; /* set in storeTimestampsSet() */ e->ping_status = PING_NONE; - EBIT_SET(e->flags, ENTRY_VALIDATED); return e; } Index: squid/src/store_rebuild.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store_rebuild.c,v retrieving revision 1.2.2.4 retrieving revision 1.2.2.5 diff -u -r1.2.2.4 -r1.2.2.5 --- squid/src/store_rebuild.c 8 Jan 2001 23:34:11 -0000 1.2.2.4 +++ squid/src/store_rebuild.c 10 Jan 2001 20:41:14 -0000 1.2.2.5 @@ -1,6 +1,6 @@ /* - * $Id: store_rebuild.c,v 1.2.2.4 2001/01/08 23:34:11 adri Exp $ + * $Id: store_rebuild.c,v 1.2.2.5 2001/01/10 20:41:14 adri Exp $ * * DEBUG: section 20 Store Rebuild Routines * AUTHOR: Duane Wessels @@ -69,6 +69,8 @@ counts.badflags += dc->badflags; counts.bad_log_op += dc->bad_log_op; counts.zero_object_sz += dc->zero_object_sz; + store_dirs_rebuilding--; + /* * When store_dirs_rebuilding == 1, it means we are done reading * or scanning all cache_dirs. Now report the stats and start Index: squid/src/fs/hash/store_dir_hash.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/hash/Attic/store_dir_hash.c,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- squid/src/fs/hash/store_dir_hash.c 6 Jan 2001 14:35:57 -0000 1.1.2.4 +++ squid/src/fs/hash/store_dir_hash.c 10 Jan 2001 20:41:14 -0000 1.1.2.5 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_hash.c,v 1.1.2.4 2001/01/06 14:35:57 adri Exp $ + * $Id: store_dir_hash.c,v 1.1.2.5 2001/01/10 20:41:14 adri Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -64,6 +64,7 @@ static STREFOBJ storeHashDirRefObj; static STUNREFOBJ storeHashDirUnrefObj; static EVH storeHashDirCleanEvent; +static EVH storeHashDirRebuildEvent; static int storeHashCleanupDoubleCheck(SwapDir *, StoreEntry *); static void storeHashDirStats(SwapDir *, StoreEntry *); static void storeHashDirInitBitmap(SwapDir *); @@ -235,7 +236,9 @@ storeHashDirInitBitmap(sd); storeHashDirOpenSwapLog(sd); if (!started_clean_event) { - eventAdd("storeDirClean", storeHashDirCleanEvent, NULL, 15.0, 1); + eventAdd("storeHashDirClean", storeHashDirCleanEvent, NULL, 15.0, 1); + /* we can't call the rebuild completion routine until the next loop */ + eventAdd("storeHashRebuild", storeHashDirRebuildEvent, NULL, 0.0, 1); started_clean_event = 1; } } @@ -268,6 +271,18 @@ #endif } +static void +storeHashDirRebuildEvent(void *data) +{ + SwapDir *sd = data; + + struct _store_rebuild_data sr; + + /* feed it an empty rebuild, cause we're empty! */ + bzero(&sr, sizeof(struct _store_rebuild_data)); + storeRebuildComplete(&sr); +} + void storeHashDirMaintain(SwapDir * SD) {