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

Method dir_freelist_length

src/traffic_cache_tool/CacheDefs.cc:671–685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

669#endif
670
671int
672StripeSM::dir_freelist_length(int s)
673{
674 int free = 0;
675 CacheDirEntry *seg = this->dir_segment(s);
676 CacheDirEntry *e = dir_from_offset(this->freelist[s], seg);
677 if (this->check_loop(s)) {
678 return (DIR_DEPTH - 1) * this->_buckets;
679 }
680 while (e) {
681 free++;
682 e = next_dir(e, seg);
683 }
684 return free;
685}
686
687int
688StripeSM::check_loop(int s)

Callers

nothing calls this directly

Calls 4

dir_segmentMethod · 0.95
check_loopMethod · 0.95
dir_from_offsetFunction · 0.70
next_dirFunction · 0.70

Tested by

no test coverage detected