Defines | Functions | Variables

CacheDir.cc File Reference

A brief file description. More...

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

Go to the source code of this file.

Defines

#define CACHE_INC_DIR_USED(_m)
#define CACHE_DEC_DIR_USED(_m)
#define CACHE_INC_DIR_COLLISIONS(_m)
#define HIST_DEPTH   8

Functions

int dir_bucket_loop_check (Dir *start_dir, Dir *seg)
void dir_init_segment (int s, Vol *d)
int dir_bucket_loop_fix (Dir *start_dir, int s, Vol *d)
int dir_freelist_length (Vol *d, int s)
int dir_bucket_length (Dir *b, int s, Vol *d)
int check_dir (Vol *d)
void unlink_from_freelist (Dir *e, int s, Vol *d)
Dirdir_delete_entry (Dir *e, Dir *p, int s, Vol *d)
void dir_clean_bucket (Dir *b, int s, Vol *vol)
void dir_clean_segment (int s, Vol *d)
void dir_clean_vol (Vol *d)
void dir_clear_range (off_t start, off_t end, Vol *vol)
void check_bucket_not_contains (Dir *b, Dir *e, Dir *seg)
void freelist_clean (int s, Vol *vol)
Dirfreelist_pop (int s, Vol *d)
int dir_segment_accounted (int s, Vol *d, int offby, int *f, int *u, int *et, int *v, int *av, int *as)
void dir_free_entry (Dir *e, int s, Vol *d)
int dir_probe (CacheKey *key, Vol *d, Dir *result, Dir **last_collision)
int dir_insert (CacheKey *key, Vol *d, Dir *to_part)
int dir_overwrite (CacheKey *key, Vol *d, Dir *dir, Dir *overwrite, bool must_overwrite)
int dir_delete (CacheKey *key, Vol *d, Dir *del)
int dir_lookaside_probe (CacheKey *key, Vol *d, Dir *result, EvacuationBlock **eblock)
int dir_lookaside_insert (EvacuationBlock *eblock, Vol *d, Dir *to)
int dir_lookaside_fixup (CacheKey *key, Vol *d)
void dir_lookaside_cleanup (Vol *d)
void dir_lookaside_remove (CacheKey *key, Vol *d)
void dir_sync_init ()
uint64_t dir_entries_used (Vol *d)
void sync_cache_dir_on_shutdown (void)
void regress_rand_init (unsigned int i)
void regress_rand_CacheKey (CacheKey *key)
void dir_corrupt_bucket (Dir *b, int s, Vol *d)
EXCLUSIVE_REGRESSION_TEST() Cache_dir (RegressionTest *t, int, int *status)

Variables

ClassAllocator< OpenDirEntry > openDirEntryAllocator ("openDirEntry")
Dir empty_dir
uint8_t CacheKey_next_table [256]
uint8_t CacheKey_prev_table [256]
unsigned int regress_rand_seed = 0

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 CacheDir.cc.


Define Documentation

#define CACHE_DEC_DIR_USED (   _m  ) 
Value:
do { \
ProxyMutex *mutex = _m; \
CACHE_DECREMENT_DYN_STAT(cache_direntries_used_stat); \
} while (0) \

Definition at line 38 of file CacheDir.cc.

Referenced by dir_clean_bucket(), dir_clear_range(), dir_delete(), dir_probe(), and freelist_clean().

#define CACHE_INC_DIR_COLLISIONS (   _m  ) 
Value:

Definition at line 43 of file CacheDir.cc.

Referenced by dir_probe().

#define CACHE_INC_DIR_USED (   _m  ) 
Value:
do { \
ProxyMutex *mutex = _m; \
CACHE_INCREMENT_DYN_STAT(cache_direntries_used_stat); \
} while (0) \

Definition at line 33 of file CacheDir.cc.

Referenced by dir_insert(), and dir_overwrite().

#define HIST_DEPTH   8

Definition at line 1240 of file CacheDir.cc.

Referenced by Vol::dir_check().


Function Documentation

