MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / calcWaterMark

Method calcWaterMark

fs/cache/full_file_cache/cache_pool.cpp:313–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311}
312
313uint64_t FileCachePool::calcWaterMark(uint64_t capacity, uint64_t maxFreeSpace) {
314 return std::max(static_cast<uint64_t>(capacity * kWaterMarkRatio * 0.01),
315 capacity > maxFreeSpace ? capacity - maxFreeSpace : 0);
316}
317
318bool FileCachePool::afterFtrucate(FileNameMap::iterator iter) {
319 auto lruEntry = iter->second.get();

Callers 1

calcMarkMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected