--------------------- PatchSet 10043 Date: 2007/09/29 10:38:26 Author: adri Branch: store_copy Tag: (none) Log: Use SM_PAGE_SIZE when using storeClientRef() stuff - the pages are using this size atm. Members: src/client_side.c:1.202.2.5->1.202.2.6 src/urn.c:1.24.6.1->1.24.6.2 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.202.2.5 retrieving revision 1.202.2.6 diff -u -r1.202.2.5 -r1.202.2.6 --- squid/src/client_side.c 27 Sep 2007 15:09:16 -0000 1.202.2.5 +++ squid/src/client_side.c 29 Sep 2007 10:38:27 -0000 1.202.2.6 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.202.2.5 2007/09/27 15:09:16 adri Exp $ + * $Id: client_side.c,v 1.202.2.6 2007/09/29 10:38:27 adri Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -399,7 +399,7 @@ if (h->log_type != LOG_TCP_DENIED) delaySetStoreClient(h->sc, delayClient(h)); #endif - storeClientRef(h->sc, e, 0, 0, STORE_CLIENT_BUF_SZ, clientSendMoreHeaderData, h); + storeClientRef(h->sc, e, 0, 0, SM_PAGE_SIZE, clientSendMoreHeaderData, h); return e; } @@ -718,7 +718,7 @@ } if (STORE_PENDING == entry->store_status && 0 == status) { debug(33, 3) ("clientHandleETagReply: Incomplete headers for '%s'\n", url); - if (size >= STORE_CLIENT_BUF_SZ) { + if (size >= SM_PAGE_SIZE) { /* will not get any bigger than that */ debug(33, 3) ("clientHandleETagReply: Reply is too large '%s'\n", url); stmemNodeUnref(&ref); @@ -728,7 +728,7 @@ storeClientRef(http->sc, entry, http->out.offset + size, http->out.offset, - STORE_CLIENT_BUF_SZ, + SM_PAGE_SIZE, clientHandleETagReply, http); } @@ -781,7 +781,7 @@ storeClientRef(http->sc, entry, http->out.offset, http->out.offset, - STORE_CLIENT_BUF_SZ, + SM_PAGE_SIZE, clientHandleETagReply, http); } @@ -865,7 +865,7 @@ storeClientRef(http->sc, entry, http->out.offset, http->out.offset, - STORE_CLIENT_BUF_SZ, + SM_PAGE_SIZE, clientHandleIMSReply, http); } @@ -965,7 +965,7 @@ http->sc = http->old_sc; } else if (STORE_PENDING == entry->store_status && 0 == status) { debug(33, 3) ("clientHandleIMSReply: Incomplete headers for '%s'\n", url); - if (size >= STORE_CLIENT_BUF_SZ) { + if (size >= SM_PAGE_SIZE) { /* will not get any bigger than that */ debug(33, 3) ("clientHandleIMSReply: Reply is too large '%s', using old entry\n", url); /* use old entry, this repeats the code abovez */ @@ -980,7 +980,7 @@ storeClientRef(http->sc, entry, http->out.offset + size, http->out.offset, - STORE_CLIENT_BUF_SZ, + SM_PAGE_SIZE, clientHandleIMSReply, http); return; @@ -1036,7 +1036,7 @@ storeClientRef(http->sc, entry, http->out.offset, http->out.offset, - STORE_CLIENT_BUF_SZ, + SM_PAGE_SIZE, clientSendMoreHeaderData, http); } else { @@ -1119,7 +1119,7 @@ storeClientRef(http->sc, http->entry, http->out.offset, http->out.offset, - STORE_CLIENT_BUF_SZ, + SM_PAGE_SIZE, clientCacheHit, http); return; @@ -2621,7 +2621,7 @@ int fd = conn->fd; HttpReply *rep = NULL; debug(33, 5) ("clientSendMoreHeaderData: %s, %d bytes\n", http->uri, (int) size); - assert(size <= STORE_CLIENT_BUF_SZ); + assert(size <= SM_PAGE_SIZE); assert(http->request != NULL); dlinkDelete(&http->active, &ClientActiveRequests); dlinkAdd(http, &http->active, &ClientActiveRequests); @@ -2891,7 +2891,7 @@ storeClientRef(http->sc, http->entry, http->out.offset, http->out.offset, - STORE_CLIENT_BUF_SZ, + SM_PAGE_SIZE, clientSendMoreData, http); } @@ -2912,8 +2912,8 @@ int fd = conn->fd; MemBuf mb; debug(33, 5) ("clientSendMoreData: %s, %d bytes\n", http->uri, (int) size); - assert(size + ref.offset <= STORE_CLIENT_BUF_SZ); - assert(size <= STORE_CLIENT_BUF_SZ); + assert(size + ref.offset <= SM_PAGE_SIZE); + assert(size <= SM_PAGE_SIZE); assert(http->request != NULL); dlinkDelete(&http->active, &ClientActiveRequests); dlinkAdd(http, &http->active, &ClientActiveRequests); @@ -3050,7 +3050,7 @@ storeClientRef(http->sc, entry, http->out.offset, http->out.offset, - STORE_CLIENT_BUF_SZ, + SM_PAGE_SIZE, clientSendMoreHeaderData, http); } @@ -3135,7 +3135,7 @@ storeClientRef(http->sc, entry, http->out.offset, http->out.offset, - STORE_CLIENT_BUF_SZ, + SM_PAGE_SIZE, clientSendMoreData, http); } @@ -3360,7 +3360,7 @@ storeClientRef(http->sc, http->entry, http->out.offset, http->out.offset, - STORE_CLIENT_BUF_SZ, + SM_PAGE_SIZE, clientCacheHit, http); } else { Index: squid/src/urn.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/urn.c,v retrieving revision 1.24.6.1 retrieving revision 1.24.6.2 diff -u -r1.24.6.1 -r1.24.6.2 --- squid/src/urn.c 29 Sep 2007 10:33:31 -0000 1.24.6.1 +++ squid/src/urn.c 29 Sep 2007 10:38:26 -0000 1.24.6.2 @@ -1,6 +1,6 @@ /* - * $Id: urn.c,v 1.24.6.1 2007/09/29 10:33:31 adri Exp $ + * $Id: urn.c,v 1.24.6.2 2007/09/29 10:38:26 adri Exp $ * * DEBUG: section 52 URN Parsing * AUTHOR: Kostas Anagnostakis @@ -149,7 +149,7 @@ storeClientRef(urnState->sc, urlres_e, 0, 0, - STORE_CLIENT_BUF_SZ, + SM_PAGE_SIZE, urnHandleReply, urnState); } @@ -200,12 +200,12 @@ return; } buf = nr.node->data + nr.offset; - if (urlres_e->store_status == STORE_PENDING && size < STORE_CLIENT_BUF_SZ) { + if (urlres_e->store_status == STORE_PENDING && size < SM_PAGE_SIZE) { stmemNodeUnref(&nr); storeClientRef(urnState->sc, urlres_e, size, 0, - STORE_CLIENT_BUF_SZ, + SM_PAGE_SIZE, urnHandleReply, urnState); return;