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

Function check_dir

src/iocore/cache/CacheDir.cc:283–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283int
284check_dir(Stripe *stripe)
285{
286 int i, s;
287 Dbg(dbg_ctl_cache_check_dir, "inside check dir");
288 for (s = 0; s < stripe->directory.segments; s++) {
289 Dir *seg = stripe->directory.get_segment(s);
290 for (i = 0; i < stripe->directory.buckets; i++) {
291 Dir *b = dir_bucket(i, seg);
292 if (!(dir_bucket_length(b, s, stripe) >= 0)) {
293 return 0;
294 }
295 if (!(!dir_next(b) || dir_offset(b))) {
296 return 0;
297 }
298 if (!(dir_bucket_loop_check(b, seg))) {
299 return 0;
300 }
301 }
302 }
303 return 1;
304}
305
306inline void
307unlink_from_freelist(Dir *e, int s, Stripe *stripe)

Callers 1

Calls 4

dir_bucket_lengthFunction · 0.85
get_segmentMethod · 0.80
dir_bucketFunction · 0.70
dir_bucket_loop_checkFunction · 0.70

Tested by 1