--------------------- PatchSet 5533 Date: 2002/12/02 08:11:20 Author: ymc Branch: dsa Tag: (none) Log: now it passed all basic DSA tests Members: src/client_side.c:1.5.2.9.2.3->1.5.2.9.2.4 src/protos.h:1.4.4.9.2.3->1.4.4.9.2.4 src/store.c:1.4.4.5.6.5->1.4.4.5.6.6 src/store_client.c:1.4.4.1.8.2->1.4.4.1.8.3 src/store_swapout.c:1.4.4.2.4.6->1.4.4.2.4.7 src/fs/ufs/store_dir_ufs.c:1.4.2.9.4.2->1.4.2.9.4.3 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.5.2.9.2.3 retrieving revision 1.5.2.9.2.4 diff -u -r1.5.2.9.2.3 -r1.5.2.9.2.4 --- squid/src/client_side.c 1 Dec 2002 23:11:26 -0000 1.5.2.9.2.3 +++ squid/src/client_side.c 2 Dec 2002 08:11:20 -0000 1.5.2.9.2.4 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.5.2.9.2.3 2002/12/01 23:11:26 ymc Exp $ + * $Id: client_side.c,v 1.5.2.9.2.4 2002/12/02 08:11:20 ymc Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -615,7 +615,7 @@ http->log_type = LOG_TCP_REFRESH_HIT; } else - storeRemoveInstanceEntry(http->old_entry->p, http->old_entry); + storeRemoveInstanceEntry(http->old_entry->p, http->old_entry); storeUnregister(http->old_sc, http->old_entry->p, http); storeUnlockObject(http->old_entry->p); #else Index: squid/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/protos.h,v retrieving revision 1.4.4.9.2.3 retrieving revision 1.4.4.9.2.4 diff -u -r1.4.4.9.2.3 -r1.4.4.9.2.4 --- squid/src/protos.h 1 Dec 2002 23:11:29 -0000 1.4.4.9.2.3 +++ squid/src/protos.h 2 Dec 2002 08:11:20 -0000 1.4.4.9.2.4 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.4.4.9.2.3 2002/12/01 23:11:29 ymc Exp $ + * $Id: protos.h,v 1.4.4.9.2.4 2002/12/02 08:11:20 ymc Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -850,13 +850,12 @@ extern tlv * instanceSwapMetaBuild(InstanceEntry *); extern StoreEntry *storeCreateEntry(); extern void storeSetPublicKey(InstanceEntry *); -extern void storeAbort(InstanceEntry *); #else extern StoreEntry *new_StoreEntry(int, const char *, const char *); extern StoreEntry *storeCreateEntry(const char *, const char *, request_flags, method_t); extern void storeSetPublicKey(StoreEntry *); -extern void storeAbort(StoreEntry *); #endif +extern void storeAbort(StoreEntry *); extern void storeComplete(StoreEntry *); extern void storeInit(void); extern int storeClientWaiting(const StoreEntry *); Index: squid/src/store.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store.c,v retrieving revision 1.4.4.5.6.5 retrieving revision 1.4.4.5.6.6 diff -u -r1.4.4.5.6.5 -r1.4.4.5.6.6 --- squid/src/store.c 2 Dec 2002 00:22:58 -0000 1.4.4.5.6.5 +++ squid/src/store.c 2 Dec 2002 08:11:21 -0000 1.4.4.5.6.6 @@ -1,6 +1,6 @@ /* - * $Id: store.c,v 1.4.4.5.6.5 2002/12/02 00:22:58 ymc Exp $ + * $Id: store.c,v 1.4.4.5.6.6 2002/12/02 08:11:21 ymc Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -724,8 +724,8 @@ { char metadata_path[SQUID_MAXPATHLEN]; cache_key key[MD5_DIGEST_CHARS]; - if (!EBIT_TEST(e->flags, ENTRY_CACHABLE)) - return; +// if (!EBIT_TEST(e->flags, ENTRY_CACHABLE)) +// return; arrayDelete(p->instances, e); /* remove corresponding metadata file in disk */ xmemcpy(key, p->hash.key, MD5_DIGEST_CHARS); @@ -1059,36 +1059,22 @@ * entry for releasing */ void -#ifdef DSA -storeAbort(InstanceEntry * e) -{ - MemObject *mem = e->p->mem_obj; - assert(e->p->store_status == STORE_PENDING); -#else storeAbort(StoreEntry * e) { MemObject *mem = e->mem_obj; assert(e->store_status == STORE_PENDING); -#endif assert(mem != NULL); debug(20, 6) ("storeAbort: %s\n", storeKeyText(e->hash.key)); + storeLockObject(e); #ifdef DSA - storeLockObject(e->p); /* lock while aborting */ - storeNegativeCache(e); - instanceReleaseRequest(e); + storeNegativeCache(e->mem_obj->e); #else - storeLockObject(e); storeNegativeCache(e); - storeReleaseRequest(e); #endif + storeReleaseRequest(e); EBIT_SET(e->flags, ENTRY_ABORTED); -#ifdef DSA - storeSetMemStatus(e->p, NOT_IN_MEMORY); - e->p->store_status = STORE_OK; -#else storeSetMemStatus(e, NOT_IN_MEMORY); e->store_status = STORE_OK; -#endif /* * We assign an object length here. The only other place we assign * the object length is in storeComplete() @@ -1105,17 +1091,10 @@ mem->abort.data = NULL; } /* Notify the client side */ -#ifdef DSA - InvokeHandlers(e->p); - /* Close any swapout file */ - storeSwapOutFileClose(e->p); - storeUnlockObject(e->p); /* unlock */ -#else InvokeHandlers(e); /* Close any swapout file */ storeSwapOutFileClose(e); storeUnlockObject(e); /* unlock */ -#endif } /* Clear Memory storage to accommodate the given object len */ Index: squid/src/store_client.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store_client.c,v retrieving revision 1.4.4.1.8.2 retrieving revision 1.4.4.1.8.3 diff -u -r1.4.4.1.8.2 -r1.4.4.1.8.3 --- squid/src/store_client.c 1 Dec 2002 23:11:30 -0000 1.4.4.1.8.2 +++ squid/src/store_client.c 2 Dec 2002 08:11:21 -0000 1.4.4.1.8.3 @@ -1,6 +1,6 @@ /* - * $Id: store_client.c,v 1.4.4.1.8.2 2002/12/01 23:11:30 ymc Exp $ + * $Id: store_client.c,v 1.4.4.1.8.3 2002/12/02 08:11:21 ymc Exp $ * * DEBUG: section 20 Storage Manager Client-Side Interface * AUTHOR: Duane Wessels @@ -662,9 +662,5 @@ if (CheckQuickAbort2(entry) == 0) return; statCounter.aborted_requests++; -#ifdef DSA - storeAbort(entry->mem_obj->e); -#else storeAbort(entry); -#endif } Index: squid/src/store_swapout.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store_swapout.c,v retrieving revision 1.4.4.2.4.6 retrieving revision 1.4.4.2.4.7 diff -u -r1.4.4.2.4.6 -r1.4.4.2.4.7 --- squid/src/store_swapout.c 2 Dec 2002 00:22:58 -0000 1.4.4.2.4.6 +++ squid/src/store_swapout.c 2 Dec 2002 08:11:22 -0000 1.4.4.2.4.7 @@ -1,6 +1,6 @@ /* - * $Id: store_swapout.c,v 1.4.4.2.4.6 2002/12/02 00:22:58 ymc Exp $ + * $Id: store_swapout.c,v 1.4.4.2.4.7 2002/12/02 08:11:22 ymc Exp $ * * DEBUG: section 20 Storage Manager Swapout Functions * AUTHOR: Duane Wessels @@ -347,7 +347,7 @@ // storeSetMemStatus(e, NOT_IN_MEMORY); // e->mem_obj = NULL; // } - storeRemoveInstanceEntry(e, entry); +// storeRemoveInstanceEntry(e, entry); EBIT_SET(e->flags, KEY_PRIVATE); // set to KEY_PRIVATE, // so no SWAP_LOG_DEL storeReleaseRequest(e); Index: squid/src/fs/ufs/store_dir_ufs.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/ufs/store_dir_ufs.c,v retrieving revision 1.4.2.9.4.2 retrieving revision 1.4.2.9.4.3 diff -u -r1.4.2.9.4.2 -r1.4.2.9.4.3 --- squid/src/fs/ufs/store_dir_ufs.c 1 Dec 2002 23:11:34 -0000 1.4.2.9.4.2 +++ squid/src/fs/ufs/store_dir_ufs.c 2 Dec 2002 08:11:22 -0000 1.4.2.9.4.3 @@ -901,7 +901,7 @@ EBIT_CLR(e->flags, ENTRY_VALIDATED); storeUfsDirMapBitSet(SD, e->swap_filen); #ifdef DSA - e->instances = arrayCreate(); + e->instances = instances; e->hash.key = storeKeyDup(key); storeHashInsert(e); /* do it after we clear KEY_PRIVATE */ #else