MCPcopy Create free account
hub / github.com/apache/trafficserver / loadDir

Method loadDir

src/traffic_cache_tool/CacheDefs.cc:620–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618}
619
620Errata
621StripeSM::loadDir()
622{
623 Errata zret;
624 int64_t dirlen = this->vol_dirlen();
625 char *raw_dir = static_cast<char *>(ats_memalign(ats_pagesize(), dirlen));
626 dir = reinterpret_cast<CacheDirEntry *>(raw_dir + this->vol_headerlen());
627 // read directory
628 ssize_t n = pread(this->_span->_fd, raw_dir, dirlen, this->_start);
629 if (n < dirlen) {
630 std::cout << "Failed to read Dir from stripe @" << this->hashText;
631 }
632 return zret;
633}
634//
635// Cache Directory
636//

Callers 5

dir_checkMethod · 0.95
walk_bucket_chainFunction · 0.80
Check_FreelistFunction · 0.80
Get_ResponseFunction · 0.80
scan_spanFunction · 0.80

Calls 4

vol_dirlenMethod · 0.95
vol_headerlenMethod · 0.95
ats_memalignFunction · 0.85
ats_pagesizeFunction · 0.85

Tested by

no test coverage detected