#include <P_CacheInternal.h>
Inherits CacheVConnection.
Public Member Functions | |
CacheVC () | |
VIO * | do_io_read (Continuation *c, int64_t nbytes, MIOBuffer *buf) |
Read data from the VConnection. | |
VIO * | do_io_pread (Continuation *c, int64_t nbytes, MIOBuffer *buf, int64_t offset) |
VIO * | do_io_write (Continuation *c, int64_t nbytes, IOBufferReader *buf, bool owner=false) |
Write data to the VConnection. | |
void | do_io_close (int lerrno=-1) |
Indicate that the VConnection is no longer needed. | |
void | reenable (VIO *avio) |
void | reenable_re (VIO *avio) |
bool | get_data (int i, void *data) |
Convenience function to retrieve information from VConnection. | |
bool | set_data (int i, void *data) |
Convenience function to set information into the VConnection. | |
bool | is_ram_cache_hit () const |
int | get_header (void **ptr, int *len) |
int | set_header (void *ptr, int len) |
int | get_single_data (void **ptr, int *len) |
bool | writer_done () |
int | calluser (int event) |
int | callcont (int event) |
int | die () |
int | dead (int event, Event *e) |
int | handleReadDone (int event, Event *e) |
int | handleRead (int event, Event *e) |
int | do_read_call (CacheKey *akey) |
int | handleWrite (int event, Event *e) |
int | handleWriteLock (int event, Event *e) |
int | do_write_call () |
int | do_write_lock () |
int | do_write_lock_call () |
int | do_sync (uint32_t target_write_serial) |
int | openReadClose (int event, Event *e) |
int | openReadReadDone (int event, Event *e) |
int | openReadMain (int event, Event *e) |
int | openReadStartEarliest (int event, Event *e) |
int | openReadStartHead (int event, Event *e) |
int | openReadFromWriter (int event, Event *e) |
int | openReadFromWriterMain (int event, Event *e) |
int | openReadFromWriterFailure (int event, Event *) |
int | openReadChooseWriter (int event, Event *e) |
int | openWriteCloseDir (int event, Event *e) |
int | openWriteCloseHeadDone (int event, Event *e) |
int | openWriteCloseHead (int event, Event *e) |
int | openWriteCloseDataDone (int event, Event *e) |
int | openWriteClose (int event, Event *e) |
int | openWriteRemoveVector (int event, Event *e) |
int | openWriteWriteDone (int event, Event *e) |
int | openWriteOverwrite (int event, Event *e) |
int | openWriteMain (int event, Event *e) |
int | openWriteStartDone (int event, Event *e) |
int | openWriteStartBegin (int event, Event *e) |
int | updateVector (int event, Event *e) |
int | updateReadDone (int event, Event *e) |
int | updateVecWrite (int event, Event *e) |
int | removeEvent (int event, Event *e) |
int | linkWrite (int event, Event *e) |
int | derefRead (int event, Event *e) |
int | scanVol (int event, Event *e) |
int | scanObject (int event, Event *e) |
int | scanUpdateDone (int event, Event *e) |
int | scanOpenWrite (int event, Event *e) |
int | scanRemoveDone (int event, Event *e) |
int | is_io_in_progress () |
void | set_io_not_in_progress () |
void | set_agg_write_in_progress () |
int | evacuateDocDone (int event, Event *e) |
int | evacuateReadHead (int event, Event *e) |
void | cancel_trigger () |
virtual int64_t | get_object_size () |
virtual bool | is_pread_capable () |
Test if the VC can support pread. | |
virtual bool | set_pin_in_cache (time_t time_pin) |
virtual time_t | get_pin_in_cache () |
virtual bool | set_disk_io_priority (int priority) |
virtual int | get_disk_io_priority () |
LINK (CacheVC, opendir_link) | |
Data Fields | |
CacheKey | key |
CacheKey | first_key |
CacheKey | earliest_key |
CacheKey | update_key |
Dir | dir |
Dir | earliest_dir |
Dir | overwrite_dir |
Dir | first_dir |
Action | _action |
CacheHTTPInfoVector | vector |
CacheHTTPInfo | alternate |
Ptr< IOBufferData > | buf |
Ptr< IOBufferData > | first_buf |
Ptr< IOBufferBlock > | blocks |
Ptr< IOBufferBlock > | writer_buf |
OpenDirEntry * | od |
AIOCallbackInternal | io |
int | alternate_index |
VIO | vio |
EThread * | initial_thread |
CacheFragType | frag_type |
CacheHTTPInfo * | info |
CacheHTTPInfoVector * | write_vector |
int | header_len |
int | frag_len |
uint32_t | write_len |
uint32_t | agg_len |
uint32_t | write_serial |
Vol * | vol |
Dir * | last_collision |
Event * | trigger |
CacheKey * | read_key |
ContinuationHandler | save_handler |
uint32_t | pin_in_cache |
ink_hrtime | start_time |
int | base_stat |
int | recursive |
int | closed |
uint64_t | seek_to |
int64_t | offset |
int64_t | writer_offset |
int64_t | length |
int64_t | doc_pos |
uint64_t | write_pos |
uint64_t | total_len |
uint64_t | doc_len |
uint64_t | update_len |
int | fragment |
int | scan_msec_delay |
CacheVC * | write_vc |
char * | hostname |
int | host_len |
int | header_to_write_len |
void * | header_to_write |
short | writer_lock_retry |
union { | |
uint32_t flags | |
struct { | |
unsigned int use_first_key:1 | |
unsigned int overwrite:1 | |
unsigned int close_complete:1 | |
unsigned int sync:1 | |
unsigned int evacuator:1 | |
unsigned int single_fragment:1 | |
unsigned int evac_vector:1 | |
unsigned int lookup:1 | |
unsigned int update:1 | |
unsigned int remove:1 | |
unsigned int remove_aborted_writers:1 | |
unsigned int open_read_timeout:1 | |
unsigned int data_done:1 | |
unsigned int read_from_writer_called:1 | |
unsigned int not_from_ram_cache:1 | |
unsigned int rewrite_resident_alt:1 | |
unsigned int readers:1 | |
unsigned int doc_from_ram_cache:1 | |
unsigned int hit_evacuate:1 | |
} f | |
}; | |
char * | scan_vol_map |
off_t | scan_fix_buffer_offset |
Static Public Attributes | |
static int | size_to_init = -1 |
Definition at line 236 of file P_CacheInternal.h.
CacheVC::CacheVC | ( | ) |
Definition at line 294 of file Cache.cc.
References size_to_init, and vio.
TS_INLINE int CacheVC::callcont | ( | int | event | ) |
Definition at line 657 of file P_CacheInternal.h.
References _action, closed, Action::continuation, die(), EVENT_IMMEDIATE, Continuation::handleEvent(), ink_assert, Continuation::mutex, recursive, this_ethread(), VIO::vc_server, vio, and vol.
Referenced by Cache::open_write(), openReadFromWriter(), openReadStartEarliest(), openReadStartHead(), openWriteOverwrite(), and openWriteStartBegin().
TS_INLINE int CacheVC::calluser | ( | int | event | ) |
Definition at line 643 of file P_CacheInternal.h.
References VIO::_cont, closed, die(), Continuation::handleEvent(), ink_assert, Continuation::mutex, recursive, this_ethread(), vio, and vol.
Referenced by openReadFromWriterMain(), openReadMain(), openReadReadDone(), openWriteMain(), and openWriteWriteDone().
TS_INLINE void CacheVC::cancel_trigger | ( | ) |
Definition at line 718 of file P_CacheInternal.h.
References Action::cancel_action(), and trigger.
Referenced by derefRead(), evacuateReadHead(), handleRead(), handleReadDone(), handleWriteLock(), openReadClose(), openReadFromWriter(), openReadFromWriterMain(), openReadMain(), openReadReadDone(), openReadStartEarliest(), openReadStartHead(), openWriteClose(), openWriteCloseDataDone(), openWriteCloseDir(), openWriteCloseHead(), openWriteMain(), openWriteOverwrite(), openWriteStartBegin(), openWriteWriteDone(), removeEvent(), scanObject(), scanOpenWrite(), and scanUpdateDone().
int CacheVC::dead | ( | int | event, | |
Event * | e | |||
) |
int CacheVC::derefRead | ( | int | event, | |
Event * | e | |||
) |
Definition at line 123 of file CacheLink.cc.
References _action, AIO_EVENT_DONE, ink_aiocb::aio_nbytes, AIOCallback::aio_result, AIOCallback::aiocb, buf, cache_config_mutex_retry_delay, CACHE_EVENT_DEREF, CACHE_EVENT_DEREF_FAILED, CACHE_TRY_LOCK, cancel_trigger(), Action::cancelled, Action::continuation, Doc::data(), dir, dir_agg_valid, dir_probe(), do_read_call(), ECACHE_NO_DOC, EVENT_RETURN, first_key, Doc::first_key, free_CacheVC(), Continuation::handleEvent(), HRTIME_MSECONDS, ink_assert, io, Doc::key, key, last_collision, Continuation::mutex, set_io_not_in_progress(), and vol.
Referenced by Cache::deref().
TS_INLINE int CacheVC::die | ( | ) |
Definition at line 727 of file P_CacheInternal.h.
References alternate, earliest_key, EVENT_NONE, f, is_io_in_progress(), VIO::op, openReadClose(), openWriteClose(), recursive, save_handler, SET_HANDLER, total_len, vio, and VIO::WRITE.
Referenced by callcont(), calluser(), do_io_close(), and openWriteWriteDone().
void CacheVC::do_io_close | ( | int | lerrno = -1 |
) | [virtual] |
Indicate that the VConnection is no longer needed.
Once the state machine has finished using this VConnection, it must call this function to indicate that the VConnection can be deallocated. After a close has been called, the VConnection and underlying processor must not send any more events related to this VConnection to the state machine. Likeswise, the state machine must not access the VConnection or any VIOs obtained from it after calling this method.
lerrno | indicates where a close is a normal close or an abort. The difference between a normal close and an abort depends on the underlying type of the VConnection. |
Implements CacheVConnection.
Definition at line 366 of file Cache.cc.
References closed, DDebug, die(), ink_assert, Continuation::mutex, recursive, and this_ethread().
Referenced by ShowCache::handleCacheEvent().
VIO * CacheVC::do_io_pread | ( | Continuation * | c, | |
int64_t | nbytes, | |||
MIOBuffer * | buf, | |||
int64_t | offset | |||
) | [virtual] |
Implements CacheVConnection.
Definition at line 330 of file Cache.cc.
References VIO::buffer, ink_assert, Continuation::mutex, VIO::nbytes, VIO::ndone, VIO::op, VIO::READ, recursive, seek_to, VIO::set_continuation(), trigger, VIO::vc_server, vio, and MIOBufferAccessor::writer_for().
VIO * CacheVC::do_io_read | ( | Continuation * | c, | |
int64_t | nbytes, | |||
MIOBuffer * | buf | |||
) | [virtual] |
Read data from the VConnection.
Called by a state machine to read data from the VConnection. Processors implementing read functionality take out lock, put new bytes on the buffer and call the continuation back before releasing the lock in order to enable the state machine to handle transfer schemes where the end of a given transaction is marked by a special character (ie: NNTP).
Possible Event Codes
On the callback to the continuation, the VConnection may use on of the following values for the event code:
Event code | Meaning |
VC_EVENT_READ_READY | Data has been added to the buffer or the buffer is full |
VC_EVENT_READ_COMPLETE | The amount of data indicated by 'nbytes' has been read into the buffer |
VC_EVENT_EOS | The stream being read from has been shutdown |
VC_EVENT_ERROR | An error occurred during the read |
c | Continuation to be called back with events. | |
nbytes | Number of bytes to read. If unknown, nbytes must be set to INT64_MAX. | |
buf | buffer to read into. |
Implements CacheVConnection.
Definition at line 313 of file Cache.cc.
References VIO::buffer, ink_assert, Continuation::mutex, VIO::nbytes, VIO::ndone, VIO::op, VIO::READ, recursive, VIO::set_continuation(), trigger, VIO::vc_server, vio, and MIOBufferAccessor::writer_for().
Referenced by ShowCache::handleCacheEvent().
VIO * CacheVC::do_io_write | ( | Continuation * | c, | |
int64_t | nbytes, | |||
IOBufferReader * | buf, | |||
bool | owner = false | |||
) | [virtual] |
Write data to the VConnection.
This method is called by a state machine to write data to the VConnection.
Possible Event Codes
On the callback to the continuation, the VConnection may use on of the following event codes:
Event code | Meaning |
VC_EVENT_WRITE_READY | Data was written from the reader or there are no bytes available for the reader to write. |
VC_EVENT_WRITE_COMPLETE | The amount of data indicated by 'nbytes' has been written to the VConnection |
VC_EVENT_INACTIVITY_TIMEOUT | No activity was performed for a certain period. |
VC_EVENT_ACTIVE_TIMEOUT | Write operation continued beyond a time limit. |
VC_EVENT_ERROR | An error occurred during the write |
c | Continuation to be called back with events. | |
nbytes | Number of bytes to write. If unknown, nbytes must be set to INT64_MAX. | |
buf | Reader whose data is to be read from. | |
owner |
Implements CacheVConnection.
Definition at line 348 of file Cache.cc.
References VIO::buffer, ink_assert, Continuation::mutex, VIO::nbytes, VIO::ndone, VIO::op, MIOBufferAccessor::reader_for(), recursive, VIO::set_continuation(), trigger, VIO::vc_server, vio, and VIO::WRITE.
TS_INLINE int CacheVC::do_read_call | ( | CacheKey * | akey | ) |
Definition at line 671 of file P_CacheInternal.h.
References ink_aiocb::aio_nbytes, AIOCallback::aiocb, ClassAllocator< C >::alloc(), dir, dir_approx_size, dir_assign, doc_pos, EVENT_CALL, f, handleRead(), ink_assert, io, od, VIO::op, PUSH_HANDLER, VIO::READ, read_key, vio, and vol.
Referenced by Cache::deref(), derefRead(), evacuateDocDone(), evacuateReadHead(), Cache::open_read(), openReadMain(), openReadReadDone(), openReadStartEarliest(), openReadStartHead(), openWriteOverwrite(), and removeEvent().
int CacheVC::do_sync | ( | uint32_t | target_write_serial | ) |
TS_INLINE int CacheVC::do_write_call | ( | ) |
Definition at line 711 of file P_CacheInternal.h.
References EVENT_CALL, handleWrite(), and PUSH_HANDLER.
Referenced by openReadStartEarliest(), openWriteCloseDataDone(), and scanOpenWrite().
TS_INLINE int CacheVC::do_write_lock | ( | ) |
Definition at line 773 of file P_CacheInternal.h.
References EVENT_NONE, handleWriteLock(), and PUSH_HANDLER.
Referenced by Cache::link(), and openWriteCloseHead().
TS_INLINE int CacheVC::do_write_lock_call | ( | ) |
Definition at line 780 of file P_CacheInternal.h.
References EVENT_CALL, handleWriteLock(), and PUSH_HANDLER.
Referenced by openWriteClose(), and openWriteMain().
int CacheVC::evacuateDocDone | ( | int | event, | |
Event * | e | |||
) |
Definition at line 448 of file CacheWrite.cc.
References AIO_EVENT_DONE, buf, Doc::data_len(), DDebug, EvacuationBlock::dir, dir, dir_compare_tag(), dir_evac_bucket, dir_head, dir_lookaside_fixup(), dir_lookaside_insert(), dir_lookaside_probe(), dir_offset, dir_overwrite(), dir_phase, dir_probe(), do_read_call(), doc_len, earliest_dir, EvacuationBlock::earliest_evacuator, EvacuationKey::earliest_key, EvacuationBlock::evac_frags, Vol::evacuate, evacuateReadHead(), EVENT_RETURN, EvacuationBlock::f, first_key, Doc::first_key, RamCache::fixup(), ats::CryptoHash::fold(), free_CacheVC(), Continuation::handleEvent(), DLL< C, L >::head, Doc::hlen, ink_assert, Doc::key, EvacuationKey::key, key, last_collision, EvacuationKey::link, Continuation::mutex, SLink< C >::next, Vol::open_read(), overwrite_dir, Vol::ram_cache, SET_HANDLER, ats::CryptoHash::slice32(), this_ethread(), total_len, and vol.
Referenced by new_DocEvacuator().
int CacheVC::evacuateReadHead | ( | int | event, | |
Event * | e | |||
) |
Definition at line 383 of file CacheWrite.cc.
References AIO_EVENT_DONE, alternate_index, buf, CACHE_FRAG_TYPE_HTTP, cancel_trigger(), DDebug, Debug, dir, dir_lookaside_fixup(), dir_lookaside_remove(), dir_probe(), dir_valid, do_read_call(), doc_len, DOC_MAGIC, Doc::doc_type, earliest_key, EVENT_RETURN, first_key, Doc::first_key, free_CacheVC(), CacheHTTPInfoVector::get(), Continuation::handleEvent(), Doc::hlen, ink_assert, io, Doc::key, last_collision, Doc::magic, Continuation::mutex, next_CacheKey(), Note, AIOCallback::ok(), ats::CryptoHash::slice32(), this_ethread(), total_len, Doc::total_len, vector, and vol.
Referenced by evacuateDocDone().
bool CacheVC::get_data | ( | int | id, | |
void * | data | |||
) | [virtual] |
Convenience function to retrieve information from VConnection.
This function is provided as a convenience for state machines to transmit information from/to a VConnection without breaking the VConnection abstraction. Its behavior varies depending on the type of VConnection being used.
id | Identifier associated to interpret the data field | |
data | Value or pointer with state machine or VConnection data. |
Reimplemented from VConnection.
Definition at line 413 of file Cache.cc.
References alternate, CACHE_DATA_HTTP_INFO, CACHE_DATA_RAM_CACHE_HIT_FLAG, and f.
int CacheVC::get_disk_io_priority | ( | ) | [virtual] |
Implements CacheVConnection.
Definition at line 505 of file Cache.cc.
References ink_aiocb::aio_reqprio, AIOCallback::aiocb, and io.
int CacheVC::get_header | ( | void ** | ptr, | |
int * | len | |||
) | [inline, virtual] |
Implements CacheVConnection.
Definition at line 254 of file P_CacheInternal.h.
References first_buf, Doc::hdr(), Doc::hlen, and Ptr< T >::m_ptr.
int64_t CacheVC::get_object_size | ( | ) | [virtual] |
Implements CacheVConnection.
Definition at line 431 of file Cache.cc.
Referenced by ShowCache::handleCacheEvent(), and TSVConnCacheObjectSizeGet().
time_t CacheVC::get_pin_in_cache | ( | ) | [virtual] |
int CacheVC::get_single_data | ( | void ** | ptr, | |
int * | len | |||
) | [inline, virtual] |
Implements CacheVConnection.
Definition at line 270 of file P_CacheInternal.h.
References Doc::data(), Doc::data_len(), first_buf, Ptr< T >::m_ptr, and Doc::total_len.
int CacheVC::handleRead | ( | int | event, | |
Event * | e | |||
) |
Definition at line 2667 of file Cache.cc.
References AIOCallback::action, Vol::agg_buf_pos, Vol::agg_buffer, ink_aiocb::aio_buf, AIO_CALLBACK_THREAD_ANY, ink_aiocb::aio_fildes, ink_aiocb::aio_nbytes, ink_aiocb::aio_offset, AIOCallback::aio_result, AIOCallback::aiocb, cache_config_ram_cache_compress, CACHE_DEBUG_INCREMENT_DYN_STAT, CACHE_FRAG_TYPE_HTTP, cache_pread_count_stat, cancel_trigger(), DEDICATED, dir, dir_agg_buf_valid, dir_offset, Doc::doc_type, f, Vol::fd, Vol::first_fragment_data, Vol::first_fragment_key, Vol::first_fragment_offset, RamCache::get(), handleReadDone(), Vol::header, Doc::hlen, ink_aio_read(), ink_assert, io, iobuffer_size_to_index(), Vol::len, MAX_BUFFER_SIZE_INDEX, MEMALIGNED, memcpy, Continuation::mutex, new_IOBufferData, Vol::ram_cache, read_key, SET_HANDLER, Vol::skip, this_ethread(), AIOCallback::thread, vol, vol_offset(), and VolHeaderFooter::write_pos.
Referenced by do_read_call().
int CacheVC::handleReadDone | ( | int | event, | |
Event * | e | |||
) |
Definition at line 2458 of file Cache.cc.
References AIO_EVENT_DONE, ink_aiocb::aio_nbytes, ink_aiocb::aio_offset, AIOCallback::aiocb, ats::CryptoHash::b, cache_config_enable_checksum, cache_config_ram_cache_compress, cache_config_ram_cache_cutoff, CACHE_FRAG_TYPE_HTTP, CACHE_FRAG_TYPE_HTTP_V23, cancel_trigger(), Doc::checksum, Doc::data(), Doc::data_len(), Debug, dir, dir_approx_size, dir_head, dir_offset, dir_set_approx_size, dir_valid, Vol::disk, DISK_BAD, doc_len, DOC_MAGIC, DOC_NO_CHECKSUM, Doc::doc_type, f, Vol::first_fragment_data, Vol::first_fragment_key, Vol::first_fragment_offset, Doc::first_key, Vol::hash_text, Doc::hdr(), Doc::hlen, ink_assert, io, iobuffer_size_to_index(), is_debug_tag_set, is_io_in_progress(), Doc::key, Doc::len, Doc::magic, MAX_BUFFER_SIZE_INDEX, MEMALIGNED, memcpy, Continuation::mutex, MUTEX_TRY_LOCK, VIO::ndone, new_IOBufferData, Note, AIOCallback::ok(), VIO::op, Vol::path, Doc::prefix_len(), RamCache::put(), Vol::ram_cache, VIO::READ, read_key, Vol::round_to_approx_size(), Vol::sector_size, set_io_not_in_progress(), ats::CryptoHash::slice64(), this_ethread(), ats::CryptoHash::toHexStr(), Doc::total_len, VC_SCHED_LOCK_RETRY, vio, and vol.
Referenced by handleRead().
int CacheVC::handleWrite | ( | int | event, | |
Event * | e | |||
) |
Definition at line 179 of file CacheWrite.cc.
References Vol::agg, agg_len, AGG_SIZE, Vol::agg_todo_size, Vol::aggWrite(), AIO_EVENT_DONE, AIOCallback::aio_result, base_stat, cache_config_agg_write_backlog, cache_config_max_doc_size, CACHE_INCREMENT_DYN_STAT, CACHE_STAT_FAILURE, cache_write_backlog_failure_stat, Queue< C, L >::enqueue(), EVENT_CALL, f, frag_len, Continuation::handleEvent(), header_len, ink_assert, INT64_MAX, io, Vol::is_io_in_progress(), MAX_FRAG_SIZE, Continuation::mutex, VIO::nbytes, VIO::ndone, Queue< C, L >::push(), Vol::round_to_approx_size(), set_agg_write_in_progress(), sizeofDoc, trigger, vio, vol, and write_len.
Referenced by do_write_call(), and handleWriteLock().
TS_INLINE int CacheVC::handleWriteLock | ( | int | event, | |
Event * | e | |||
) |
Definition at line 754 of file P_CacheInternal.h.
References AIO_EVENT_DONE, cache_config_mutex_retry_delay, CACHE_TRY_LOCK, cancel_trigger(), EVENT_CALL, EVENT_RETURN, Continuation::handleEvent(), handleWrite(), HRTIME_MSECONDS, Continuation::mutex, set_agg_write_in_progress(), trigger, and vol.
Referenced by do_write_lock(), and do_write_lock_call().
int CacheVC::is_io_in_progress | ( | ) | [inline] |
Definition at line 339 of file P_CacheInternal.h.
References ink_aiocb::aio_fildes, AIOCallback::aiocb, and io.
Referenced by die(), free_CacheVC(), handleReadDone(), openReadClose(), openWriteClose(), openWriteCloseDataDone(), openWriteCloseDir(), openWriteCloseHeadDone(), openWriteMain(), openWriteWriteDone(), and reenable_re().
bool CacheVC::is_pread_capable | ( | ) | [virtual] |
Test if the VC can support pread.
true
if do_io_pread
will work, false
if not. Implements CacheVConnection.
Definition at line 2352 of file Cache.cc.
References f.
bool CacheVC::is_ram_cache_hit | ( | ) | const [inline, virtual] |
Implements CacheVConnection.
Definition at line 249 of file P_CacheInternal.h.
References f, ink_assert, VIO::op, VIO::READ, and vio.
CacheVC::LINK | ( | CacheVC | , | |
opendir_link | ||||
) |
int CacheVC::linkWrite | ( | int | event, | |
Event * | e | |||
) |
Definition at line 59 of file CacheLink.cc.
References _action, AIO_EVENT_DONE, CACHE_EVENT_LINK, CACHE_EVENT_LINK_FAILED, Action::cancelled, Action::continuation, dir, dir_insert(), first_key, free_CacheVC(), Continuation::handleEvent(), ink_assert, io, AIOCallback::ok(), set_io_not_in_progress(), and vol.
Referenced by Cache::link().
int CacheVC::openReadChooseWriter | ( | int | event, | |
Event * | e | |||
) |
Definition at line 189 of file CacheRead.cc.
References alternate, alternate_index, CACHE_ALT_INDEX_DEFAULT, cache_config_read_while_writer, cache_config_select_alternate, CACHE_FRAG_TYPE_HTTP, CacheHTTPInfoVector::clear(), closed, CacheHTTPInfoVector::count(), DDebug, earliest_key, f, first_key, frag_type, CacheHTTPInfoVector::get(), ink_assert, CacheHTTPInfoVector::insert(), Continuation::mutex, CacheHTTPInfoVector::remove(), HttpTransactCache::SelectFromAlternates(), ats::CryptoHash::slice32(), start_time, ProxyMutex::thread_holding, update_key, vector, write_vc, and write_vector.
Referenced by openReadFromWriter().
int CacheVC::openReadClose | ( | int | event, | |
Event * | e | |||
) |
Definition at line 516 of file CacheRead.cc.
References AIO_EVENT_DONE, CACHE_TRY_LOCK, cancel_trigger(), Vol::close_read(), closed, dir_pinned, dir_valid, earliest_dir, f, first_dir, Vol::force_evacuate_head(), free_CacheVC(), is_io_in_progress(), Continuation::mutex, set_io_not_in_progress(), ProxyMutex::thread_holding, and VC_SCHED_LOCK_RETRY.
Referenced by die().
int CacheVC::openReadFromWriter | ( | int | event, | |
Event * | e | |||
) |
Definition at line 290 of file CacheRead.cc.
References _action, Ptr< T >::_ptr(), alternate, blocks, cache_config_read_while_writer, CACHE_EVENT_OPEN_READ, CACHE_EVENT_OPEN_READ_FAILED, CACHE_FRAG_TYPE_HTTP, CACHE_INCREMENT_DYN_STAT, cache_read_busy_success_stat, CACHE_TRY_LOCK, callcont(), cancel_trigger(), Action::cancelled, closed, Doc::data_len(), DDebug, dir_clean, doc_len, doc_pos, earliest_dir, earliest_key, EVENT_CONT, EVENT_IMMEDIATE, EVENT_RETURN, f, first_buf, first_dir, first_key, frag_type, fragment, free_CacheVC(), ink_assert, ink_get_hrtime(), CacheHTTPInfoVector::insert(), io, length, Continuation::mutex, MUTEX_RELEASE, VIO::nbytes, new_IOBufferBlock, offset, AIOCallback::ok(), Vol::open_read(), openReadChooseWriter(), openReadFromWriterFailure(), openReadFromWriterMain(), openReadStartEarliest(), openReadStartHead(), Doc::prefix_len(), SET_HANDLER, ats::CryptoHash::slice32(), start_time, ProxyMutex::thread_holding, total_len, update_key, VC_SCHED_LOCK_RETRY, VC_SCHED_WRITER_RETRY, vector, vio, write_vc, writer_buf, writer_done(), writer_lock_retry, and writer_offset.
Referenced by Cache::open_read(), and openReadStartHead().
int CacheVC::openReadFromWriterFailure | ( | int | event, | |
Event * | e | |||
) |
Definition at line 176 of file CacheRead.cc.
References _action, CACHE_INCREMENT_DYN_STAT, cache_read_busy_failure_stat, cache_read_failure_stat, CacheHTTPInfoVector::clear(), Action::continuation, free_CacheVC(), Continuation::handleEvent(), and vector.
Referenced by openReadFromWriter().
int CacheVC::openReadFromWriterMain | ( | int | event, | |
Event * | e | |||
) |
Definition at line 472 of file CacheRead.cc.
References MIOBuffer::append_block(), VIO::buffer, calluser(), cancel_trigger(), DDebug, doc_len, first_key, ink_assert, ink_release_assert, iobufferblock_clone(), iobufferblock_skip(), is_action_tag_set, length, VIO::ndone, VIO::ntodo(), seek_to, ats::CryptoHash::slice32(), VC_EVENT_EOS, VC_EVENT_ERROR, VC_EVENT_READ_COMPLETE, VC_EVENT_READ_READY, vio, Warning, MIOBufferAccessor::writer(), writer_buf, and writer_offset.
Referenced by openReadFromWriter().
int CacheVC::openReadMain | ( | int | event, | |
Event * | e | |||
) |
Definition at line 637 of file CacheRead.cc.
References IOBufferBlock::_buf_end, IOBufferBlock::_end, AIO_EVENT_DONE, alternate, MIOBuffer::append_block(), buf, VIO::buffer, CACHE_TRY_LOCK, calluser(), cancel_trigger(), DDebug, Debug, dir, dir_delete(), dir_offset, dir_probe(), do_read_call(), doc_len, doc_pos, earliest_dir, earliest_key, EVENT_CONT, EVENT_DONE, EVENT_RETURN, first_key, fragment, Continuation::handleEvent(), MIOBuffer::high_water(), ink_assert, ink_release_assert, is_action_tag_set, is_debug_tag_set, Doc::key, Doc::len, MIOBuffer::max_read_avail(), Continuation::mutex, VIO::ndone, new_IOBufferBlock, next_CacheKey(), VIO::ntodo(), openReadReadDone(), Doc::prefix_len(), prev_CacheKey(), seek_to, SET_HANDLER, ats::CryptoHash::slice32(), ProxyMutex::thread_holding, ats::CryptoHash::toHexStr(), VC_EVENT_EOS, VC_EVENT_ERROR, VC_EVENT_READ_COMPLETE, VC_EVENT_READ_READY, VC_SCHED_LOCK_RETRY, VC_SCHED_WRITER_RETRY, vio, Warning, MIOBuffer::water_mark, write_vc, MIOBufferAccessor::writer(), writer_done(), and writer_lock_retry.
Referenced by openReadReadDone(), openReadStartEarliest(), and openReadStartHead().
int CacheVC::openReadReadDone | ( | int | event, | |
Event * | e | |||
) |
Definition at line 540 of file CacheRead.cc.
References AIO_EVENT_DONE, buf, CACHE_TRY_LOCK, calluser(), cancel_trigger(), DDebug, dir, dir_delete(), dir_offset, dir_probe(), dir_valid, do_read_call(), DOC_CORRUPT, doc_len, DOC_MAGIC, doc_pos, earliest_dir, earliest_key, EVENT_IMMEDIATE, EVENT_RETURN, first_key, fragment, Continuation::handleEvent(), io, Doc::key, Doc::magic, Continuation::mutex, VIO::ndone, next_CacheKey(), AIOCallback::ok(), openReadMain(), Doc::prefix_len(), SET_HANDLER, set_io_not_in_progress(), ats::CryptoHash::slice32(), ProxyMutex::thread_holding, ats::CryptoHash::toHexStr(), VC_EVENT_EOS, VC_EVENT_ERROR, VC_SCHED_LOCK_RETRY, VC_SCHED_WRITER_RETRY, vio, Warning, write_vc, and writer_done().
Referenced by openReadMain().
int CacheVC::openReadStartEarliest | ( | int | event, | |
Event * | e | |||
) |
Definition at line 803 of file CacheRead.cc.
References _action, AIO_EVENT_DONE, alternate, alternate_index, Vol::begin_read(), buf, cache_config_hit_evacuate_size_limit, CACHE_EVENT_OPEN_READ, CACHE_EVENT_OPEN_READ_FAILED, CACHE_FRAG_TYPE_HTTP, CACHE_INCREMENT_DYN_STAT, cache_read_busy_success_stat, cache_read_failure_stat, CACHE_TRY_LOCK, callcont(), cancel_trigger(), Action::cancelled, Vol::close_write(), Action::continuation, CacheHTTPInfoVector::count(), DDebug, dir, dir_agg_valid, dir_assign, dir_delete(), dir_lookaside_probe(), dir_offset, dir_probe(), dir_set_tag, dir_valid, do_read_call(), do_write_call(), DOC_CORRUPT, doc_len, DOC_MAGIC, doc_pos, earliest_dir, earliest_key, ECACHE_NO_DOC, EVENT_RETURN, f, first_buf, first_dir, first_key, frag_type, free_CacheVC(), Continuation::handleEvent(), Vol::header, header_len, Doc::hlen, ink_assert, ink_release_assert, io, is_action_tag_set, Doc::key, Doc::magic, CacheHTTPInfoVector::marshal_length(), Continuation::mutex, next_CacheKey(), offset_to_vol_offset(), AIOCallback::ok(), VIO::op, Vol::open_write(), openReadMain(), VolHeaderFooter::phase, Doc::prefix_len(), CacheHTTPInfoVector::remove(), SET_HANDLER, set_io_not_in_progress(), ProxyMutex::thread_holding, ats::CryptoHash::toHexStr(), Doc::total_len, total_len, VC_SCHED_LOCK_RETRY, vio, Warning, Vol::within_hit_evacuate_window(), write_len, VolHeaderFooter::write_pos, write_vc, write_vector, and zero_key.
Referenced by openReadFromWriter(), and openReadStartHead().
int CacheVC::openReadStartHead | ( | int | event, | |
Event * | e | |||
) |
Definition at line 1013 of file CacheRead.cc.
References _action, AIO_EVENT_DONE, alternate, alternate_index, Vol::begin_read(), buf, CACHE_ALT_MAGIC_ALIVE, CACHE_ALT_MAGIC_DEAD, CACHE_ALT_MAGIC_MARSHALED, cache_config_hit_evacuate_size_limit, cache_config_select_alternate, CACHE_EVENT_LOOKUP, CACHE_EVENT_LOOKUP_FAILED, CACHE_EVENT_OPEN_READ, CACHE_EVENT_OPEN_READ_FAILED, CACHE_FRAG_TYPE_HTTP, CACHE_INCREMENT_DYN_STAT, cache_lookup_failure_stat, cache_lookup_success_stat, cache_read_failure_stat, CACHE_TRY_LOCK, callcont(), cancel_trigger(), Action::cancelled, Action::continuation, CacheHTTPInfoVector::count(), DDebug, Debug, dir, dir_agg_valid, dir_delete(), dir_offset, dir_probe(), dir_valid, do_read_call(), DOC_CORRUPT, doc_len, DOC_MAGIC, doc_pos, earliest_dir, earliest_key, EVENT_IMMEDIATE, EVENT_RETURN, f, first_buf, first_dir, Doc::first_key, frag_type, free_CacheVC(), CacheHTTPInfoVector::get(), Continuation::handleEvent(), Doc::hdr(), Vol::header, Doc::hlen, ink_assert, ink_release_assert, io, is_action_tag_set, is_debug_tag_set, Doc::key, Doc::len, HTTPCacheAlt::m_magic, Doc::magic, Continuation::mutex, MUTEX_RELEASE, next_CacheKey(), Note, offset_to_vol_offset(), AIOCallback::ok(), Vol::open_read(), openReadFromWriter(), openReadMain(), openReadStartEarliest(), VolHeaderFooter::phase, Doc::prefix_len(), HttpTransactCache::SelectFromAlternates(), SET_HANDLER, set_io_not_in_progress(), Doc::single_fragment(), ats::CryptoHash::slice32(), ProxyMutex::thread_holding, ats::CryptoHash::toHexStr(), Doc::total_len, Doc::v_major, Doc::v_minor, VC_SCHED_LOCK_RETRY, vector, Warning, Vol::within_hit_evacuate_window(), and VolHeaderFooter::write_pos.
Referenced by Cache::lookup(), Cache::open_read(), and openReadFromWriter().
int CacheVC::openWriteClose | ( | int | event, | |
Event * | e | |||
) |
Definition at line 1257 of file CacheWrite.cc.
References AIO_EVENT_DONE, cancel_trigger(), closed, do_write_lock_call(), f, fragment, HTTP_CACHE, io, is_io_in_progress(), length, MAX_FRAG_SIZE, AIOCallback::ok(), openWriteCloseDataDone(), openWriteCloseDir(), openWriteCloseHead(), SET_HANDLER, set_io_not_in_progress(), total_len, updateVector(), and write_len.
Referenced by die(), and openWriteMain().
int CacheVC::openWriteCloseDataDone | ( | int | event, | |
Event * | e | |||
) |
Definition at line 1210 of file CacheWrite.cc.
References AIO_EVENT_DONE, alternate, blocks, CACHE_TRY_LOCK, cancel_trigger(), dir, dir_insert(), do_write_call(), earliest_dir, earliest_key, EVENT_RETURN, f, fragment, Continuation::handleEvent(), ink_assert, io, iobufferblock_skip(), is_io_in_progress(), key, length, MAX_FRAG_SIZE, Continuation::mutex, next_CacheKey(), offset, AIOCallback::ok(), openWriteCloseDir(), openWriteCloseHead(), set_io_not_in_progress(), this_ethread(), VC_LOCK_RETRY_EVENT, vol, write_len, and write_pos.
Referenced by openWriteClose().
int CacheVC::openWriteCloseDir | ( | int | event, | |
Event * | e | |||
) |
Definition at line 1083 of file CacheWrite.cc.
References VIO::_cont, alternate_index, ats::CryptoHash::b, CACHE_ALT_REMOVED, CACHE_INCREMENT_DYN_STAT, cache_single_fragment_document_count_stat, cache_three_plus_plus_fragment_document_count_stat, CACHE_TRY_LOCK, cache_two_fragment_document_count_stat, cancel_trigger(), Vol::close_write(), closed, DDebug, Debug, dir_delete(), DIR_MASK_TAG, earliest_dir, earliest_key, f, first_key, fragment, free_CacheVC(), Continuation::handleEvent(), HTTP_CACHE, ink_assert, is_debug_tag_set, is_io_in_progress(), Continuation::mutex, recursive, SET_HANDLER, ats::CryptoHash::slice32(), this_ethread(), total_len, update_key, VC_EVENT_WRITE_COMPLETE, VC_SCHED_LOCK_RETRY, vio, and vol.
Referenced by openWriteClose(), openWriteCloseDataDone(), openWriteCloseHead(), openWriteCloseHeadDone(), and openWriteOverwrite().
int CacheVC::openWriteCloseHead | ( | int | event, | |
Event * | e | |||
) |
Definition at line 1183 of file CacheWrite.cc.
References CACHE_FRAG_TYPE_HTTP, cancel_trigger(), do_write_lock(), EVENT_IMMEDIATE, f, frag_type, fragment, header_len, header_to_write_len, ink_assert, io, length, AIOCallback::ok(), openWriteCloseDir(), openWriteCloseHeadDone(), SET_HANDLER, total_len, updateVector(), and write_len.
Referenced by openWriteClose(), and openWriteCloseDataDone().
int CacheVC::openWriteCloseHeadDone | ( | int | event, | |
Event * | e | |||
) |
Definition at line 1139 of file CacheWrite.cc.
References AIO_EVENT_DONE, CACHE_FRAG_TYPE_HTTP, CACHE_TRY_LOCK, dir, dir_assign, dir_insert(), dir_is_empty, dir_overwrite(), dir_set_tag, dir_valid, earliest_key, f, first_key, frag_type, ink_assert, io, is_io_in_progress(), Continuation::mutex, od, AIOCallback::ok(), openWriteCloseDir(), set_io_not_in_progress(), VC_LOCK_RETRY_EVENT, and vol.
Referenced by openWriteCloseHead().
int CacheVC::openWriteMain | ( | int | event, | |
Event * | e | |||
) |
Definition at line 1351 of file CacheWrite.cc.
References IOBufferReader::block, blocks, VIO::buffer, calluser(), cancel_trigger(), closed, IOBufferReader::consume(), do_write_lock_call(), EVENT_CONT, EVENT_DONE, EVENT_NONE, f, ink_assert, is_io_in_progress(), length, MAX_FRAG_SIZE, VIO::ndone, VIO::ntodo(), offset, openWriteClose(), openWriteWriteDone(), IOBufferReader::read_avail(), MIOBufferAccessor::reader(), SET_HANDLER, IOBufferReader::start_offset, target_fragment_size(), total_len, VC_EVENT_WRITE_COMPLETE, VC_EVENT_WRITE_READY, vio, write_len, and MIOBufferAccessor::writer().
Referenced by Cache::open_write(), openWriteOverwrite(), openWriteStartBegin(), and openWriteWriteDone().
int CacheVC::openWriteOverwrite | ( | int | event, | |
Event * | e | |||
) |
Definition at line 1421 of file CacheWrite.cc.
References _action, AIO_EVENT_DONE, buf, CACHE_EVENT_OPEN_WRITE, CACHE_TRY_LOCK, callcont(), cancel_trigger(), Action::cancelled, dir, dir_probe(), do_read_call(), EVENT_IMMEDIATE, EVENT_RETURN, first_buf, first_key, Doc::first_key, Continuation::handleEvent(), io, last_collision, Continuation::mutex, od, AIOCallback::ok(), openWriteCloseDir(), openWriteMain(), SET_HANDLER, set_io_not_in_progress(), this_ethread(), VC_LOCK_RETRY_EVENT, and vol.
Referenced by Cache::open_write(), and openWriteStartBegin().
int CacheVC::openWriteRemoveVector | ( | int | event, | |
Event * | e | |||
) |
int CacheVC::openWriteStartBegin | ( | int | event, | |
Event * | e | |||
) |
Definition at line 1592 of file CacheWrite.cc.
References _action, base_stat, CACHE_EVENT_OPEN_WRITE, CACHE_EVENT_OPEN_WRITE_FAILED, CACHE_INCREMENT_DYN_STAT, CACHE_STAT_FAILURE, callcont(), cancel_trigger(), Action::cancelled, Action::continuation, EVENT_IMMEDIATE, f, free_CacheVC(), Continuation::handleEvent(), Vol::open_write_lock(), openWriteMain(), openWriteOverwrite(), SET_HANDLER, VC_SCHED_LOCK_RETRY, and vol.
Referenced by Cache::open_write().
int CacheVC::openWriteStartDone | ( | int | event, | |
Event * | e | |||
) |
int CacheVC::openWriteWriteDone | ( | int | event, | |
Event * | e | |||
) |
Definition at line 1299 of file CacheWrite.cc.
References AIO_EVENT_DONE, alternate, blocks, CACHE_TRY_LOCK, calluser(), cancel_trigger(), closed, DDebug, die(), dir, dir_insert(), earliest_dir, earliest_key, first_key, fragment, ink_assert, io, iobufferblock_skip(), is_io_in_progress(), key, length, Continuation::mutex, next_CacheKey(), offset, AIOCallback::ok(), openWriteMain(), SET_HANDLER, set_io_not_in_progress(), ats::CryptoHash::slice32(), VC_EVENT_ERROR, VC_LOCK_RETRY_EVENT, vol, write_len, and write_pos.
Referenced by openWriteMain().
void CacheVC::reenable | ( | VIO * | avio | ) | [virtual] |
Implements CacheVConnection.
Definition at line 377 of file Cache.cc.
References VIO::buffer, DDebug, ink_assert, MIOBuffer::max_read_avail(), VIO::mutex, VIO::op, VIO::READ, IOBufferReader::read_avail(), MIOBufferAccessor::reader(), trigger, vio, MIOBuffer::water_mark, and MIOBufferAccessor::writer().
void CacheVC::reenable_re | ( | VIO * | avio | ) | [virtual] |
Implements CacheVConnection.
Definition at line 397 of file Cache.cc.
References DDebug, EVENT_NONE, Continuation::handleEvent(), ink_assert, is_io_in_progress(), VIO::mutex, recursive, and trigger.
int CacheVC::removeEvent | ( | int | event, | |
Event * | e | |||
) |
Definition at line 2814 of file Cache.cc.
References _action, ink_aiocb::aio_nbytes, AIOCallback::aio_result, AIOCallback::aiocb, CACHE_EVENT_REMOVE, CACHE_EVENT_REMOVE_FAILED, CACHE_INCREMENT_DYN_STAT, cache_remove_failure_stat, cancel_trigger(), Action::cancelled, Vol::close_write(), Action::continuation, dir, dir_delete(), dir_probe(), dir_valid, do_read_call(), DOC_MAGIC, ECACHE_NO_DOC, EVENT_RETURN, f, Doc::first_key, free_CacheVC(), Continuation::handleEvent(), ink_assert, io, key, last_collision, Doc::magic, Continuation::mutex, MUTEX_TRY_LOCK, od, Vol::open_read(), Vol::open_write(), SET_HANDLER, set_io_not_in_progress(), this_ethread(), VC_SCHED_LOCK_RETRY, and vol.
Referenced by Cache::remove().
int CacheVC::scanObject | ( | int | event, | |
Event * | e | |||
) |
Definition at line 151 of file CacheVol.cc.
References _action, Ptr< T >::_ptr(), AIOCallback::action, ink_aiocb::aio_buf, ink_aiocb::aio_fildes, ink_aiocb::aio_nbytes, ink_aiocb::aio_offset, AIOCallback::aio_result, AIOCallback::aiocb, alternate, alternate_index, buf, cache_config_mutex_retry_delay, CACHE_EVENT_SCAN_DONE, CACHE_EVENT_SCAN_OBJECT, CACHE_FRAG_TYPE_HTTP, CACHE_SCAN_RESULT_CONTINUE, CACHE_SCAN_RESULT_DELETE, CACHE_SCAN_RESULT_DELETE_ALL_ALTERNATES, CACHE_SCAN_RESULT_UPDATE, CACHE_TRY_LOCK, cacheProcessor, cancel_trigger(), Action::cancelled, CacheHTTPInfoVector::clear(), Action::continuation, CacheHTTPInfoVector::count(), Doc::data(), Debug, dir, dir_agg_valid, dir_head, dir_probe(), DOC_MAGIC, Doc::doc_type, earliest_dir, earliest_key, ECACHE_READ_FAIL, EVENT_DONE, EVENT_NONE, eventProcessor, f, Vol::fd, first_key, Doc::first_key, frag_type, fragment, free_CacheVC(), CacheHTTPInfoVector::get(), Continuation::handleEvent(), Doc::hdr(), Doc::hlen, HRTIME_MSECONDS, ink_aio_read(), ink_assert, CacheHTTPInfoVector::insert(), io, Doc::key, key, last_collision, Doc::len, Vol::len, Doc::magic, make_vol_map(), Continuation::mutex, next_in_map(), offset, CacheProcessor::remove(), CacheHTTPInfoVector::remove(), Vol::round_to_approx_size(), SCAN_BUF_SIZE, scan_fix_buffer_offset, scan_msec_delay, scan_vol_map, scanOpenWrite(), scanRemoveDone(), scanVol(), EventProcessor::schedule_in(), SET_HANDLER, set_io_not_in_progress(), Vol::skip, AIOCallback::thread, unmarshal(), vector, vol, vol_offset(), vol_offset_to_offset(), write_len, writer_lock_retry, and zero_key.
Referenced by scanOpenWrite(), scanRemoveDone(), scanUpdateDone(), and scanVol().
int CacheVC::scanOpenWrite | ( | int | event, | |
Event * | e | |||
) |
Definition at line 387 of file CacheVol.cc.
References _action, AIO_EVENT_DONE, buf, CACHE_EVENT_SCAN_OPERATION_BLOCKED, CACHE_EVENT_SCAN_OPERATION_FAILED, CACHE_SCAN_RESULT_CONTINUE, CACHE_SCAN_RESULT_RETRY, CACHE_TRY_LOCK, cancel_trigger(), CacheHTTPInfoVector::clear(), Vol::close_write(), Action::continuation, CacheHTTPInfoVector::count(), Debug, dir, dir_assign, dir_probe(), dir_set_tag, do_write_call(), EVENT_IMMEDIATE, EVENT_RETURN, f, first_key, CacheHTTPInfoVector::get(), Continuation::handleEvent(), header_len, ink_assert, CacheHTTPInfoVector::insert(), Doc::key, Doc::len, CacheHTTPInfoVector::marshal_length(), Continuation::mutex, od, offset, Vol::open_write(), Vol::round_to_approx_size(), scan_msec_delay, SCAN_WRITER_LOCK_MAX_RETRY, scanObject(), scanUpdateDone(), SET_HANDLER, SIZEOF_DIR, ats::CryptoHash::slice32(), Doc::total_len, VC_SCHED_LOCK_RETRY, vector, vol, write_vector, and writer_lock_retry.
Referenced by scanObject().
int CacheVC::scanRemoveDone | ( | int | event, | |
Event * | e | |||
) |
Definition at line 375 of file CacheVol.cc.
References alternate, Debug, EVENT_IMMEDIATE, Continuation::handleEvent(), scanObject(), and SET_HANDLER.
Referenced by scanObject().
int CacheVC::scanUpdateDone | ( | int | event, | |
Event * | e | |||
) |
Definition at line 474 of file CacheVol.cc.
References cache_config_mutex_retry_delay, CACHE_TRY_LOCK, cancel_trigger(), Vol::close_write(), Debug, dir, dir_insert(), dir_overwrite(), EVENT_IMMEDIATE, first_key, Continuation::handleEvent(), HRTIME_MSECONDS, ink_assert, Continuation::mutex, od, Vol::open_read(), scanObject(), SET_HANDLER, and vol.
Referenced by scanOpenWrite().
int CacheVC::scanVol | ( | int | event, | |
Event * | e | |||
) |
Definition at line 56 of file CacheVol.cc.
References _action, CACHE_EVENT_SCAN_DONE, Action::cancelled, Action::continuation, Debug, eventProcessor, fragment, free_CacheVC(), CacheHostTable::gen_host_rec, Continuation::handleEvent(), host_len, hostname, Cache::hosttable, HRTIME_MSECONDS, CacheHostTable::Match(), CacheHostRecord::num_vols, CacheHostResult::record, scan_msec_delay, scanObject(), EventProcessor::schedule_in(), SET_HANDLER, theCache, vol, and CacheHostRecord::vols.
Referenced by Cache::scan(), and scanObject().
void CacheVC::set_agg_write_in_progress | ( | ) | [inline] |
Definition at line 347 of file P_CacheInternal.h.
References ink_aiocb::aio_fildes, AIOCallback::aiocb, and io.
Referenced by handleWrite(), and handleWriteLock().
bool CacheVC::set_data | ( | int | id, | |
void * | data | |||
) | [virtual] |
Convenience function to set information into the VConnection.
This function is provided as a convenience for state machines to transmit information from/to a VConnection without breaking the VConnection abstraction. Its behavior varies depending on the type of VConnection being used.
id | Identifier associated to interpret the data field. | |
data | Value or pointer with state machine or VConnection data. |
Reimplemented from VConnection.
Definition at line 436 of file Cache.cc.
References ink_assert.
bool CacheVC::set_disk_io_priority | ( | int | priority | ) | [virtual] |
Implements CacheVConnection.
Definition at line 491 of file Cache.cc.
References AIO_LOWEST_PRIORITY, ink_aiocb::aio_reqprio, AIOCallback::aiocb, ink_assert, and io.
Referenced by set_channel_priority_ClusterFunction().
int CacheVC::set_header | ( | void * | ptr, | |
int | len | |||
) | [inline, virtual] |
Implements CacheVConnection.
Definition at line 264 of file P_CacheInternal.h.
References header_to_write, and header_to_write_len.
void CacheVC::set_io_not_in_progress | ( | ) | [inline] |
Definition at line 343 of file P_CacheInternal.h.
References ink_aiocb::aio_fildes, AIOCallback::aiocb, and io.
Referenced by derefRead(), handleReadDone(), linkWrite(), openReadClose(), openReadReadDone(), openReadStartEarliest(), openReadStartHead(), openWriteClose(), openWriteCloseDataDone(), openWriteCloseHeadDone(), openWriteOverwrite(), openWriteWriteDone(), removeEvent(), and scanObject().
bool CacheVC::set_pin_in_cache | ( | time_t | time_pin | ) | [virtual] |
Implements CacheVConnection.
Definition at line 477 of file Cache.cc.
References ink_assert, VIO::op, pin_in_cache, total_len, vio, and VIO::WRITE.
Referenced by set_channel_pin_ClusterFunction().
int CacheVC::updateReadDone | ( | int | event, | |
Event * | e | |||
) |
int CacheVC::updateVector | ( | int | event, | |
Event * | e | |||
) |
Referenced by openWriteClose(), and openWriteCloseHead().
int CacheVC::updateVecWrite | ( | int | event, | |
Event * | e | |||
) |
TS_INLINE bool CacheVC::writer_done | ( | ) |
Definition at line 787 of file P_CacheInternal.h.
References first_key, od, Vol::open_read(), start_time, vol, and write_vc.
Referenced by openReadFromWriter(), openReadMain(), and openReadReadDone().
union { ... } |
Definition at line 398 of file P_CacheInternal.h.
Referenced by callcont(), Cache::deref(), derefRead(), free_CacheVC(), Cache::link(), linkWrite(), Cache::lookup(), new_CacheVC(), Cache::open_read(), Cache::open_write(), openReadFromWriter(), openReadFromWriterFailure(), openReadStartEarliest(), openReadStartHead(), openWriteOverwrite(), openWriteStartBegin(), Cache::remove(), removeEvent(), Cache::scan(), scanObject(), scanOpenWrite(), and scanVol().
uint32_t CacheVC::agg_len |
Definition at line 436 of file P_CacheInternal.h.
Referenced by agg_copy(), Vol::aggWrite(), Vol::evacuateWrite(), and handleWrite().
Definition at line 403 of file P_CacheInternal.h.
Referenced by die(), free_CacheVC(), get_data(), openReadChooseWriter(), openReadFromWriter(), openReadMain(), openReadStartEarliest(), openReadStartHead(), openWriteCloseDataDone(), openWriteWriteDone(), scanObject(), and scanRemoveDone().
Definition at line 411 of file P_CacheInternal.h.
Referenced by agg_copy(), evacuateReadHead(), free_CacheVC(), openReadChooseWriter(), openReadStartEarliest(), openReadStartHead(), openWriteCloseDir(), and scanObject().
Definition at line 445 of file P_CacheInternal.h.
Referenced by free_CacheVC(), handleWrite(), Cache::lookup(), new_DocEvacuator(), Cache::open_read(), Cache::open_write(), openWriteStartBegin(), Cache::remove(), Cache::scan(), and TSVConnCacheHttpInfoSet().
Definition at line 406 of file P_CacheInternal.h.
Referenced by agg_copy(), free_CacheVC(), openReadFromWriter(), openWriteCloseDataDone(), openWriteMain(), and openWriteWriteDone().
Definition at line 404 of file P_CacheInternal.h.
Referenced by agg_copy(), derefRead(), Vol::evac_range(), evacuateDocDone(), Vol::evacuateDocReadDone(), evacuateReadHead(), Vol::evacuateWrite(), free_CacheVC(), Cache::link(), new_DocEvacuator(), openReadMain(), openReadReadDone(), openReadStartEarliest(), openReadStartHead(), openWriteOverwrite(), Cache::scan(), scanObject(), and scanOpenWrite().
unsigned int CacheVC::close_complete |
Definition at line 477 of file P_CacheInternal.h.
int CacheVC::closed |
Definition at line 447 of file P_CacheInternal.h.
Referenced by callcont(), calluser(), do_io_close(), free_CacheVC(), openReadChooseWriter(), openReadClose(), openReadFromWriter(), openWriteClose(), openWriteCloseDir(), openWriteMain(), and openWriteWriteDone().
unsigned int CacheVC::data_done |
Definition at line 487 of file P_CacheInternal.h.
Definition at line 391 of file P_CacheInternal.h.
Referenced by agg_copy(), Cache::deref(), derefRead(), do_read_call(), evacuateDocDone(), evacuateReadHead(), handleRead(), handleReadDone(), linkWrite(), new_CacheVC(), Cache::open_read(), openReadMain(), openReadReadDone(), openReadStartEarliest(), openReadStartHead(), openWriteCloseDataDone(), openWriteCloseHeadDone(), openWriteOverwrite(), openWriteWriteDone(), Cache::remove(), removeEvent(), scanObject(), scanOpenWrite(), and scanUpdateDone().
unsigned int CacheVC::doc_from_ram_cache |
Definition at line 492 of file P_CacheInternal.h.
uint64_t CacheVC::doc_len |
Definition at line 455 of file P_CacheInternal.h.
Referenced by evacuateDocDone(), evacuateReadHead(), handleReadDone(), openReadFromWriter(), openReadFromWriterMain(), openReadMain(), openReadReadDone(), openReadStartEarliest(), and openReadStartHead().
int64_t CacheVC::doc_pos |
Definition at line 452 of file P_CacheInternal.h.
Referenced by do_read_call(), openReadFromWriter(), openReadMain(), openReadReadDone(), openReadStartEarliest(), and openReadStartHead().
Definition at line 391 of file P_CacheInternal.h.
Referenced by Vol::begin_read(), Vol::close_read(), evacuateDocDone(), openReadClose(), openReadFromWriter(), openReadMain(), openReadReadDone(), openReadStartEarliest(), openReadStartHead(), openWriteCloseDataDone(), openWriteCloseDir(), openWriteWriteDone(), and scanObject().
Definition at line 390 of file P_CacheInternal.h.
Referenced by agg_copy(), Vol::begin_read(), die(), Vol::evacuateDocReadDone(), evacuateReadHead(), Cache::link(), new_DocEvacuator(), Cache::open_read(), Cache::open_write(), openReadChooseWriter(), openReadFromWriter(), openReadMain(), openReadReadDone(), openReadStartEarliest(), openReadStartHead(), openWriteCloseDataDone(), openWriteCloseDir(), openWriteCloseHeadDone(), openWriteWriteDone(), and scanObject().
unsigned int CacheVC::evac_vector |
Definition at line 481 of file P_CacheInternal.h.
unsigned int CacheVC::evacuator |
Definition at line 479 of file P_CacheInternal.h.
struct { ... } CacheVC::f |
Referenced by agg_copy(), Vol::aggWrite(), Vol::begin_read(), Vol::begin_read_lock(), die(), do_read_call(), Vol::evacuateWrite(), free_CacheVC(), get_data(), handleRead(), handleReadDone(), handleWrite(), is_pread_capable(), is_ram_cache_hit(), Cache::link(), Cache::lookup(), new_DocEvacuator(), Vol::open_write(), Cache::open_write(), openReadChooseWriter(), openReadClose(), openReadFromWriter(), openReadStartEarliest(), openReadStartHead(), openWriteClose(), openWriteCloseDataDone(), openWriteCloseDir(), openWriteCloseHead(), openWriteCloseHeadDone(), openWriteMain(), openWriteStartBegin(), Cache::remove(), removeEvent(), scanObject(), scanOpenWrite(), and OpenDir::signal_readers().
Definition at line 405 of file P_CacheInternal.h.
Referenced by agg_copy(), free_CacheVC(), get_header(), get_single_data(), ShowCache::handleCacheEvent(), openReadFromWriter(), openReadStartEarliest(), openReadStartHead(), and openWriteOverwrite().
Definition at line 391 of file P_CacheInternal.h.
Referenced by openReadClose(), openReadFromWriter(), openReadStartEarliest(), and openReadStartHead().
Definition at line 390 of file P_CacheInternal.h.
Referenced by agg_copy(), Vol::aggWrite(), OpenDir::close_write(), Cache::deref(), derefRead(), evacuateDocDone(), evacuateReadHead(), Cache::link(), linkWrite(), Cache::lookup(), Cache::open_read(), Vol::open_write(), Cache::open_write(), OpenDir::open_write(), openReadChooseWriter(), openReadFromWriter(), openReadFromWriterMain(), openReadMain(), openReadReadDone(), openReadStartEarliest(), openWriteCloseDir(), openWriteCloseHeadDone(), openWriteOverwrite(), openWriteWriteDone(), Cache::remove(), scanObject(), scanOpenWrite(), scanUpdateDone(), and writer_done().
uint32_t CacheVC::flags |
Definition at line 472 of file P_CacheInternal.h.
Definition at line 434 of file P_CacheInternal.h.
Referenced by agg_copy(), and handleWrite().
Definition at line 427 of file P_CacheInternal.h.
Referenced by agg_copy(), Cache::lookup(), Cache::open_read(), Cache::open_write(), openReadChooseWriter(), openReadFromWriter(), openReadStartEarliest(), openReadStartHead(), openWriteCloseHead(), openWriteCloseHeadDone(), Cache::remove(), and scanObject().
Definition at line 457 of file P_CacheInternal.h.
Referenced by agg_copy(), openReadFromWriter(), openReadMain(), openReadReadDone(), openWriteClose(), openWriteCloseDataDone(), openWriteCloseDir(), openWriteCloseHead(), openWriteWriteDone(), scanObject(), and scanVol().
Definition at line 433 of file P_CacheInternal.h.
Referenced by agg_copy(), handleWrite(), openReadStartEarliest(), openWriteCloseHead(), and scanOpenWrite().
void* CacheVC::header_to_write |
Definition at line 463 of file P_CacheInternal.h.
Referenced by agg_copy(), and set_header().
Definition at line 462 of file P_CacheInternal.h.
Referenced by openWriteCloseHead(), and set_header().
unsigned int CacheVC::hit_evacuate |
Definition at line 493 of file P_CacheInternal.h.
Definition at line 461 of file P_CacheInternal.h.
Referenced by Cache::scan(), and scanVol().
char* CacheVC::hostname |
Definition at line 460 of file P_CacheInternal.h.
Referenced by Cache::scan(), and scanVol().
Definition at line 428 of file P_CacheInternal.h.
Referenced by Cache::open_write().
Definition at line 426 of file P_CacheInternal.h.
Referenced by Vol::aggWrite(), Vol::aggWriteDone(), and new_CacheVC().
Definition at line 410 of file P_CacheInternal.h.
Referenced by derefRead(), do_read_call(), evacuateReadHead(), free_CacheVC(), get_disk_io_priority(), handleRead(), handleReadDone(), handleWrite(), is_io_in_progress(), linkWrite(), openReadFromWriter(), openReadReadDone(), openReadStartEarliest(), openReadStartHead(), openWriteClose(), openWriteCloseDataDone(), openWriteCloseHead(), openWriteCloseHeadDone(), openWriteOverwrite(), openWriteWriteDone(), removeEvent(), scanObject(), set_agg_write_in_progress(), set_disk_io_priority(), and set_io_not_in_progress().
Definition at line 390 of file P_CacheInternal.h.
Referenced by agg_copy(), Cache::deref(), derefRead(), evacuateDocDone(), Vol::evacuateDocReadDone(), Cache::lookup(), Cache::open_read(), Cache::open_write(), openWriteCloseDataDone(), openWriteWriteDone(), Cache::remove(), removeEvent(), and scanObject().
Definition at line 439 of file P_CacheInternal.h.
Referenced by Cache::deref(), derefRead(), evacuateDocDone(), evacuateReadHead(), Cache::lookup(), Cache::open_read(), openWriteOverwrite(), removeEvent(), and scanObject().
int64_t CacheVC::length |
Definition at line 451 of file P_CacheInternal.h.
Referenced by openReadFromWriter(), openReadFromWriterMain(), openWriteClose(), openWriteCloseDataDone(), openWriteCloseHead(), openWriteMain(), and openWriteWriteDone().
unsigned int CacheVC::lookup |
Definition at line 482 of file P_CacheInternal.h.
unsigned int CacheVC::not_from_ram_cache |
Definition at line 489 of file P_CacheInternal.h.
OpenDirEntry* CacheVC::od |
Definition at line 409 of file P_CacheInternal.h.
Referenced by OpenDir::close_write(), do_read_call(), free_CacheVC(), Cache::open_read(), OpenDir::open_write(), openWriteCloseHeadDone(), openWriteOverwrite(), removeEvent(), scanOpenWrite(), scanUpdateDone(), and writer_done().
int64_t CacheVC::offset |
Definition at line 449 of file P_CacheInternal.h.
Referenced by agg_copy(), openReadFromWriter(), openWriteCloseDataDone(), openWriteMain(), openWriteWriteDone(), Cache::scan(), scanObject(), and scanOpenWrite().
unsigned int CacheVC::open_read_timeout |
Definition at line 486 of file P_CacheInternal.h.
unsigned int CacheVC::overwrite |
Definition at line 476 of file P_CacheInternal.h.
Definition at line 391 of file P_CacheInternal.h.
Referenced by agg_copy(), Vol::evac_range(), evacuateDocDone(), and Vol::evacuateDocReadDone().
uint32_t CacheVC::pin_in_cache |
Definition at line 443 of file P_CacheInternal.h.
Referenced by agg_copy(), get_pin_in_cache(), Cache::open_write(), and set_pin_in_cache().
unsigned int CacheVC::read_from_writer_called |
Definition at line 488 of file P_CacheInternal.h.
Definition at line 441 of file P_CacheInternal.h.
Referenced by do_read_call(), handleRead(), and handleReadDone().
unsigned int CacheVC::readers |
Definition at line 491 of file P_CacheInternal.h.
Definition at line 446 of file P_CacheInternal.h.
Referenced by callcont(), calluser(), die(), do_io_close(), do_io_pread(), do_io_read(), do_io_write(), openWriteCloseDir(), and reenable_re().
unsigned int CacheVC::remove |
Definition at line 484 of file P_CacheInternal.h.
unsigned int CacheVC::remove_aborted_writers |
Definition at line 485 of file P_CacheInternal.h.
unsigned int CacheVC::rewrite_resident_alt |
Definition at line 490 of file P_CacheInternal.h.
Definition at line 442 of file P_CacheInternal.h.
Referenced by die().
Definition at line 510 of file P_CacheInternal.h.
Referenced by scanObject().
Definition at line 458 of file P_CacheInternal.h.
Referenced by Cache::scan(), scanObject(), scanOpenWrite(), and scanVol().
char* CacheVC::scan_vol_map |
Definition at line 507 of file P_CacheInternal.h.
Referenced by free_CacheVC(), and scanObject().
uint64_t CacheVC::seek_to |
Definition at line 448 of file P_CacheInternal.h.
Referenced by do_io_pread(), openReadFromWriterMain(), and openReadMain().
unsigned int CacheVC::single_fragment |
Definition at line 480 of file P_CacheInternal.h.
int CacheVC::size_to_init = -1 [static] |
Definition at line 383 of file P_CacheInternal.h.
Referenced by CacheVC(), and free_CacheVC().
Definition at line 444 of file P_CacheInternal.h.
Referenced by new_CacheVC(), openReadChooseWriter(), openReadFromWriter(), and writer_done().
unsigned int CacheVC::sync |
Definition at line 478 of file P_CacheInternal.h.
uint64_t CacheVC::total_len |
Definition at line 454 of file P_CacheInternal.h.
Referenced by agg_copy(), die(), evacuateDocDone(), evacuateReadHead(), openReadFromWriter(), openReadStartEarliest(), openWriteClose(), openWriteCloseDir(), openWriteCloseHead(), openWriteMain(), and set_pin_in_cache().
Definition at line 440 of file P_CacheInternal.h.
Referenced by cancel_trigger(), do_io_pread(), do_io_read(), do_io_write(), free_CacheVC(), handleWrite(), handleWriteLock(), new_CacheVC(), Cache::open_write(), reenable(), and reenable_re().
unsigned int CacheVC::update |
Definition at line 483 of file P_CacheInternal.h.
Definition at line 390 of file P_CacheInternal.h.
Referenced by openReadChooseWriter(), openReadFromWriter(), and openWriteCloseDir().
uint64_t CacheVC::update_len |
Definition at line 456 of file P_CacheInternal.h.
unsigned int CacheVC::use_first_key |
Definition at line 475 of file P_CacheInternal.h.
Definition at line 402 of file P_CacheInternal.h.
Referenced by evacuateReadHead(), free_CacheVC(), ShowCache::handleCacheEvent(), new_CacheVC(), openReadChooseWriter(), openReadFromWriter(), openReadFromWriterFailure(), openReadStartHead(), scanObject(), and scanOpenWrite().
Definition at line 425 of file P_CacheInternal.h.
Referenced by CacheVC(), callcont(), calluser(), die(), do_io_pread(), do_io_read(), do_io_write(), do_read_call(), free_CacheVC(), handleReadDone(), handleWrite(), is_ram_cache_hit(), Cache::lookup(), Cache::open_read(), Cache::open_write(), openReadFromWriter(), openReadFromWriterMain(), openReadMain(), openReadReadDone(), openReadStartEarliest(), openWriteCloseDir(), openWriteMain(), reenable(), Cache::remove(), and set_pin_in_cache().
Definition at line 438 of file P_CacheInternal.h.
Referenced by agg_copy(), callcont(), calluser(), OpenDir::close_write(), Cache::deref(), derefRead(), do_read_call(), evacuateDocDone(), evacuateReadHead(), free_CacheVC(), ShowCache::handleCacheEvent(), handleRead(), handleReadDone(), handleWrite(), handleWriteLock(), Cache::link(), linkWrite(), Cache::lookup(), new_DocEvacuator(), Cache::open_read(), Cache::open_write(), OpenDir::open_write(), openWriteCloseDataDone(), openWriteCloseDir(), openWriteCloseHeadDone(), openWriteOverwrite(), openWriteStartBegin(), openWriteWriteDone(), Cache::remove(), removeEvent(), Cache::scan(), scanObject(), scanOpenWrite(), scanUpdateDone(), scanVol(), and writer_done().
uint32_t CacheVC::write_len |
Definition at line 435 of file P_CacheInternal.h.
Referenced by agg_copy(), handleWrite(), Cache::link(), openReadStartEarliest(), openWriteClose(), openWriteCloseDataDone(), openWriteCloseHead(), openWriteMain(), openWriteWriteDone(), and scanObject().
uint64_t CacheVC::write_pos |
Definition at line 453 of file P_CacheInternal.h.
Referenced by openWriteCloseDataDone(), and openWriteWriteDone().
uint32_t CacheVC::write_serial |
Definition at line 437 of file P_CacheInternal.h.
Referenced by agg_copy(), Vol::aggWrite(), and Vol::aggWriteDone().
Definition at line 459 of file P_CacheInternal.h.
Referenced by openReadChooseWriter(), openReadFromWriter(), openReadMain(), openReadReadDone(), openReadStartEarliest(), and writer_done().
Definition at line 429 of file P_CacheInternal.h.
Referenced by agg_copy(), OpenDir::open_write(), openReadChooseWriter(), openReadStartEarliest(), and scanOpenWrite().
Definition at line 407 of file P_CacheInternal.h.
Referenced by free_CacheVC(), openReadFromWriter(), and openReadFromWriterMain().
Definition at line 464 of file P_CacheInternal.h.
Referenced by openReadFromWriter(), openReadMain(), scanObject(), and scanOpenWrite().
int64_t CacheVC::writer_offset |
Definition at line 450 of file P_CacheInternal.h.
Referenced by openReadFromWriter(), and openReadFromWriterMain().