MCPcopy Create free account
hub / github.com/facebook/CacheLib / saveMetadata

Function saveMetadata

cachelib/allocator/NvmCacheState.cpp:60–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void saveMetadata(const folly::File& file,
61 const serialization::NvmCacheMetadata& metadata) {
62 auto metadataIoBuf = Serializer::serializeToIOBuf(metadata);
63 folly::File shutDownFile{file.fd()};
64 folly::RecordIOWriter rw{std::move(shutDownFile)};
65 rw.write(std::move(metadataIoBuf));
66}
67} // namespace
68
69std::string NvmCacheState::getNvmCacheStateFilePath(

Callers 1

markSafeShutDownMethod · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected