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

Method dir_init_segment

src/traffic_cache_tool/CacheDefs.cc:588–601  ·  view source on GitHub ↗

adds all the directory entries in a segment to the segment freelist

Source from the content-addressed store, hash-verified

586// adds all the directory entries
587// in a segment to the segment freelist
588void
589StripeSM::dir_init_segment(int s)
590{
591 this->freelist[s] = 0;
592 CacheDirEntry *seg = this->dir_segment(s);
593 int l, b;
594 memset(seg, 0, SIZEOF_DIR * DIR_DEPTH * this->_buckets);
595 for (l = 1; l < DIR_DEPTH; l++) {
596 for (b = 0; b < this->_buckets; b++) {
597 CacheDirEntry *bucket = dir_bucket(b, seg);
598 this->dir_free_entry(dir_bucket_row(bucket, l), s);
599 }
600 }
601}
602
603void
604StripeSM::init_dir()

Callers 1

check_loopMethod · 0.95

Calls 5

dir_segmentMethod · 0.95
dir_free_entryMethod · 0.95
memsetFunction · 0.85
dir_bucketFunction · 0.70
dir_bucket_rowFunction · 0.70

Tested by

no test coverage detected