--------------------- PatchSet 992 Date: 2000/12/27 11:04:05 Author: adri Branch: modio Tag: (none) Log: Massive Change Time. * storeSetPublicKey() / storeSetPrivateKey() now set/clear the KEY_PRIVATE flag in the StoreEntry, and then call stmakepublic/ stmakeprivate. These are functions in StoreEntry and belong to the reply object * Started to rip out the whole hash thing from the StoreEntry. It is currently too ingrained in the icp/icmp/cache digest code. I'll fix that later. The StoreEntry's are now stuck on a dlink_list which will suffice to track "open" connections. * Changed a lot of storeKeyText() -> storeKeyUrl() which takes a StoreEntry * .. this should be used for logging purposes. Right now it just returns storeUrl() which is ok for now. * the stuff in stat.c needs to be rewritten to use the dlink_list rather than the hash table which doesn't exist anymore. * Removed storeAttachReply() - nothing was using it anyway. Note that the conditional call of stmakepublic/stmakeprivate based on whether the pointers are not NULL can / should be removed once the reply objects are attached during storeCreateEntry(). Members: src/HttpHdrRange.c:1.2.2.1->1.2.2.2 src/globals.h:1.2.2.2->1.2.2.3 src/http.c:1.2.2.3->1.2.2.4 src/protos.h:1.2.2.8->1.2.2.9 src/pump.c:1.2.2.4->1.2.2.5 src/reply_internal.c:1.1.2.4->1.1.2.5 src/store.c:1.2.2.13->1.2.2.14 src/store_client.c:1.2.2.8->1.2.2.9 src/store_dir.c:1.2.2.1->1.2.2.2 src/store_log.c:1.2.2.2->1.2.2.3 src/structs.h:1.2.2.9->1.2.2.10 src/typedefs.h:1.2.2.4->1.2.2.5 Index: squid/src/HttpHdrRange.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/HttpHdrRange.c,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -u -r1.2.2.1 -r1.2.2.2 --- squid/src/HttpHdrRange.c 9 Nov 2000 15:25:07 -0000 1.2.2.1 +++ squid/src/HttpHdrRange.c 27 Dec 2000 11:04:05 -0000 1.2.2.2 @@ -1,6 +1,6 @@ /* - * $Id: HttpHdrRange.c,v 1.2.2.1 2000/11/09 15:25:07 adri Exp $ + * $Id: HttpHdrRange.c,v 1.2.2.2 2000/12/27 11:04:05 adri Exp $ * * DEBUG: section 64 HTTP Range Header * AUTHOR: Alex Rousskov @@ -467,7 +467,7 @@ assert(http); stringAppend(&b, full_appname_string, strlen(full_appname_string)); stringAppend(&b, ":", 1); - key = storeKeyText(http->entry->hash.key); + key = storeKeyPublic(storeKeyUrl(http->entry), METHOD_GET); stringAppend(&b, key, strlen(key)); return b; } Index: squid/src/globals.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/globals.h,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -u -r1.2.2.2 -r1.2.2.3 --- squid/src/globals.h 13 Dec 2000 07:57:55 -0000 1.2.2.2 +++ squid/src/globals.h 27 Dec 2000 11:04:06 -0000 1.2.2.3 @@ -1,6 +1,6 @@ /* - * $Id: globals.h,v 1.2.2.2 2000/12/13 07:57:55 adri Exp $ + * $Id: globals.h,v 1.2.2.3 2000/12/27 11:04:06 adri Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -125,6 +125,7 @@ extern double current_dtime; extern int store_hash_buckets; /* 0 */ extern hash_table *store_table; /* NULL */ +extern dlink_list store_list; /* { NULL, NULL } */ extern dlink_list ClientActiveRequests; extern const String StringNull; /* { 0, 0, NULL } */ extern const MemBuf MemBufNull; /* MemBufNULL */ Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/http.c,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.4 diff -u -r1.2.2.3 -r1.2.2.4 --- squid/src/http.c 13 Dec 2000 09:45:02 -0000 1.2.2.3 +++ squid/src/http.c 27 Dec 2000 11:04:06 -0000 1.2.2.4 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.2.2.3 2000/12/13 09:45:02 rbcollins Exp $ + * $Id: http.c,v 1.2.2.4 2000/12/27 11:04:06 adri Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -325,7 +325,7 @@ HttpReply *reply = entry->mem_obj->reply; Ctx ctx; debug(11, 3) ("httpProcessReplyHeader: key '%s'\n", - storeKeyText(entry->hash.key)); + storeKeyUrl(entry)); if (httpState->reply_hdr == NULL) httpState->reply_hdr = memAllocate(MEM_8K_BUF); assert(httpState->reply_hdr_state == 0); Index: squid/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/protos.h,v retrieving revision 1.2.2.8 retrieving revision 1.2.2.9 diff -u -r1.2.2.8 -r1.2.2.9 --- squid/src/protos.h 20 Dec 2000 15:39:22 -0000 1.2.2.8 +++ squid/src/protos.h 27 Dec 2000 11:04:06 -0000 1.2.2.9 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.2.2.8 2000/12/20 15:39:22 adri Exp $ + * $Id: protos.h,v 1.2.2.9 2000/12/27 11:04:06 adri Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -837,6 +837,7 @@ extern void storeMemObjectDump(MemObject * mem); extern void storeEntryDump(const StoreEntry * e, int debug_lvl); extern const char *storeUrl(const StoreEntry *); +extern const char *storeKeyUrl(const StoreEntry *); extern void storeCreateMemObject(StoreEntry *, const char *, const char *); extern void storeCopyNotModifiedReplyHeaders(MemObject * O, MemObject * N); extern void storeBuffer(StoreEntry *); @@ -864,8 +865,6 @@ extern void storeReplAdd(char *, REMOVALPOLICYCREATE *); extern off_t storeMemHiOffset(const StoreEntry *); extern off_t storeMemLoOffset(const StoreEntry *); -extern void storeAttachReply(StoreEntry *, STRAPPEND *, STRFLUSH *, STRMEMHI *, - STRMEMLO *, STRCLIENTCOPY *, STRRELEASE *, STRDONE *, void *); extern void storeDetachReply(StoreEntry *); /* store_modules.c */ Index: squid/src/pump.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/pump.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/pump.c 20 Dec 2000 12:41:22 -0000 1.2.2.4 +++ squid/src/pump.c 27 Dec 2000 11:04:06 -0000 1.2.2.5 @@ -1,6 +1,6 @@ /* - * $Id: pump.c,v 1.2.2.4 2000/12/20 12:41:22 adri Exp $ + * $Id: pump.c,v 1.2.2.5 2000/12/27 11:04:06 adri Exp $ * * DEBUG: section 61 PUMP handler * AUTHOR: Kostas Anagnostakis @@ -99,7 +99,7 @@ request_t *r = fwd->request; size_t copy_sz; debug(61, 3) ("pumpStart: FD %d, key %s\n", - s_fd, storeKeyText(fwd->entry->hash.key)); + s_fd, storeKeyUrl(fwd->entry)); /* * find state data generated by pumpInit in linked list */ Index: squid/src/reply_internal.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/reply_internal.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/reply_internal.c 20 Dec 2000 15:39:22 -0000 1.1.2.4 +++ squid/src/reply_internal.c 27 Dec 2000 11:04:06 -0000 1.1.2.5 @@ -91,7 +91,7 @@ if (len) { debug(20, 5) ("storeAppend: appending %d bytes for '%s'\n", len, - storeKeyText(e->hash.key)); + storeKeyUrl(e)); /* Used to call storeGetMemSpace here .. */ /* storeGetMemSpace(len); */ stmemAppend(&state->data_hdr, buf, len); @@ -109,7 +109,7 @@ static void reply_internal_flush(StoreEntry *e) { - debug(20, 3) ("reply_internal_flush: %s\n", storeKeyText(e->hash.key)); + debug(20, 3) ("reply_internal_flush: %s\n", storeKeyUrl(e)); /* walk the entire list looking for valid callbacks */ if (e->sc.callback_data == NULL) return; @@ -175,7 +175,7 @@ debug(20, 5) ("reply_internal_clientcopy: returning because ENTRY_FWD_HDR_WAIT set\n"); return; } - debug(20, 3) ("reply_internal_clientcopy: %s\n", storeKeyText(e->hash.key)); + debug(20, 3) ("reply_internal_clientcopy: %s\n", storeKeyUrl(e)); assert(sc->callback != NULL); /* * We used to check for ENTRY_ABORTED here. But there were some @@ -225,6 +225,26 @@ /* + * reply_makepublic - make this object public + */ +static void +reply_internal_makepublic(StoreEntry *e) +{ + /* Do nothing */ +} + + +/* + * reply_makeprivate - make this object private + */ +static void +reply_internal_makeprivate(StoreEntry *e) +{ + /* Do nothing */ +} + + +/* * reply_internal_release - object is being deleted * * Yes, its a no-op for us because all objects are private @@ -261,6 +281,8 @@ e->stmemhi = reply_internal_memhi; e->stmemlo = reply_internal_memlo; e->stclientcopy = reply_internal_clientcopy; + e->stmakeprivate = reply_internal_makeprivate; + e->stmakepublic = reply_internal_makepublic; e->strelease = reply_internal_release; e->stdone = reply_internal_done; Index: squid/src/store.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store.c,v retrieving revision 1.2.2.13 retrieving revision 1.2.2.14 diff -u -r1.2.2.13 -r1.2.2.14 --- squid/src/store.c 21 Dec 2000 14:33:04 -0000 1.2.2.13 +++ squid/src/store.c 27 Dec 2000 11:04:06 -0000 1.2.2.14 @@ -1,6 +1,6 @@ /* - * $Id: store.c,v 1.2.2.13 2000/12/21 14:33:04 adri Exp $ + * $Id: store.c,v 1.2.2.14 2000/12/27 11:04:06 adri Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -80,14 +80,12 @@ #if 0 static void storeGetMemSpace(int); #endif -static void storeHashDelete(StoreEntry *); static MemObject *new_MemObject(const char *, const char *); static void destroy_MemObject(StoreEntry *); static FREE destroy_StoreEntry; #if 0 static void storePurgeMem(StoreEntry *); #endif -static int getKeyCounter(void); static OBJH storeCheckCachableStats; static EVH storeLateRelease; @@ -182,31 +180,10 @@ /* Scrape it clean .. */ destroy_MemObject(e); - storeHashDelete(e); - assert(e->hash.key == NULL); memFree(e, MEM_STOREENTRY); } -/* ----- INTERFACE BETWEEN STORAGE MANAGER AND HASH TABLE FUNCTIONS --------- */ - -void -storeHashInsert(StoreEntry * e, const cache_key * key) -{ - debug(20, 3) ("storeHashInsert: Inserting Entry %p key '%s'\n", - e, storeKeyText(key)); - e->hash.key = storeKeyDup(key); - hash_join(store_table, &e->hash); -} - -static void -storeHashDelete(StoreEntry * e) -{ - hash_remove_link(store_table, &e->hash); - storeKeyFree(e->hash.key); - e->hash.key = NULL; -} - /* -------------------------------------------------------------------------- */ @@ -216,10 +193,9 @@ static void storePurgeMem(StoreEntry * e) { - if (e->mem_obj == NULL) - return; + assert(e->mem_obj != NULL); debug(20, 3) ("storePurgeMem: Freeing memory-copy of %s\n", - storeKeyText(e->hash.key)); + storeKeyUrl(e)); destroy_MemObject(e); if (e->swap_status != SWAPOUT_DONE) storeRelease(e); @@ -230,18 +206,20 @@ void storeLockObject(StoreEntry * e) { + assert(e->mem_obj != NULL); e->lock_count++; debug(20, 3) ("storeLockObject: key '%s' count=%d\n", - storeKeyText(e->hash.key), (int) e->lock_count); + storeKeyUrl(e), (int) e->lock_count); e->lastref = squid_curtime; } void storeReleaseRequest(StoreEntry * e) { + assert(e->mem_obj != NULL); if (EBIT_TEST(e->flags, RELEASE_REQUEST)) return; - debug(20, 3) ("storeReleaseRequest: '%s'\n", storeKeyText(e->hash.key)); + debug(20, 3) ("storeReleaseRequest: '%s'\n", storeKeyUrl(e)); EBIT_SET(e->flags, RELEASE_REQUEST); /* * Clear cachable flag here because we might get called before @@ -266,9 +244,10 @@ int storeUnlockObject(StoreEntry * e) { + assert(e->mem_obj != NULL); e->lock_count--; debug(20, 3) ("storeUnlockObject: key '%s' count=%d\n", - storeKeyText(e->hash.key), e->lock_count); + storeKeyUrl(e), e->lock_count); if (e->lock_count) return (int) e->lock_count; @@ -311,43 +290,23 @@ return storeGet(storeKeyPublic(uri, method)); } -static int -getKeyCounter(void) -{ - static int key_counter = 0; - if (++key_counter < 0) - key_counter = 1; - return key_counter; -} - void storeSetPrivateKey(StoreEntry * e) { - const cache_key *newkey; - MemObject *mem = e->mem_obj; - if (e->hash.key && EBIT_TEST(e->flags, KEY_PRIVATE)) + if (EBIT_TEST(e->flags, KEY_PRIVATE)) return; /* is already private */ - if (e->hash.key) { - if (e->swap_filen > -1) - storeDirSwapLog(e, SWAP_LOG_DEL); - storeHashDelete(e); - } - if (mem != NULL) { - mem->id = getKeyCounter(); - newkey = storeKeyPrivate(mem->url, mem->method, mem->id); - } else { - newkey = storeKeyPrivate("JUNK", METHOD_NONE, getKeyCounter()); - } - assert(hash_lookup(store_table, newkey) == NULL); EBIT_SET(e->flags, KEY_PRIVATE); - storeHashInsert(e, newkey); + /* XXX this lame check can go !!! -- adrian */ + if (e->stmakeprivate) + e->stmakeprivate(e); } void storeSetPublicKey(StoreEntry * e) { +#if 0 StoreEntry *e2 = NULL; - const cache_key *newkey; +#endif MemObject *mem = e->mem_obj; if (e->hash.key && !EBIT_TEST(e->flags, KEY_PRIVATE)) return; /* is already public */ @@ -368,7 +327,12 @@ e->hash.key, mem->url); #endif assert(!EBIT_TEST(e->flags, RELEASE_REQUEST)); - newkey = storeKeyPublic(mem->url, mem->method); +#if 0 + /* + * We don't need this anymore, key collisions should be handled in + * the object store(s) + * -- adrian + */ if ((e2 = (StoreEntry *) hash_lookup(store_table, newkey))) { debug(20, 3) ("storeSetPublicKey: Making old '%s' private.\n", mem->url); storeSetPrivateKey(e2); @@ -377,8 +341,11 @@ } if (e->hash.key) storeHashDelete(e); +#endif EBIT_CLR(e->flags, KEY_PRIVATE); - storeHashInsert(e, newkey); + /* XXX this lame check can go !!! -- adrian */ + if (e->stmakepublic) + e->stmakepublic(e); if (e->swap_filen > -1) storeDirSwapLog(e, SWAP_LOG_ADD); } @@ -423,7 +390,7 @@ void storeExpireNow(StoreEntry * e) { - debug(20, 3) ("storeExpireNow: '%s'\n", storeKeyText(e->hash.key)); + debug(20, 3) ("storeExpireNow: '%s'\n", storeKeyUrl(e)); e->expires = squid_curtime; } @@ -601,7 +568,7 @@ void storeComplete(StoreEntry * e) { - debug(20, 3) ("storeComplete: '%s'\n", storeKeyText(e->hash.key)); + debug(20, 3) ("storeComplete: '%s'\n", storeKeyUrl(e)); if (e->store_status != STORE_PENDING) { /* * if we're not STORE_PENDING, then probably we got aborted @@ -642,7 +609,7 @@ MemObject *mem = e->mem_obj; assert(e->store_status == STORE_PENDING); assert(mem != NULL); - debug(20, 6) ("storeAbort: %s\n", storeKeyText(e->hash.key)); + debug(20, 6) ("storeAbort: %s\n", storeKeyUrl(e)); storeLockObject(e); /* lock while aborting */ storeNegativeCache(e); storeReleaseRequest(e); @@ -743,7 +710,7 @@ void storeRelease(StoreEntry * e) { - debug(20, 3) ("storeRelease: Releasing: '%s'\n", storeKeyText(e->hash.key)); + debug(20, 3) ("storeRelease: Releasing: '%s'\n", storeKeyUrl(e)); /* If, for any reason we can't discard this object because of an * outstanding request, mark it for pending release */ @@ -804,7 +771,7 @@ const HttpReply *reply; assert(e->mem_obj != NULL); reply = e->mem_obj->reply; - debug(20, 3) ("storeEntryValidLength: Checking '%s'\n", storeKeyText(e->hash.key)); + debug(20, 3) ("storeEntryValidLength: Checking '%s'\n", storeKeyUrl(e)); debug(20, 5) ("storeEntryValidLength: object_len = %d\n", objectLen(e)); debug(20, 5) ("storeEntryValidLength: hdr_sz = %d\n", @@ -813,17 +780,17 @@ reply->content_length); if (reply->content_length < 0) { debug(20, 5) ("storeEntryValidLength: Unspecified content length: %s\n", - storeKeyText(e->hash.key)); + storeKeyUrl(e)); return 1; } if (reply->hdr_sz == 0) { debug(20, 5) ("storeEntryValidLength: Zero header size: %s\n", - storeKeyText(e->hash.key)); + storeKeyUrl(e)); return 1; } if (e->mem_obj->method == METHOD_HEAD) { debug(20, 5) ("storeEntryValidLength: HEAD request: %s\n", - storeKeyText(e->hash.key)); + storeKeyUrl(e)); return 1; } if (reply->sline.status == HTTP_NOT_MODIFIED) @@ -836,7 +803,7 @@ debug(20, 3) ("storeEntryValidLength: %d bytes too %s; '%s'\n", diff < 0 ? -diff : diff, diff < 0 ? "big" : "small", - storeKeyText(e->hash.key)); + storeKeyUrl(e)); return 0; } @@ -861,10 +828,10 @@ void storeInit(void) { + store_list.head = NULL; + store_list.tail = NULL; storeKeyInit(); storeInitHashValues(); - store_table = hash_create(storeKeyHashCmp, - store_hash_buckets, storeKeyHashHash); mem_policy = createRemovalPolicy(Config.memPolicy); storeDigestInit(); storeLogOpen(); @@ -903,8 +870,6 @@ void storeFreeMemory(void) { - hashFreeItems(store_table, destroy_StoreEntry); - hashFreeMemory(store_table); store_table = NULL; #if USE_CACHE_DIGESTS if (store_digest) @@ -998,8 +963,7 @@ void storeEntryDump(const StoreEntry * e, int l) { - debug(20, l) ("StoreEntry->key: %s\n", storeKeyText(e->hash.key)); - debug(20, l) ("StoreEntry->next: %p\n", e->hash.next); + debug(20, l) ("StoreEntry->key: %s\n", storeKeyUrl(e)); debug(20, l) ("StoreEntry->mem_obj: %p\n", e->mem_obj); debug(20, l) ("StoreEntry->timestamp: %d\n", (int) e->timestamp); debug(20, l) ("StoreEntry->lastref: %d\n", (int) e->lastref); @@ -1029,6 +993,13 @@ return e->mem_obj->url; } + +const char * +storeKeyUrl(const StoreEntry *e) +{ + return storeUrl(e); +} + void storeCreateMemObject(StoreEntry * e, const char *url, const char *log_url) { @@ -1210,39 +1181,6 @@ #endif -/* - * storeAttachReply() - attach a reply to a MemObject - * - * A reply is an "object" which populates a store client. Right now it - * is a bit of a mess with shared replies (one storeentry filling multiple - * clients) but this will become clearer.. - */ -void -storeAttachReply(StoreEntry *e, STRAPPEND *stappend, STRFLUSH *stflush, - STRMEMHI *stmemhi, STRMEMLO *stmemlo, STRCLIENTCOPY *stclientcopy, - STRRELEASE *strelease, STRDONE *stdone, void *stdata) -{ - assert (e != NULL); - assert (e->mem_obj != NULL); - - /* If we have a reply attached already, call its done handler .. */ - if (e->stdone != NULL) { - storeDetachReply(e); - } - - /* Attach the reply */ - e->stappend = stappend; - e->stflush = stflush; - e->stmemhi = stmemhi; - e->stmemlo = stmemlo; - e->stclientcopy = stclientcopy; - e->strelease = strelease; - e->stdone = stdone; - e->stdata = stdata; - - /* .. and done! */ -} - /* * storeDetachReply() - detach a reply from a MemObject @@ -1267,6 +1205,7 @@ e->stclientcopy = NULL; e->strelease = NULL; e->stdone = NULL; + e->stmakeprivate = NULL; + e->stmakepublic = NULL; e->stdata = NULL; - } Index: squid/src/store_client.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store_client.c,v retrieving revision 1.2.2.8 retrieving revision 1.2.2.9 diff -u -r1.2.2.8 -r1.2.2.9 --- squid/src/store_client.c 20 Dec 2000 12:41:22 -0000 1.2.2.8 +++ squid/src/store_client.c 27 Dec 2000 11:04:06 -0000 1.2.2.9 @@ -1,6 +1,6 @@ /* - * $Id: store_client.c,v 1.2.2.8 2000/12/20 12:41:22 adri Exp $ + * $Id: store_client.c,v 1.2.2.9 2000/12/27 11:04:06 adri Exp $ * * DEBUG: section 20 Storage Manager Client-Side Interface * AUTHOR: Duane Wessels @@ -109,7 +109,7 @@ assert(!EBIT_TEST(e->flags, ENTRY_ABORTED)); assert(sc->valid == 1); - debug(20, 3) ("storeClientCopy: %s, seen %d, want %d, size %d, cb %p, cbdata %p\n", storeKeyText(e->hash.key), + debug(20, 3) ("storeClientCopy: %s, seen %d, want %d, size %d, cb %p, cbdata %p\n", storeKeyUrl(e), (int) seen_offset, (int) copy_offset, (int) size, @@ -297,7 +297,7 @@ store_client *sc = &e->sc; MemObject *mem = e->mem_obj; - debug(20, 3) ("storeUnregister: called for '%s'\n", storeKeyText(e->hash.key)); + debug(20, 3) ("storeUnregister: called for '%s'\n", storeKeyUrl(e)); if (sc == NULL) return 0; @@ -337,7 +337,7 @@ InvokeHandlers(StoreEntry * e) { assert(e->mem_obj != NULL); - debug(20, 3) ("InvokeHandlers: %s\n", storeKeyText(e->hash.key)); + debug(20, 3) ("InvokeHandlers: %s\n", storeKeyUrl(e)); e->stflush(e); } Index: squid/src/store_dir.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store_dir.c,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -u -r1.2.2.1 -r1.2.2.2 --- squid/src/store_dir.c 9 Nov 2000 15:25:07 -0000 1.2.2.1 +++ squid/src/store_dir.c 27 Dec 2000 11:04:06 -0000 1.2.2.2 @@ -1,6 +1,6 @@ /* - * $Id: store_dir.c,v 1.2.2.1 2000/11/09 15:25:07 adri Exp $ + * $Id: store_dir.c,v 1.2.2.2 2000/12/27 11:04:06 adri Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -238,7 +238,7 @@ assert(op > SWAP_LOG_NOP && op < SWAP_LOG_MAX); debug(20, 3) ("storeDirSwapLog: %s %s %d %08X\n", swap_log_op_str[op], - storeKeyText(e->hash.key), + storeKeyUrl(e), e->swap_dirn, e->swap_filen); sd = &Config.cacheSwap.swapDirs[e->swap_dirn]; Index: squid/src/store_log.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store_log.c,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -u -r1.2.2.2 -r1.2.2.3 --- squid/src/store_log.c 13 Dec 2000 09:45:03 -0000 1.2.2.2 +++ squid/src/store_log.c 27 Dec 2000 11:04:06 -0000 1.2.2.3 @@ -1,6 +1,6 @@ /* - * $Id: store_log.c,v 1.2.2.2 2000/12/13 09:45:03 rbcollins Exp $ + * $Id: store_log.c,v 1.2.2.3 2000/12/27 11:04:06 adri Exp $ * * DEBUG: section 20 Storage Manager Logging Functions * AUTHOR: Duane Wessels @@ -73,7 +73,7 @@ storeLogTags[tag], e->swap_dirn, e->swap_filen, - storeKeyText(e->hash.key), + storeKeyUrl(e), reply->sline.status, (int) reply->date, (int) reply->last_modified, @@ -91,7 +91,7 @@ storeLogTags[tag], e->swap_dirn, e->swap_filen, - storeKeyText(e->hash.key)); + storeKeyUrl(e)); } } Index: squid/src/structs.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/structs.h,v retrieving revision 1.2.2.9 retrieving revision 1.2.2.10 diff -u -r1.2.2.9 -r1.2.2.10 --- squid/src/structs.h 20 Dec 2000 15:39:22 -0000 1.2.2.9 +++ squid/src/structs.h 27 Dec 2000 11:04:06 -0000 1.2.2.10 @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.2.2.9 2000/12/20 15:39:22 adri Exp $ + * $Id: structs.h,v 1.2.2.10 2000/12/27 11:04:06 adri Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -1305,6 +1305,7 @@ struct _StoreEntry { hash_link hash; /* must be first */ + dlink_node node; /* to track current objects .. */ MemObject *mem_obj; time_t timestamp; time_t lastref; @@ -1331,6 +1332,8 @@ STRMEMHI *stmemhi; STRMEMLO *stmemlo; STRCLIENTCOPY *stclientcopy; + STRPRIVATE *stmakeprivate; + STRPUBLIC *stmakepublic; STRDONE *stdone; STRRELEASE *strelease; void *stdata; Index: squid/src/typedefs.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/typedefs.h,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/typedefs.h 20 Dec 2000 15:39:22 -0000 1.2.2.4 +++ squid/src/typedefs.h 27 Dec 2000 11:04:06 -0000 1.2.2.5 @@ -1,6 +1,6 @@ /* - * $Id: typedefs.h,v 1.2.2.4 2000/12/20 15:39:22 adri Exp $ + * $Id: typedefs.h,v 1.2.2.5 2000/12/27 11:04:06 adri Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -278,6 +278,8 @@ typedef void STRCLIENTCOPY(StoreEntry *); typedef void STRRELEASE(StoreEntry *); typedef void STRDONE(StoreEntry *); +typedef void STRPUBLIC(StoreEntry *); +typedef void STRPRIVATE(StoreEntry *); typedef double hbase_f(double); typedef void StatHistBinDumper(StoreEntry *, int idx, double val, double size, int count);