| 275 | } |
| 276 | |
| 277 | bool |
| 278 | StripeSM::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 | |
| 293 | Errata |
| 294 | StripeSM::updateHeaderFooter() |
no test coverage detected