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

Method clear

src/traffic_cache_tool/CacheDefs.cc:190–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190Errata
191StripeSM::clear()
192{
193 Errata zret;
194 alignas(512) static char zero[CacheStoreBlocks::SCALE]; // should be all zero, it's static.
195 for (auto i : {A, B}) {
196 for (auto j : {HEAD, FOOT}) {
197 ssize_t n = pwrite(_span->_fd, zero, CacheStoreBlocks::SCALE, this->_meta_pos[i][j]);
198 if (n < CacheStoreBlocks::SCALE) {
199 std::cout << "Failed to clear stripe header" << std::endl;
200 }
201 }
202 }
203
204 return zret;
205}
206StripeSM::Chunk::~Chunk()
207{
208 this->clear();

Callers 3

open_fileFunction · 0.45
~ChunkMethod · 0.45
loadMetaMethod · 0.45

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected