Public Member Functions | Data Fields

Vol Struct Reference

#include <P_CacheVol.h>

Inherits Continuation.

Collaboration diagram for Vol:
Collaboration graph
[legend]

Public Member Functions

void cancel_trigger ()
int recover_data ()
int open_write (CacheVC *cont, int allow_if_writers, int max_writers)
int open_write_lock (CacheVC *cont, int allow_if_writers, int max_writers)
int close_write (CacheVC *cont)
int close_write_lock (CacheVC *cont)
int begin_read (CacheVC *cont)
int begin_read_lock (CacheVC *cont)
OpenDirEntry * open_read (CryptoHash *key)
OpenDirEntry * open_read_lock (CryptoHash *key, EThread *t)
int close_read (CacheVC *cont)
int close_read_lock (CacheVC *cont)
int clear_dir ()
int init (char *s, off_t blocks, off_t dir_skip, bool clear)
int handle_dir_clear (int event, void *data)
int handle_dir_read (int event, void *data)
int handle_recover_from_data (int event, void *data)
int handle_recover_write_dir (int event, void *data)
int handle_header_read (int event, void *data)
int dir_init_done (int event, void *data)
int dir_check (bool fix)
int db_check (bool fix)
int is_io_in_progress ()
int increment_generation ()
void set_io_not_in_progress ()
int aggWriteDone (int event, Event *e)
int aggWrite (int event, void *e)
void agg_wrap ()
int evacuateWrite (CacheVC *evacuator, int event, Event *e)
int evacuateDocReadDone (int event, Event *e)
int evacuateDoc (int event, Event *e)
int evac_range (off_t start, off_t end, int evac_phase)
void periodic_scan ()
void scan_for_pinned_documents ()
void evacuate_cleanup_blocks (int i)
void evacuate_cleanup ()
EvacuationBlockforce_evacuate_head (Dir *dir, int pinned)
int within_hit_evacuate_window (Dir *dir)
uint32_t round_to_approx_size (uint32_t l)
 Vol ()
 ~Vol ()

Data Fields

char * path
ats_scoped_str hash_text
CryptoHash hash_id
int fd
char * raw_dir
Dirdir
VolHeaderFooterheader
VolHeaderFooterfooter
int segments
off_t buckets
off_t recover_pos
off_t prev_recover_pos
off_t scan_pos
off_t skip
off_t start
off_t len
off_t data_blocks
int hit_evacuate_window
AIOCallbackInternal io
Queue< CacheVC,
Continuation::Link_link > 
agg
Queue< CacheVC,
Continuation::Link_link > 
stat_cache_vcs
Queue< CacheVC,
Continuation::Link_link > 
sync
char * agg_buffer
int agg_todo_size
int agg_buf_pos
Eventtrigger
OpenDir open_dir
RamCacheram_cache
int evacuate_size
DLL< EvacuationBlock > * evacuate
DLL< EvacuationBlocklookaside [LOOKASIDE_SIZE]
CacheVCdoc_evacuator
VolInitInfoinit_info
CacheDiskdisk
Cachecache
CacheVolcache_vol
uint32_t last_sync_serial
uint32_t last_write_serial
uint32_t sector_size
bool recover_wrapped
bool dir_sync_waiting
bool dir_sync_in_progress
bool writing_end_marker
CacheKey first_fragment_key
int64_t first_fragment_offset
Ptr< IOBufferDatafirst_fragment_data

Detailed Description

Definition at line 417 of file P_CacheVol.h.


Constructor & Destructor Documentation

Vol::Vol (  )  [inline]
Vol::~Vol (  )  [inline]

Definition at line 593 of file P_CacheVol.h.

References agg_buffer, and ats_memalign_free().


Member Function Documentation

void Vol::agg_wrap (  ) 
int Vol::aggWrite ( int  event,
void *  e 
)
int Vol::aggWriteDone ( int  event,
Event e 
)
int Vol::begin_read ( CacheVC cont  ) 
TS_INLINE int Vol::begin_read_lock ( CacheVC cont  ) 

Definition at line 878 of file P_CacheInternal.h.

References begin_read(), CACHE_TRY_LOCK, CacheVC::f, and Continuation::mutex.

TS_INLINE void Vol::cancel_trigger (  ) 

Definition at line 825 of file P_CacheVol.h.

References Action::cancel_action(), and trigger.

Referenced by aggWrite(), aggWriteDone(), and evacuateDocReadDone().

int Vol::clear_dir (  ) 
int Vol::close_read ( CacheVC cont  ) 
TS_INLINE int Vol::close_read_lock ( CacheVC cont  ) 

Definition at line 894 of file P_CacheInternal.h.

References CACHE_TRY_LOCK, close_read(), and Continuation::mutex.

TS_INLINE int Vol::close_write ( CacheVC cont  ) 
TS_INLINE int Vol::close_write_lock ( CacheVC cont  ) 

Definition at line 849 of file P_CacheInternal.h.

References CACHE_TRY_LOCK, close_write(), and Continuation::mutex.

