A brief file description. More...
#include "P_Cache.h"
Go to the source code of this file.
Defines | |
#define | IS_POWER_2(_x) (!((_x)&((_x)-1))) |
#define | UINT_WRAP_LTE(_x, _y) (((_y)-(_x)) < INT_MAX) |
#define | UINT_WRAP_GTE(_x, _y) (((_x)-(_y)) < INT_MAX) |
#define | UINT_WRAP_LT(_x, _y) (((_x)-(_y)) >= INT_MAX) |
Functions | |
static char * | iobufferblock_memcpy (char *p, int len, IOBufferBlock *ab, int offset) |
CacheVC * | new_DocEvacuator (int nbytes, Vol *vol) |
static int | evacuate_fragments (CacheKey *key, CacheKey *earliest_key, int force, Vol *vol) |
static int | agg_copy (char *p, CacheVC *vc) |
static int | target_fragment_size () |
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 CacheWrite.cc.
#define IS_POWER_2 | ( | _x | ) | (!((_x)&((_x)-1))) |
Definition at line 27 of file CacheWrite.cc.
#define UINT_WRAP_GTE | ( | _x, | ||
_y | ||||
) | (((_x)-(_y)) < INT_MAX) |
Definition at line 29 of file CacheWrite.cc.
#define UINT_WRAP_LT | ( | _x, | ||
_y | ||||
) | (((_x)-(_y)) >= INT_MAX) |
Definition at line 30 of file CacheWrite.cc.
Referenced by Vol::aggWrite().
#define UINT_WRAP_LTE | ( | _x, | ||
_y | ||||
) | (((_y)-(_x)) < INT_MAX) |
Definition at line 28 of file CacheWrite.cc.
Referenced by Vol::aggWriteDone().
static int agg_copy | ( | char * | p, | |
CacheVC * | vc | |||
) | [static] |
Definition at line 729 of file CacheWrite.cc.
References Vol::agg_buf_pos, CacheVC::agg_len, CacheVC::alternate_index, ATS_UNUSED, CacheVC::blocks, CacheVC::buf, cache_config_enable_checksum, CACHE_DEBUG_INCREMENT_DYN_STAT, CACHE_DEBUG_SUM_DYN_STAT, CACHE_FRAG_TYPE_HTTP, cache_gc_bytes_evacuated_stat, cache_gc_frags_evacuated_stat, cache_write_bytes_stat, Doc::checksum, CacheHTTPInfoVector::count(), Doc::data(), Doc::data_len(), CacheVC::dir, dir_set_approx_size, dir_set_head, dir_set_offset, dir_set_phase, dir_set_pinned, Doc::doc_type, CacheVC::earliest_key, CacheVC::f, CacheVC::first_buf, CacheVC::first_key, Doc::first_key, CacheVC::frag_len, CacheVC::frag_type, CacheVC::fragment, IOBufferBlock::free(), CacheHTTPInfoVector::get(), Doc::hdr(), HDR_PTR_ALIGNMENT_MASK, Vol::header, CacheVC::header_len, CacheVC::header_to_write, Doc::hlen, ink_assert, ink_get_based_hrtime(), iobufferblock_memcpy(), CacheVC::key, Doc::key, Doc::len, Vol::len, Doc::magic, CacheHTTPInfoVector::marshal(), memcpy, Continuation::mutex, new_IOBufferBlock, CacheVC::offset, offset_to_vol_offset(), CacheVC::overwrite_dir, VolHeaderFooter::phase, CacheVC::pin_in_cache, Doc::pinned, prev_CacheKey(), Vol::round_to_approx_size(), Doc::single_fragment(), sizeofDoc, Vol::skip, VolHeaderFooter::sync_serial, Doc::sync_serial, this_ethread(), CacheVC::total_len, Doc::total_len, Doc::unused, Doc::v_major, Doc::v_minor, CacheVC::vol, vol_offset(), CacheVC::write_len, VolHeaderFooter::write_pos, VolHeaderFooter::write_serial, Doc::write_serial, CacheVC::write_serial, CacheVC::write_vector, and zero_key.
Referenced by Vol::aggWrite().
static int evacuate_fragments | ( | CacheKey * | key, | |
CacheKey * | earliest_key, | |||
int | force, | |||
Vol * | vol | |||
) | [static] |
Definition at line 542 of file CacheWrite.cc.
References DDebug, EvacuationBlock::dir, dir_evac_bucket, dir_head, dir_offset, dir_phase, dir_probe(), EvacuationKey::earliest_key, EvacuationBlock::evac_frags, Vol::evacuate, evacuation_block_exists(), evacuationKeyAllocator, ink_assert, EvacuationKey::key, EvacuationKey::link, Continuation::mutex, new_EvacuationBlock(), SLink< C >::next, DLL< C, L >::push(), EvacuationBlock::readers, ats::CryptoHash::slice32(), and TS_USE_INTERIM_CACHE.
Referenced by Vol::evacuateDocReadDone().
static char* iobufferblock_memcpy | ( | char * | p, | |
int | len, | |||
IOBufferBlock * | ab, | |||
int | offset | |||
) | [static] |
Definition at line 220 of file CacheWrite.cc.
References IOBufferBlock::_end, IOBufferBlock::_start, memcpy, IOBufferBlock::next, and start.
Referenced by agg_copy().
Definition at line 368 of file CacheWrite.cc.
References CacheVC::base_stat, CacheVC::buf, CACHE_INCREMENT_DYN_STAT, CACHE_STAT_ACTIVE, CacheVC::earliest_key, CacheVC::evacuateDocDone(), CacheVC::f, iobuffer_size_to_index(), MAX_BUFFER_SIZE_INDEX, MEMALIGNED, Continuation::mutex, new_CacheVC(), new_IOBufferData, SET_CONTINUATION_HANDLER, CacheVC::vol, and zero_key.
Referenced by Vol::evac_range().
static int target_fragment_size | ( | ) | [inline, static] |
Definition at line 1346 of file CacheWrite.cc.
References cache_config_target_fragment_size.
Referenced by CacheVC::openWriteMain().