Repository: trafficserver Updated Branches: refs/heads/master 61a05d5e8 -> 0899fc3e0
clang-format Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/0899fc3e Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/0899fc3e Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/0899fc3e Branch: refs/heads/master Commit: 0899fc3e0635b033cb52ae384cd126a3b4fff5f5 Parents: 61a05d5 Author: Bryan Call <[email protected]> Authored: Thu Sep 3 09:45:40 2015 -0700 Committer: Bryan Call <[email protected]> Committed: Thu Sep 3 09:45:40 2015 -0700 ---------------------------------------------------------------------- iocore/cache/Cache.cc | 13 ++++++++----- iocore/cache/I_Cache.h | 9 ++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0899fc3e/iocore/cache/Cache.cc ---------------------------------------------------------------------- diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc index 2400adc..2e57525 100644 --- a/iocore/cache/Cache.cc +++ b/iocore/cache/Cache.cc @@ -738,7 +738,8 @@ CacheProcessor::start_internal(int flags) if (gndisks == 0) { CacheProcessor::initialized = CACHE_INIT_FAILED; // Have to do this here because no IO events were scheduled and so @c diskInitialized() won't be called. - if (cb_after_init) cb_after_init(); + if (cb_after_init) + cb_after_init(); if (this->waitForCache() > 1) { Fatal("Cache initialization failed - no disks available but cache required"); @@ -748,8 +749,10 @@ CacheProcessor::start_internal(int flags) } } else if (this->waitForCache() == 3 && static_cast<unsigned int>(gndisks) < theCacheStore.n_disks_in_config) { CacheProcessor::initialized = CACHE_INIT_FAILED; - if (cb_after_init) cb_after_init(); - Fatal("Cache initialization failed - only %d out of %d disks were valid and all were required.", gndisks, theCacheStore.n_disks_in_config); + if (cb_after_init) + cb_after_init(); + Fatal("Cache initialization failed - only %d out of %d disks were valid and all were required.", gndisks, + theCacheStore.n_disks_in_config); } return 0; @@ -774,7 +777,8 @@ CacheProcessor::diskInitialized() // This could be passed off to @c cacheInitialized (as with volume config problems) but I think // the more specific error message here is worth the extra code. CacheProcessor::initialized = CACHE_INIT_FAILED; - if (cb_after_init) cb_after_init(); + if (cb_after_init) + cb_after_init(); Fatal("Cache initialization failed - only %d of %d disks were available.", gndisks, theCacheStore.n_disks_in_config); } @@ -1061,7 +1065,6 @@ CacheProcessor::cacheInitialized() Warning("cache unable to open any vols, disabled"); } if (cache_init_ok) { - // Initialize virtual cache CacheProcessor::initialized = CACHE_INITIALIZED; CacheProcessor::cache_ready = caches_ready; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0899fc3e/iocore/cache/I_Cache.h ---------------------------------------------------------------------- diff --git a/iocore/cache/I_Cache.h b/iocore/cache/I_Cache.h index d6c5cea..de06a44 100644 --- a/iocore/cache/I_Cache.h +++ b/iocore/cache/I_Cache.h @@ -65,8 +65,7 @@ typedef HTTPInfo CacheHTTPInfo; struct CacheProcessor : public Processor { CacheProcessor() : min_stripe_version(CACHE_DB_MAJOR_VERSION, CACHE_DB_MINOR_VERSION), - max_stripe_version(CACHE_DB_MAJOR_VERSION, CACHE_DB_MINOR_VERSION), cb_after_init(0), - wait_for_cache(0) + max_stripe_version(CACHE_DB_MAJOR_VERSION, CACHE_DB_MINOR_VERSION), cb_after_init(0), wait_for_cache(0) { } @@ -148,7 +147,11 @@ struct CacheProcessor : public Processor { void cacheInitialized(); - int waitForCache() const { return wait_for_cache; } + int + waitForCache() const + { + return wait_for_cache; + } static volatile uint32_t cache_ready; static volatile int initialized;
