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

Method probeMeta

src/traffic_cache_tool/CacheDefs.cc:277–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277bool
278StripeSM::probeMeta(MemSpan<void> &mem, StripeMeta const *base_meta)
279{
280 while (mem.size() >= sizeof(StripeMeta)) {
281 StripeMeta const *meta = static_cast<StripeMeta *>(mem.data());
282 if (this->validateMeta(meta) && (base_meta == nullptr || // no base version to check against.
283 (meta->version == base_meta->version) // need more checks here I think.
284 )) {
285 return true;
286 }
287 // The meta data is stored aligned on a stripe block boundary, so only need to check there.
288 mem.remove_prefix(CacheStoreBlocks::SCALE);
289 }
290 return false;
291}
292
293Errata
294StripeSM::updateHeaderFooter()

Callers 1

loadMetaMethod · 0.95

Calls 4

validateMetaMethod · 0.95
sizeMethod · 0.45
dataMethod · 0.45
remove_prefixMethod · 0.45

Tested by

no test coverage detected