A brief file description. More...
#include "P_Cache.h"
#include "I_Layout.h"
Go to the source code of this file.
Defines | |
#define | PAIR_ZERO 0 |
#define | PAIR_ONE 1 |
#define | PAIR_TWO 2 |
#define | DONE 3 |
#define | INK_ERROR -1 |
#define | INK_ERROR_VOLUME -2 |
#define | MEGS_128 (128 * 1024 * 1024) |
#define | ROUND_TO_VOL_SIZE(_x) (((_x) + (MEGS_128 - 1)) &~ (MEGS_128 - 1)) |
Functions | |
int | fstat_wrapper (int fd, struct stat *s) |
void | cplist_init () |
int | cplist_reconfigure () |
int | ClearConfigVol (ConfigVolumes *configp) |
int | ClearCacheVolList (Queue< CacheVol > *cpl, int len) |
int | create_config (RegressionTest *t, int i) |
int | execute_and_verify (RegressionTest *t) |
void | save_state () |
void | restore_state () |
EXCLUSIVE_REGRESSION_TEST() | Cache_vol (RegressionTest *t, int, int *status) |
Variables | |
int | gndisks |
matcher_tags | CacheHosting_tags |
CacheDisk ** | gdisks |
Queue< CacheVol > | cp_list |
int | cp_list_len |
ConfigVolumes | config_volumes |
volatile int | gnvol |
static int | configs = 4 |
Queue< CacheVol > | saved_cp_list |
int | saved_cp_list_len |
ConfigVolumes | saved_config_volumes |
int | saved_gnvol |
A brief file description.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file CacheHosting.cc.
#define DONE 3 |
Referenced by ConfigVolumes::BuildListFromString().
#define INK_ERROR -1 |
Referenced by ConfigVolumes::BuildListFromString().
#define INK_ERROR_VOLUME -2 |
Referenced by ConfigVolumes::BuildListFromString().
#define MEGS_128 (128 * 1024 * 1024) |
Definition at line 839 of file CacheHosting.cc.
#define PAIR_ONE 1 |
Referenced by ConfigVolumes::BuildListFromString().
#define PAIR_TWO 2 |
Referenced by ConfigVolumes::BuildListFromString().
#define PAIR_ZERO 0 |
Referenced by ConfigVolumes::BuildListFromString().
#define ROUND_TO_VOL_SIZE | ( | _x | ) | (((_x) + (MEGS_128 - 1)) &~ (MEGS_128 - 1)) |
Definition at line 840 of file CacheHosting.cc.
Referenced by create_config().
EXCLUSIVE_REGRESSION_TEST() Cache_vol | ( | RegressionTest * | t, | |
int | , | |||
int * | status | |||
) |
Definition at line 863 of file CacheHosting.cc.
References create_config(), execute_and_verify(), REGRESSION_TEST_FAILED, restore_state(), and save_state().
Definition at line 1137 of file CacheHosting.cc.
References ats_free(), Queue< C, L >::dequeue(), CacheVol::disk_vols, CacheVol::vols, and Warning.
Referenced by execute_and_verify().
int ClearConfigVol | ( | ConfigVolumes * | configp | ) |
Definition at line 1117 of file CacheHosting.cc.
References ConfigVolumes::cp_queue, Queue< C, L >::dequeue(), ConfigVolumes::num_http_volumes, ConfigVolumes::num_stream_volumes, ConfigVolumes::num_volumes, and Warning.
Referenced by execute_and_verify().
void cplist_init | ( | ) |
Definition at line 2944 of file Cache.cc.
References ats_malloc(), CacheVol::disk_vols, CacheDisk::disk_vols, DiskVol::dpb_queue, Queue< C, L >::enqueue(), gndisks, DLL< C, L >::head, CacheDisk::header, ink_assert, DiskVol::num_volblocks, CacheVol::num_vols, DiskHeader::num_volumes, CacheVol::scheme, DiskVol::size, CacheVol::size, DiskVol::vol_number, and CacheVol::vol_number.
Referenced by CacheProcessor::diskInitialized(), and execute_and_verify().
int cplist_reconfigure | ( | ) |
Definition at line 3082 of file Cache.cc.
References ats_malloc(), CACHE_HTTP_TYPE, ConfigVol::cachep, ConfigVolumes::cp_queue, cplist_update(), create_volume(), CacheDisk::create_volume(), Debug, CacheDisk::delete_all_volumes(), CacheDisk::disk_vols, CacheVol::disk_vols, Queue< C, L >::enqueue(), fillExclusiveDisks(), CacheDisk::free_space, CacheDisk::get_diskvol(), gndisks, gnvol, DLL< C, L >::head, ConfigVol::in_percent, ink_assert, DiskVolBlock::len, Note, DiskVol::num_volblocks, CacheVol::num_vols, ConfigVolumes::num_volumes, ConfigVol::number, ConfigVol::percent, ConfigVol::scheme, CacheVol::scheme, ConfigVol::size, DiskVol::size, CacheVol::size, VOL_BLOCK_SIZE, DiskVol::vol_number, CacheVol::vol_number, and Warning.
Referenced by CacheProcessor::diskInitialized(), and execute_and_verify().
int create_config | ( | RegressionTest * | t, | |
int | i | |||
) |
Definition at line 879 of file CacheHosting.cc.
References CACHE_HTTP_TYPE, CACHE_RTSP_TYPE, ConfigVol::cachep, ConfigVolumes::clear_all(), CacheDisk::cleared, ConfigVolumes::cp_queue, CacheDisk::delete_all_volumes(), Queue< C, L >::enqueue(), EThread::generator, gndisks, ConfigVol::in_percent, ink_assert, MAX_VOL_SIZE, ConfigVolumes::num_http_volumes, ConfigVolumes::num_stream_volumes, CacheDisk::num_usable_blocks, ConfigVolumes::num_volumes, ConfigVol::number, ConfigVol::percent, InkRand::random(), ROUND_TO_VOL_SIZE, rprintf(), ConfigVol::scheme, ConfigVol::size, STORE_BLOCK_SHIFT, STORE_BLOCKS_PER_VOL, and this_ethread().
Referenced by Cache_vol().
int execute_and_verify | ( | RegressionTest * | t | ) |
Definition at line 1027 of file CacheHosting.cc.
References DiskVolBlockQueue::b, ConfigVol::cachep, ClearCacheVolList(), ClearConfigVol(), ConfigVolumes::cp_queue, cplist_init(), cplist_reconfigure(), Debug, CacheDisk::disk_vols, CacheVol::disk_vols, DiskVol::dpb_queue, DiskVolBlock::free, CacheDisk::free_space, gndisks, DLL< C, L >::head, CacheDisk::header, is_debug_tag_set, DiskVolBlock::len, DiskHeader::num_diskvol_blks, DiskVol::num_volblocks, CacheVol::num_vols, DiskHeader::num_volumes, ConfigVolumes::num_volumes, DiskVolBlock::number, ConfigVol::number, rprintf(), ConfigVol::scheme, CacheVol::scheme, DiskVol::size, ConfigVol::size, CacheVol::size, STORE_BLOCK_SHIFT, DiskHeader::vol_info, DiskVol::vol_number, and CacheVol::vol_number.
Referenced by Cache_vol().
int fstat_wrapper | ( | int | fd, | |
struct stat * | s | |||
) |
void restore_state | ( | ) |
void save_state | ( | ) |
{ "hostname", "domain" }
Definition at line 29 of file CacheHosting.cc.
int configs = 4 [static] |
Definition at line 849 of file CacheHosting.cc.
Definition at line 206 of file Cache.cc.
Referenced by CacheHostRecord::Init().
int cp_list_len |
Definition at line 207 of file Cache.cc.
Referenced by CacheHostRecord::Init().
int gndisks |
Definition at line 99 of file Cache.cc.
Referenced by cplist_init(), cplist_reconfigure(), cplist_update(), create_config(), create_volume(), CacheProcessor::diskInitialized(), execute_and_verify(), fillExclusiveDisks(), CacheProcessor::find_by_path(), AIO_Callback_handler::handle_disk_failure(), CacheProcessor::has_online_storage(), Cache::open(), and CacheProcessor::start_internal().
Definition at line 853 of file CacheHosting.cc.
Definition at line 851 of file CacheHosting.cc.
Definition at line 852 of file CacheHosting.cc.
int saved_gnvol |
Definition at line 854 of file CacheHosting.cc.