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

Function ClearCacheVolList

src/iocore/cache/unit_tests/test_CacheVol.cc:320–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320int
321ClearCacheVolList(Queue<CacheVol> *cpl, int len)
322{
323 int i = 0;
324 CacheVol *cp = nullptr;
325 while ((cp = cpl->dequeue())) {
326 for (int d_no = 0; d_no < gndisks; d_no++) {
327 cp->disk_stripes[d_no]->disk->delete_volume(cp->vol_number);
328 cp->disk_stripes[d_no] = nullptr;
329 }
330 ats_free(cp->disk_stripes);
331 ats_free(cp->stripes);
332 delete (cp);
333 i++;
334 }
335
336 if (i != len) {
337 Warning("Failed");
338 return 0;
339 }
340 return 1;
341}
342
343void
344save_state()

Callers 2

execute_and_verifyFunction · 0.85

Calls 3

ats_freeFunction · 0.85
delete_volumeMethod · 0.80
dequeueMethod · 0.45

Tested by

no test coverage detected