Defines | Functions

CacheWrite.cc File Reference

A brief file description. More...

#include "P_Cache.h"
Include dependency graph for CacheWrite.cc:

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)
CacheVCnew_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 ()

Detailed Description

A brief file description.

License

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 Documentation

#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().


Function Documentation

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]
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().

CacheVC* new_DocEvacuator ( int  nbytes,
Vol vol 
)
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().