#include <I_Store.h>
Public Member Functions | |
SLINK (Span, link) | |
bool | is_mmapable () |
void | set_mmapable (bool s) |
int64_t | size () |
int64_t | total_blocks () |
Span * | nth (int i) |
int | paths () |
int | write (int fd) |
int | read (int fd) |
Span * | dup () |
Duplicate this span and all chained spans. | |
int64_t | end () |
const char * | init (char *n, int64_t size) |
int | path (char *filename, int64_t *offset, char *buf, int buflen) |
void | hash_base_string_set (char const *s) |
Set the hash seed string. | |
void | volume_number_set (int n) |
Set the volume number. | |
Span () | |
Span (Span const &that) | |
Copy constructor. | |
~Span () | |
Data Fields | |
int64_t | blocks |
int64_t | offset |
int | hw_sector_size |
int | alignment |
int | disk_id |
int | forced_volume_num |
Force span in to specific volume. | |
bool | file_pathname |
bool | isRaw |
ats_scoped_str | pathname |
ats_scoped_str | hash_base_string |
Used to seed the stripe assignment hash. |
Definition at line 44 of file I_Store.h.
Span::Span | ( | Span const & | that | ) | [inline] |
Copy constructor.
Definition at line 121 of file I_Store.h.
References ats_strdup, hash_base_string, memcpy, and pathname.
Span * Span::dup | ( | ) |
int64_t Span::end | ( | ) | [inline] |
Definition at line 92 of file I_Store.h.
References blocks, and offset.
Referenced by Store::sort().
void Span::hash_base_string_set | ( | char const * | s | ) |
Set the hash seed string.
Definition at line 203 of file Store.cc.
References ats_strdup, and hash_base_string.
Referenced by Store::read_config().
const char* Span::init | ( | char * | n, | |
int64_t | size | |||
) |
Referenced by Store::read_config(), and HostDBCache::start().
bool Span::is_mmapable | ( | ) | [inline] |
Definition at line 63 of file I_Store.h.
Referenced by MultiCacheBase::mmap_region(), and write().
Span* Span::nth | ( | int | i | ) | [inline] |
Definition at line 75 of file I_Store.h.
Referenced by Store::clear(), MultiCacheBase::mmap_data(), and MultiCacheBase::mmap_region().
int Span::path | ( | char * | filename, | |
int64_t * | offset, | |||
char * | buf, | |||
int | buflen | |||
) |
Definition at line 186 of file Store.cc.
References file_pathname, ink_assert, ink_filepath_make(), ink_strlcpy(), and pathname.
Referenced by Store::clear(), and MultiCacheBase::mmap_data().
int Span::paths | ( | ) | [inline] |
Definition at line 82 of file I_Store.h.
Referenced by Store::clear(), MultiCacheBase::mmap_data(), and MultiCacheBase::mmap_region().
int Span::read | ( | int | fd | ) |
Definition at line 1037 of file Store.cc.
References ats_strdup, blocks, file_pathname, get_int64(), ink_file_fd_readline(), offset, PATH_NAME_MAX, pathname, and set_mmapable().
Referenced by Store::read().
void Span::set_mmapable | ( | bool | s | ) | [inline] |
Span::SLINK | ( | Span | , | |
link | ||||
) |
int64_t Span::total_blocks | ( | ) | [inline] |
void Span::volume_number_set | ( | int | n | ) |
Set the volume number.
Definition at line 209 of file Store.cc.
References forced_volume_num.
Referenced by Store::read_config().
int Span::write | ( | int | fd | ) |
Definition at line 975 of file Store.cc.
References blocks, file_pathname, ink_file_fd_writestring(), is_mmapable(), offset, and pathname.
Referenced by Store::write().
int Span::alignment |
Definition at line 49 of file I_Store.h.
Referenced by CacheProcessor::start_internal().
int64_t Span::blocks |
Definition at line 46 of file I_Store.h.
Referenced by Store::clear(), end(), MultiCacheBase::mmap_data(), MultiCacheBase::mmap_region(), read(), size(), Store::sort(), CacheProcessor::start_internal(), stealStore(), total_blocks(), try_alloc(), Store::try_realloc(), write(), and Store::write_config_data().
int Span::disk_id |
Definition at line 50 of file I_Store.h.
Referenced by Store::sort().
bool Span::file_pathname |
Definition at line 55 of file I_Store.h.
Referenced by Store::clear(), MultiCacheBase::mmap_data(), path(), read(), CacheProcessor::start_internal(), stealStore(), try_alloc(), and write().
Force span in to specific volume.
Definition at line 51 of file I_Store.h.
Referenced by CacheProcessor::start_internal(), and volume_number_set().
ats_scoped_str Span::hash_base_string |
Used to seed the stripe assignment hash.
Definition at line 60 of file I_Store.h.
Referenced by hash_base_string_set(), Span(), and CacheProcessor::start_internal().
Definition at line 48 of file I_Store.h.
Referenced by CacheProcessor::start_internal().
bool Span::isRaw |
int64_t Span::offset |
Definition at line 47 of file I_Store.h.
Referenced by Store::clear(), end(), MultiCacheBase::mmap_region(), read(), Store::sort(), CacheProcessor::start_internal(), stealStore(), try_alloc(), Store::try_realloc(), and write().
ats_scoped_str Span::pathname |
Definition at line 59 of file I_Store.h.
Referenced by path(), read(), Store::sort(), Span(), CacheProcessor::start_internal(), write(), and Store::write_config_data().