int Vol::db_check ( bool  fix  ) 
int Vol::dir_check ( bool  fix  ) 
int Vol::dir_init_done ( int  event,
void *  data 
)
int Vol::evac_range ( off_t  start,
off_t  end,
int  evac_phase 
)
void Vol::evacuate_cleanup (  ) 
void Vol::evacuate_cleanup_blocks ( int  i  )  [inline]
int Vol::evacuateDoc ( int  event,
Event e 
)
int Vol::evacuateDocReadDone ( int  event,
Event e 
)
int Vol::evacuateWrite ( CacheVC evacuator,
int  event,
Event e 
)
EvacuationBlock * Vol::force_evacuate_head ( Dir dir,
int  pinned 
)
int Vol::handle_dir_clear ( int  event,
void *  data 
)
int Vol::handle_dir_read ( int  event,
void *  data 
)
int Vol::handle_header_read ( int  event,
void *  data 
)
int Vol::handle_recover_from_data ( int  event,
void *  data 
)
int Vol::handle_recover_write_dir ( int  event,
void *  data 
)
int Vol::increment_generation (  )  [inline]
int Vol::init ( char *  s,
off_t  blocks,
off_t  dir_skip,
bool  clear 
)
int Vol::is_io_in_progress (  )  [inline]
TS_INLINE OpenDirEntry * Vol::open_read ( CryptoHash *  key  ) 
OpenDirEntry* Vol::open_read_lock ( CryptoHash *  key,
EThread t 
)
TS_INLINE int Vol::open_write ( CacheVC cont,
int  allow_if_writers,
int  max_writers 
)
TS_INLINE int Vol::open_write_lock ( CacheVC cont,
int  allow_if_writers,
int  max_writers 
)
void Vol::periodic_scan (  ) 
int Vol::recover_data (  ) 

Definition at line 1423 of file Cache.cc.

References EVENT_IMMEDIATE, handle_recover_from_data(), and SET_HANDLER.

Referenced by handle_dir_read().

TS_INLINE uint32_t Vol::round_to_approx_size ( uint32_t  l  ) 
void Vol::scan_for_pinned_documents (  ) 
void Vol::set_io_not_in_progress (  )  [inline]
TS_INLINE int Vol::within_hit_evacuate_window ( Dir dir  ) 

Field Documentation

Queue<CacheVC, Continuation::Link_link> Vol::agg
off_t Vol::buckets

Definition at line 459 of file P_CacheVol.h.

Referenced by dir_init_done(), and Cache::open().

Definition at line 460 of file P_CacheVol.h.

Referenced by ShowCache::handleCacheEvent(), and Cache::open().

Definition at line 425 of file P_CacheVol.h.

Referenced by init(), scan_for_pinned_documents(), and vol_dir_segment().

Definition at line 466 of file P_CacheVol.h.

Referenced by CacheSync::mainEvent(), and sync_cache_dir_on_shutdown().

Definition at line 465 of file P_CacheVol.h.

Referenced by aggWrite(), aggWriteDone(), and CacheSync::mainEvent().

Definition at line 454 of file P_CacheVol.h.

Referenced by evac_range(), and evacuateDocReadDone().

Definition at line 451 of file P_CacheVol.h.

Referenced by evacuate_cleanup(), and init().

int Vol::fd

Definition at line 471 of file P_CacheVol.h.

Referenced by CacheVC::handleRead(), and CacheVC::handleReadDone().

Definition at line 469 of file P_CacheVol.h.

Referenced by CacheVC::handleRead(), and CacheVC::handleReadDone().

Definition at line 470 of file P_CacheVol.h.

Referenced by CacheVC::handleRead(), and CacheVC::handleReadDone().

CryptoHash Vol::hash_id

Definition at line 421 of file P_CacheVol.h.

Referenced by build_vol_hash_table(), cache_disk_replacement_stability(), and init().

ats_scoped_str Vol::hash_text

Definition at line 461 of file P_CacheVol.h.

Referenced by handle_recover_from_data().

Definition at line 462 of file P_CacheVol.h.

Referenced by handle_recover_from_data().

off_t Vol::len

Definition at line 449 of file P_CacheVol.h.

Referenced by close_write(), open_read(), open_write(), and Vol().

char* Vol::path

Definition at line 431 of file P_CacheVol.h.

Referenced by handle_recover_from_data(), and init().

char* Vol::raw_dir

Definition at line 430 of file P_CacheVol.h.

Referenced by handle_recover_from_data().

Definition at line 464 of file P_CacheVol.h.

Referenced by handle_recover_from_data().

uint32_t Vol::sector_size

Definition at line 463 of file P_CacheVol.h.

Referenced by handle_dir_read(), CacheVC::handleReadDone(), and vol_clear_init().

off_t Vol::skip
off_t Vol::start
Queue<CacheVC, Continuation::Link_link> Vol::stat_cache_vcs

Definition at line 441 of file P_CacheVol.h.

Referenced by begin_read(), close_read(), close_write(), and open_write().

Queue<CacheVC, Continuation::Link_link> Vol::sync

Definition at line 442 of file P_CacheVol.h.

Referenced by aggWrite(), aggWriteDone(), and CacheSync::mainEvent().

Definition at line 447 of file P_CacheVol.h.

Referenced by cancel_trigger().

Definition at line 467 of file P_CacheVol.h.


The documentation for this struct was generated from the following files: