#include "squid.h"
#include "base/AsyncCbdataCalls.h"
#include "base/PackableStream.h"
#include "base/TextException.h"
#include "CacheDigest.h"
#include "CacheManager.h"
#include "CollapsedForwarding.h"
#include "comm/Connection.h"
#include "comm/Read.h"
#include "ETag.h"
#include "event.h"
#include "fde.h"
#include "globals.h"
#include "http.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "mem_node.h"
#include "MemObject.h"
#include "MemStore.h"
#include "mgr/Registration.h"
#include "mgr/StoreIoAction.h"
#include "profiler/Profiler.h"
#include "repl_modules.h"
#include "RequestFlags.h"
#include "SquidConfig.h"
#include "SquidTime.h"
#include "StatCounters.h"
#include "stmem.h"
#include "Store.h"
#include "store/Controller.h"
#include "store/Disk.h"
#include "store/Disks.h"
#include "store_digest.h"
#include "store_key_md5.h"
#include "store_log.h"
#include "store_rebuild.h"
#include "StoreClient.h"
#include "StoreIOState.h"
#include "StoreMeta.h"
#include "StrList.h"
#include "swap_log_op.h"
#include "tools.h"
#include "DelayPools.h"
#include "mem/Pool.h"
#include <climits>
#include <stack>
#include "comm.h"

