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

Function dir_from_offset

src/traffic_cache_tool/CacheDefs.h:400–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398#define dir_in_seg(_s, _i) ((CacheDirEntry *)(((char *)(_s)) + (SIZEOF_DIR * (_i))))
399
400inline CacheDirEntry *
401dir_from_offset(int64_t i, CacheDirEntry *seg)
402{
403#if DIR_DEPTH < 5
404 if (!i)
405 return nullptr;
406 return dir_in_seg(seg, i);
407#else
408 i = i + ((i - 1) / (DIR_DEPTH - 1));
409 return dir_in_seg(seg, i);
410#endif
411}
412
413inline CacheDirEntry *
414dir_bucket(int64_t b, CacheDirEntry *seg)

Callers 5

next_dirFunction · 0.70
dir_delete_entryMethod · 0.70
dir_free_entryMethod · 0.70
dir_freelist_lengthMethod · 0.70
check_loopMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected