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

Method openReadClose

src/iocore/cache/CacheRead.cc:416–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416int
417CacheVC::openReadClose(int event, Event * /* e ATS_UNUSED */)
418{
419 cancel_trigger();
420 if (is_io_in_progress()) {
421 if (event != AIO_EVENT_DONE) {
422 return EVENT_CONT;
423 }
424 set_io_not_in_progress();
425 }
426 CACHE_TRY_LOCK(lock, stripe->mutex, mutex->thread_holding);
427 if (!lock.is_locked()) {
428 VC_SCHED_LOCK_RETRY();
429 }
430 if (f.hit_evacuate && stripe->dir_valid(&first_dir) && closed > 0) {
431 ink_assert(stripe->mutex->thread_holding == this_ethread());
432 if (f.single_fragment) {
433 stripe->force_evacuate_head(&first_dir, dir_pinned(&first_dir));
434 } else if (stripe->dir_valid(&earliest_dir)) {
435 stripe->force_evacuate_head(&first_dir, dir_pinned(&first_dir));
436 stripe->force_evacuate_head(&earliest_dir, dir_pinned(&earliest_dir));
437 }
438 }
439 stripe->close_read(this);
440 return free_CacheVC(this);
441}
442
443int
444CacheVC::openReadReadDone(int event, Event *e)

Callers

nothing calls this directly

Calls 5

this_ethreadFunction · 0.85
free_CacheVCFunction · 0.85
dir_validMethod · 0.45
force_evacuate_headMethod · 0.45
close_readMethod · 0.45

Tested by

no test coverage detected