From: Alex Rousskov Date: Thu, 15 Aug 2013 22:09:07 +0000 (-0600) Subject: Merged from trunk r12948. X-Git-Tag: SQUID_3_5_0_1~444^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f90fd4aa8b3e2e06018d15de0da5eeb3e8ba2fb;p=thirdparty%2Fsquid.git Merged from trunk r12948. --- 1f90fd4aa8b3e2e06018d15de0da5eeb3e8ba2fb diff --cc src/Makefile.am index fae409a8d5,7be4f7aae3..92f5fb3db3 --- a/src/Makefile.am +++ b/src/Makefile.am @@@ -3266,9 -3289,10 +3298,11 @@@ tests_testRock_SOURCES = HttpRequestMethod.cc \ int.h \ int.cc \ ++ $(SBUF_SOURCE) \ SquidList.h \ SquidList.cc \ - $(SBUF_SOURCE) \ + MasterXaction.cc \ + MasterXaction.h \ Mem.h \ mem.cc \ MemBuf.cc \ diff --cc src/cf.data.pre index 14b60aa740,23cbc881c9..67c17e5b39 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@@ -3291,13 -3390,17 +3384,15 @@@ DOC_STAR higher hit ratio at the expense of an increase in response time. - The rock store type: + ==== The rock store type ==== + + Usage: - cache_dir rock Directory-Name Mbytes [options] + cache_dir rock Directory-Name Mbytes [options] The Rock Store type is a database-style storage. All cached - entries are stored in a "database" file, using fixed-size slots, - one entry per slot. The database size is specified in MB. The - slot size is specified in bytes using the max-size option. See - below for more info on the max-size option. + entries are stored in a "database" file, using fixed-size slots. + A single entry occupies one or more slots. If possible, Squid using Rock Store creates a dedicated kid process called "disker" to avoid blocking Squid worker(s) on disk @@@ -3328,18 -3431,8 +3423,18 @@@ and when set to zero, disables the disk I/O rate limit enforcement. Currently supported by IpcIo module only. + slot-size=bytes: The size of a database "record" used for + storing cached responses. A cached response occupies at least + one slot and all database I/O is done using individual slots so + increasing this parameter leads to more disk space waste while + decreasing it leads to more disk I/O overheads. Should be a + multiple of your operating system I/O page size. Defaults to + 16KBytes. A housekeeping header is stored with each slot and + smaller slot-sizes will be rejected. The header is smaller than + 100 bytes. + - The coss store type: + ==== The coss store type ==== NP: COSS filesystem in Squid-3 has been deemed too unstable for production use and has thus been removed from this release. diff --cc src/dns_internal.cc index 39a13d1827,6a4e5b0b99..d6c9fd6940 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@@ -37,6 -37,6 +37,7 @@@ #include "comm.h" #include "comm/Loops.h" #include "comm/Write.h" ++#include "dlink.h" #include "event.h" #include "fd.h" #include "fde.h" diff --cc src/ipcache.cc index fa1b53aaa4,d12c45262a..0bed6b2821 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@@ -33,6 -33,6 +33,7 @@@ #include "squid.h" #include "cbdata.h" #include "CacheManager.h" ++#include "dlink.h" #include "DnsLookupDetails.h" #include "event.h" #include "ip/Address.h" diff --cc src/peer_select.cc index 258960edab,7746de51e3..324c99ec4f --- a/src/peer_select.cc +++ b/src/peer_select.cc @@@ -89,34 -88,31 +88,31 @@@ static void peerSelectDnsResults(const CBDATA_CLASS_INIT(ps_state); - static void - peerSelectStateFree(ps_state * psstate) + ps_state::~ps_state() { - if (psstate->entry) { - debugs(44, 3, HERE << psstate->entry->url()); + if (entry) { + debugs(44, 3, entry->url()); - if (psstate->entry->ping_status == PING_WAITING) - eventDelete(peerPingTimeout, psstate); + if (entry->ping_status == PING_WAITING) + eventDelete(peerPingTimeout, this); - psstate->entry->ping_status = PING_DONE; + entry->ping_status = PING_DONE; } - if (psstate->acl_checklist) { - debugs(44, DBG_IMPORTANT, "calling aclChecklistFree() from peerSelectStateFree"); - delete (psstate->acl_checklist); + if (acl_checklist) { + debugs(44, DBG_IMPORTANT, "calling aclChecklistFree() from ps_state destructor"); + delete acl_checklist; } - HTTPMSGUNLOCK(psstate->request); + HTTPMSGUNLOCK(request); - if (psstate->entry) { - assert(psstate->entry->ping_status != PING_WAITING); - psstate->entry->unlock("peerSelect"); - psstate->entry = NULL; + if (entry) { + assert(entry->ping_status != PING_WAITING); - entry->unlock(); ++ entry->unlock("peerSelect"); + entry = NULL; } - delete psstate->lastError; - - cbdataFree(psstate); + delete lastError; } static int diff --cc src/store_rebuild.cc index 6f9a034bdc,c9cec3747f..54097d779e --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@@ -344,7 -340,7 +344,7 @@@ storeRebuildParseEntry(MemBuf &buf, Sto // TODO: consume parsed metadata? -- debugs(47,7, HERE << "successful swap meta unpacking"); ++ debugs(47,7, HERE << "successful swap meta unpacking; swap_file_sz=" << tmpe.swap_file_sz); memset(key, '\0', SQUID_MD5_DIGEST_LENGTH); InitStoreEntry visitor(&tmpe, key); diff --cc src/urn.cc index a446545473,59e61d4a52..d888770b51 --- a/src/urn.cc +++ b/src/urn.cc @@@ -240,9 -224,8 +224,8 @@@ UrnState::start(HttpRequest * r, StoreE debugs(52, 3, "urnStart: '" << e->url() << "'" ); entry = e; request = r; - HTTPMSGLOCK(request); - entry->lock(); + entry->lock("UrnState::start"); setUriResFromRequest(r); if (urlres_r == NULL) @@@ -259,10 -242,9 +242,9 @@@ UrnState::created(StoreEntry *newEntry if (urlres_e->isNull()) { urlres_e = storeCreateEntry(urlres, urlres, RequestFlags(), Http::METHOD_GET); sc = storeClientListAdd(urlres_e, this); - FwdState::fwdStart(Comm::ConnectionPointer(), urlres_e, urlres_r); + FwdState::fwdStart(Comm::ConnectionPointer(), urlres_e, urlres_r.getRaw()); } else { - - urlres_e->lock(); + urlres_e->lock("UrnState::created"); sc = storeClientListAdd(urlres_e, this); } @@@ -303,10 -285,8 +285,8 @@@ url_entry_sort(const void *A, const voi static void urnHandleReplyError(UrnState *urnState, StoreEntry *urlres_e) { - urlres_e->unlock(); - urnState->entry->unlock(); + urlres_e->unlock("urnHandleReplyError+res"); + urnState->entry->unlock("urnHandleReplyError+prime"); - HTTPMSGUNLOCK(urnState->request); - HTTPMSGUNLOCK(urnState->urlres_r); delete urnState; }