Go to the source code of this file.
Classes | |
struct | _storerepl_entry |
struct | _store_check_cachable_hist |
Macros | |
#define | REBUILD_TIMESTAMP_DELTA_MAX 2 |
#define | STORE_IN_MEM_BUCKETS (229) |
#define | MAINTAIN_MAX_SCAN 1024 |
#define | MAINTAIN_MAX_REMOVE 64 |
Typedefs | |
typedef struct _storerepl_entry | storerepl_entry_t |
Variables | |
const char * | memStatusStr [] |
const char * | pingStatusStr [] |
const char * | storeStatusStr [] |
const char * | swapStatusStr [] |
static storerepl_entry_t * | storerepl_list = NULL |
static OBJH | storeCheckCachableStats |
static EVH | storeLateRelease |
static std::stack< StoreEntry * > | LateReleaseStack |
struct _store_check_cachable_hist | store_check_cachable_hist |
Macro Definition Documentation
◆ MAINTAIN_MAX_REMOVE
◆ MAINTAIN_MAX_SCAN
◆ REBUILD_TIMESTAMP_DELTA_MAX
#define REBUILD_TIMESTAMP_DELTA_MAX 2 |
StoreEntry uses explicit new/delete operators, which set pool chunk size to 2MB XXX: convert to MEMPROXY_CLASS() API
◆ STORE_IN_MEM_BUCKETS
Typedef Documentation
◆ storerepl_entry_t
typedef struct _storerepl_entry storerepl_entry_t |
Function Documentation
◆ createRemovalPolicy()
RemovalPolicy* createRemovalPolicy | ( | RemovalPolicySettings * | settings | ) |
Definition at line 1706 of file store.cc.
References RemovalPolicySettings::args, _storerepl_entry::create, DBG_IMPORTANT, debugs, fatalf(), NULL, storerepl_list, RemovalPolicySettings::type, and _storerepl_entry::typestr.
Referenced by testRock::commonInit(), Fs::Ufs::UFSSwapDir::parse(), storeInit(), testUfs::testUfsDefaultEngine(), and testUfs::testUfsSearch().
◆ destroyStoreEntry()
void destroyStoreEntry | ( | void * | data | ) |
Definition at line 416 of file store.cc.
References assert, data, debugs, StoreEntry::destroyMemObject(), Store::Disk::disconnect(), StoreEntry::disk(), StoreEntry::hasDisk(), StoreEntry::hashDelete(), HERE(), NULL, and shutting_down.
Referenced by StoreEntry::release().
◆ expiresMoreThan()
int expiresMoreThan | ( | time_t | expires, |
time_t | when | ||
) |
Definition at line 1379 of file store.cc.
References squid_curtime.
◆ getKeyCounter()
|
static |
Definition at line 545 of file store.cc.
Referenced by StoreEntry::setPrivateKey().
◆ operator<<() [1/2]
|
static |
Definition at line 2061 of file store.cc.
References Store::ioDone, Store::ioReading, Store::ioUndecided, and Store::ioWriting.
◆ operator<<() [2/2]
std::ostream& operator<< | ( | std::ostream & | os, |
const StoreEntry & | e | ||
) |
Definition at line 2081 of file store.cc.
References DELAY_SENDING, EBIT_TEST, ENTRY_ABORTED, ENTRY_BAD_LENGTH, ENTRY_FWD_HDR_WAIT, ENTRY_NEGCACHED, ENTRY_REQUIRES_COLLAPSING, ENTRY_REVALIDATE_ALWAYS, ENTRY_REVALIDATE_STALE, ENTRY_SPECIAL, ENTRY_VALIDATED, StoreEntry::flags, StoreEntry::hasMemStore(), StoreEntry::hasTransients(), MemObject::XitTable::io, MemObject::MemCache::io, KEY_PRIVATE, StoreEntry::locks(), StoreEntry::mem_obj, StoreEntry::mem_status, MemObject::memCache, NOT_IN_MEMORY, PING_NONE, StoreEntry::ping_status, REFRESH_REQUEST, RELEASE_REQUEST, StoreEntry::shareableWhenPrivate, STORE_PENDING, StoreEntry::store_status, StoreEntry::swap_dirn, StoreEntry::swap_filen, StoreEntry::swap_status, SWAPOUT_NONE, and MemObject::xitTable.
◆ StatQueues()
|
static |
Definition at line 132 of file store.cc.
References assert, CollapsedForwarding::StatQueue(), and IpcIoFile::StatQueue().
Referenced by storeRegisterWithCacheManager().
◆ storeAppendPrintf()
void storeAppendPrintf | ( | StoreEntry * | e, |
const char * | fmt, | ||
... | |||
) |
Definition at line 880 of file store.cc.
Referenced by DiskThreadsIOStrategy::aioStats(), asnStats(), cacheDigestGuessStatsReport(), cacheDigestReport(), carpCachemgr(), cbdataDump(), clientdbDump(), commIncomingStats(), Auth::User::CredentialsCacheStats(), Store::Disks::Dump(), Fs::Ufs::UFSSwapDir::dump(), Ipc::ReadWriteLockStats::dump(), EventScheduler::dump(), DelaySpec::dump(), Auth::SchemeConfig::dump(), DelayPool::dump(), DiskdAction::dump(), Mgr::MenuAction::dump(), Mgr::ReconfigureAction::dump(), Mgr::RotateAction::dump(), Mgr::OfflineToggleAction::dump(), Mgr::FunAction::dump(), Mgr::InfoAction::dump(), Mgr::StoreIoAction::dump(), MessageDelayPool::dump(), Format::Format::dump(), Note::dump(), ClientDelayPool::dump(), dump_access_log(), dump_acl(), dump_acl_address(), dump_acl_b_size_t(), dump_acl_tos(), dump_address(), dump_b_int64_t(), dump_b_size_t(), dump_b_ssize_t(), dump_cachemgrpasswd(), dump_CpuAffinityMap(), dump_denyinfo(), dump_externalAclHelper(), dump_generic_port(), dump_HeaderWithAclList(), dump_icap_service_failure_limit(), dump_int(), dump_int64_t(), dump_IpAddress_list(), dump_kb_int64_t(), dump_memcachemode(), dump_onoff(), dump_peer(), dump_peer_options(), dump_peers(), dump_PortCfg(), dump_refreshpattern(), dump_removalpolicy(), dump_sslproxy_cert_adapt(), dump_sslproxy_cert_sign(), dump_string(), dump_time_msec(), dump_time_nanoseconds(), dump_time_t(), dump_tristate(), dump_u_short(), dump_uri_whitespace(), dump_UrlHelperTimeout(), dump_wccp2_amethod(), dump_wccp2_method(), dump_wccp2_service(), dump_wccp2_service_info(), dump_wordlist(), DumpAvgStat(), DumpCountersStats(), PconnPool::dumpHash(), PconnPool::dumpHist(), DumpInfo(), DumpIoStats(), DumpMallocStatistics(), ClientDelayConfig::dumpPoolCount(), DelayConfig::dumpPoolCount(), Rock::SwapDir::dumpRateOption(), Adaptation::Config::dumpService(), Adaptation::Config::DumpServiceGroups(), DumpServiceTimesStats(), Rock::SwapDir::dumpSizeOption(), fde::dumpStats(), fde::DumpStats(), Rock::SwapDir::dumpTimeOption(), externalAclStats(), fqdnStats(), fwdStats(), gopherEndHTML(), gopherHTMLFooter(), gopherHTMLHeader(), gopherToHTML(), header_mangler_dump_access(), header_mangler_dump_replacement(), httpHdrCcStatDumper(), httpHdrScStatDumper(), httpHdrScTargetStatDumper(), httpHeaderFieldStatDumper(), httpHeaderFldsPerHdrDumper(), httpHeaderStatDump(), httpHeaderStoreReport(), idnsStats(), ipcacheStatPrint(), lru_stats(), netdbBinaryExchange(), netdbDump(), Fs::Ufs::UFSSwapDir::optionIODump(), Store::Disk::optionObjectSizeDump(), DiskdIOStrategy::optionQ1Dump(), DiskdIOStrategy::optionQ2Dump(), Store::Disk::optionReadOnlyDump(), peerDigestStatsReport(), peerSourceHashCachemgr(), peerUserHashCachemgr(), printRadixNode(), redirectStats(), refreshCountsStats(), refreshCountsStatsEntry(), refreshStats(), squidaio_stats(), Store::Controller::stat(), Store::Disk::stat(), Store::Disks::stat(), MemStore::stat(), Transients::stat(), stat_ipcache_get(), statClientRequests(), statCountersHistograms(), statDigestBlob(), Fs::Ufs::UFSSwapDir::statfs(), Rock::SwapDir::statfs(), DiskdIOStrategy::statfs(), statHistBinDumper(), statHistEnumDumper(), statHistIntDumper(), statHistSBufDumper(), statObjects(), statPeerSelect(), DelayPools::Stats(), ClassCBucket::stats(), DelayBucket::stats(), DelayTaggedBucket::stats(), DelayUserBucket::stats(), Aggregate::stats(), VectorPool::stats(), ClassCHostPool::stats(), DelayTagged::stats(), DelayUser::stats(), DelaySpec::stats(), statUtilization(), storeCheckCachableStats(), storeDigestReport(), storeIdStats(), storeLogTagsHist(), xprof_show_item(), xprof_summary(), and xprof_summary_item().
◆ storeAppendVPrintf()
void storeAppendVPrintf | ( | StoreEntry * | e, |
const char * | fmt, | ||
va_list | vargs | ||
) |
◆ storeCheckCachableStats()
void storeCheckCachableStats | ( | StoreEntry * | sentry | ) |
Definition at line 1016 of file store.cc.
References _store_check_cachable_hist::Default, _store_check_cachable_hist::missing_parts, _store_check_cachable_hist::no, _store_check_cachable_hist::non_get, _store_check_cachable_hist::not_entry_cachable, _store_check_cachable_hist::private_key, store_check_cachable_hist, storeAppendPrintf(), _store_check_cachable_hist::too_big, _store_check_cachable_hist::too_many_open_fds, _store_check_cachable_hist::too_many_open_files, _store_check_cachable_hist::too_small, _store_check_cachable_hist::wrong_content_length, and _store_check_cachable_hist::yes.
◆ storeConfigure()
void storeConfigure | ( | void | ) |
Definition at line 1304 of file store.cc.
References Store::Controller::configure(), and Store::Root().
Referenced by configDoConfigure(), and storeSwapOutFileClosed().
◆ storeCreateEntry()
StoreEntry* storeCreateEntry | ( | const char * | , |
const char * | , | ||
const RequestFlags & | , | ||
const HttpRequestMethod & | |||
) |
Like storeCreatePureEntry(), but also locks the entry and sets entry key.
Definition at line 782 of file store.cc.
References RequestFlags::cachable, RequestFlags::hierarchical, StoreEntry::lock(), logUrl, method, neighbors_do_private_keys, StoreEntry::setPrivateKey(), StoreEntry::setPublicKey(), and storeCreatePureEntry().
Referenced by Ssl::ServerBump::ServerBump(), StoreEntry::adjustVary(), asnCacheStart(), testRock::createEntry(), Mgr::Action::createStoreEntry(), clientReplyContext::createStoreEntry(), ClientHttpRequest::doCallouts(), netdbExchangeStart(), peerCountMcastPeersCreateAndSend(), peerDigestRequest(), clientReplyContext::processExpired(), UrnState::start(), storeDigestRewriteStart(), and testUfs::testUfsSearch().
◆ storeCreatePureEntry()
StoreEntry* storeCreatePureEntry | ( | const char * | storeId, |
const char * | logUrl, | ||
const HttpRequestMethod & | |||
) |
Creates a new StoreEntry with mem_obj and sets initial flags/states.
Definition at line 764 of file store.cc.
References StoreEntry::createMemObject(), debugs, EBIT_SET, ENTRY_VALIDATED, StoreEntry::flags, StoreEntry::lastref, method, NULL, PING_NONE, StoreEntry::ping_status, StoreEntry::refcount, squid_curtime, STORE_PENDING, StoreEntry::store_status, and StoreEntry::timestamp.
Referenced by MimeIcon::load(), and storeCreateEntry().
◆ storeFreeMemory()
void storeFreeMemory | ( | void | ) |
Definition at line 1369 of file store.cc.
References Store::FreeMemory(), NULL, and store_digest.
Referenced by SquidShutdown().
◆ storeFsInit()
void storeFsInit | ( | void | ) |
◆ storeGetMemSpace()
void storeGetMemSpace | ( | int | size | ) |
Clear Memory storage to accommodate the given object len
Definition at line 1147 of file store.cc.
References Store::Controller::freeMemorySpace(), PROF_start, PROF_stop, Store::Root(), shutting_down, size, and storeGetMemSpace().
Referenced by store_client::readBody(), storeGetMemSpace(), and StoreEntry::write().
◆ storeGetPublic()
StoreEntry* storeGetPublic | ( | const char * | uri, |
const HttpRequestMethod & | method | ||
) |
Definition at line 521 of file store.cc.
Referenced by StoreEntry::adjustVary(), asnCacheStart(), findPreviouslyCachedEntry(), testRock::getEntry(), httpMaybeRemovePublic(), ICPState::isHit(), MimeIcon::load(), clientReplyContext::purgeDoPurge(), UrnState::start(), and urnParseReply().
◆ storeGetPublicByRequest()
StoreEntry* storeGetPublicByRequest | ( | HttpRequest * | req, |
const KeyScope | keyScope | ||
) |
Definition at line 533 of file store.cc.
References HttpRequest::method, Http::METHOD_GET, Http::METHOD_HEAD, NULL, and storeGetPublicByRequestMethod().
Referenced by htcpSpecifier::checkHit(), findPreviouslyCachedEntry(), htcpClrStore(), clientReplyContext::identifyStoreObject(), peerDigestRequest(), and clientReplyContext::processExpired().
◆ storeGetPublicByRequestMethod()
StoreEntry* storeGetPublicByRequestMethod | ( | HttpRequest * | req, |
const HttpRequestMethod & | method, | ||
const KeyScope | keyScope | ||
) |
Definition at line 527 of file store.cc.
References Store::Controller::find(), method, Store::Root(), and storeKeyPublicByRequestMethod().
Referenced by httpMaybeRemovePublic(), clientReplyContext::purgeDoPurge(), and storeGetPublicByRequest().
◆ storeInit()
void storeInit | ( | void | ) |
Definition at line 1290 of file store.cc.
References Config, createRemovalPolicy(), eventAdd(), Store::Controller::init(), mem_policy, SquidConfig::memPolicy, NULL, Store::Root(), storeDigestInit(), storeKeyInit(), storeLateRelease, storeLogOpen(), storeRebuildStart(), and storeRegisterWithCacheManager().
Referenced by mainInitialize().
◆ storeLateRelease()
|
static |
Definition at line 1206 of file store.cc.
References DBG_IMPORTANT, debugs, eventAdd(), LateReleaseStack, NULL, Store::Controller::store_dirs_rebuilding, storeLateRelease, and StoreEntry::unlock().
◆ storeRegisterWithCacheManager()
|
static |
Definition at line 1280 of file store.cc.
References Mgr::StoreIoAction::Create(), Mgr::RegisterAction(), StatQueues(), Store::Stats(), and storeCheckCachableStats.
Referenced by storeInit().
◆ storeReplAdd()
void storeReplAdd | ( | const char * | type, |
REMOVALPOLICYCREATE * | create | ||
) |
Definition at line 1680 of file store.cc.
References _storerepl_entry::create, DBG_IMPORTANT, debugs, storerepl_list, type, _storerepl_entry::typestr, and xrealloc().
Referenced by testRock::commonInit(), and testUfs::commonInit().
◆ storeTooManyDiskFilesOpen()
int storeTooManyDiskFilesOpen | ( | void | ) |
Definition at line 915 of file store.cc.
References Config, SquidConfig::max_open_disk_fds, and store_open_disk_fd.
Referenced by StoreEntry::checkCachable(), store_client::startSwapin(), and StoreEntry::swapOut().
Variable Documentation
◆ LateReleaseStack
|
static |
Definition at line 120 of file store.cc.
Referenced by StoreEntry::release(), and storeLateRelease().
◆ memStatusStr
const char* memStatusStr[] |
◆ pingStatusStr
const char* pingStatusStr[] |
◆ store_check_cachable_hist
struct _store_check_cachable_hist store_check_cachable_hist |
Referenced by StoreEntry::checkCachable(), and storeCheckCachableStats().
◆ storeCheckCachableStats
|
static |
Definition at line 114 of file store.cc.
Referenced by storeRegisterWithCacheManager().
◆ storeLateRelease
|
static |
Definition at line 115 of file store.cc.
Referenced by storeInit(), and storeLateRelease().
◆ storerepl_list
|
static |
Definition at line 108 of file store.cc.
Referenced by createRemovalPolicy(), and storeReplAdd().
◆ storeStatusStr
const char* storeStatusStr[] |
◆ swapStatusStr
const char* swapStatusStr[] |
Definition at line 90 of file store.cc.
Referenced by StoreEntry::attachToDisk().