EXCLUSIVE_REGRESSION_TEST() Cache_dir ( RegressionTest t,
int  ,
int *  status 
)
void check_bucket_not_contains ( Dir b,
Dir e,
Dir seg 
)

Definition at line 480 of file CacheDir.cc.

References ink_assert, and next_dir().

int check_dir ( Vol d  ) 
int dir_bucket_length ( Dir b,
int  s,
Vol d 
)

Definition at line 248 of file CacheDir.cc.

References dir_bucket_loop_fix(), dir_segment, and next_dir().

Referenced by Cache_dir(), check_dir(), dir_clean_bucket(), and dir_corrupt_bucket().

int dir_bucket_loop_check ( Dir start_dir,
Dir seg 
)

Definition at line 177 of file CacheDir.cc.

References next_dir().

Referenced by check_dir(), and dir_bucket_loop_fix().

int dir_bucket_loop_fix ( Dir start_dir,
int  s,
Vol d 
)
void dir_clean_bucket ( Dir b,
int  s,
Vol vol 
) [inline]
void dir_clean_segment ( int  s,
Vol d 
)
void dir_clean_vol ( Vol d  ) 

Definition at line 367 of file CacheDir.cc.

References CHECK_DIR, dir_clean_segment(), and Vol::segments.

Referenced by Vol::agg_wrap(), and dir_clear_range().

void dir_clear_range ( off_t  start,
off_t  end,
Vol vol 
)
void dir_corrupt_bucket ( Dir b,
int  s,
Vol d 
)

Definition at line 1408 of file CacheDir.cc.

References dir_bucket_length(), dir_segment, dir_set_next, dir_to_offset(), ink_release_assert, and next_dir().

Referenced by Cache_dir().

int dir_delete ( CacheKey key,
Vol d,
Dir del 
)
Dir* dir_delete_entry ( Dir e,
Dir p,
int  s,
Vol d 
) [inline]
uint64_t dir_entries_used ( Vol d  ) 
void dir_free_entry ( Dir e,
int  s,
Vol d 
)
int dir_freelist_length ( Vol d,
int  s 
)
void dir_init_segment ( int  s,
Vol d 
)
int dir_insert ( CacheKey key,
Vol d,
Dir to_part 
)
void dir_lookaside_cleanup ( Vol d  ) 
int dir_lookaside_fixup ( CacheKey key,
Vol d 
)
int dir_lookaside_insert ( EvacuationBlock eblock,
Vol d,
Dir to 
)
int dir_lookaside_probe ( CacheKey key,
Vol d,
Dir result,
EvacuationBlock **  eblock 
)
void dir_lookaside_remove ( CacheKey key,
Vol d 
)
int dir_overwrite ( CacheKey key,
Vol d,
Dir dir,
Dir overwrite,
bool  must_overwrite 
)
int dir_probe ( CacheKey key,
Vol d,
Dir result,
Dir **  last_collision 
)
int dir_segment_accounted ( int  s,
Vol d,
int  offby,
int *  f,
int *  u,
int *  et,
int *  v,
int *  av,
int *  as 
)
void dir_sync_init (  ) 
void freelist_clean ( int  s,
Vol vol 
)
Dir* freelist_pop ( int  s,
Vol d 
) [inline]
void regress_rand_CacheKey ( CacheKey key  ) 

Definition at line 1400 of file CacheDir.cc.

References next_rand().

Referenced by Cache_dir().

void regress_rand_init ( unsigned int  i  ) 

Definition at line 1394 of file CacheDir.cc.

Referenced by Cache_dir().

void sync_cache_dir_on_shutdown ( void   ) 
void unlink_from_freelist ( Dir e,
int  s,
Vol d 
) [inline]

Variable Documentation

uint8_t CacheKey_next_table[256]

Definition at line 1318 of file CacheDir.cc.

uint8_t CacheKey_prev_table[256]

Definition at line 1354 of file CacheDir.cc.

Definition at line 52 of file CacheDir.cc.

ClassAllocator<OpenDirEntry> openDirEntryAllocator("openDirEntry")
unsigned int regress_rand_seed = 0

Definition at line 1392 of file CacheDir.cc.