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

Function dir_to_offset

src/iocore/cache/P_CacheDir.h:360–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358}
359
360inline int64_t
361dir_to_offset(const Dir *d, const Dir *seg)
362{
363#if DIR_DEPTH < 5
364 return (reinterpret_cast<const char *>(d) - reinterpret_cast<const char *>(seg)) / SIZEOF_DIR;
365#else
366 int64_t i = static_cast<int64_t>((reinterpret_cast<const char *>(d) - reinterpret_cast<const char *>(seg)) / SIZEOF_DIR);
367 i = i - (i / DIR_DEPTH);
368 return i;
369#endif
370}
371
372inline Dir *
373dir_bucket(int64_t b, Dir *seg)

Callers 5

dir_delete_entryFunction · 0.70
dir_free_entryFunction · 0.70
dir_insertFunction · 0.70
dir_overwriteFunction · 0.70
dir_corrupt_bucketFunction · 0.50

Calls

no outgoing calls

Tested by 1

dir_corrupt_bucketFunction · 0.40