| 147 | time_t NvmCacheState::getCreationTime() const { return creationTime_; } |
| 148 | |
| 149 | void NvmCacheState::clearPrevState() { |
| 150 | auto dropFile = getFileNameFor(kShouldDropNvmCache); |
| 151 | if (::unlink(dropFile.data()) != 0 && errno != ENOENT) { |
| 152 | util::throwSystemError(errno, "Failed to delete nvm run file"); |
| 153 | } |
| 154 | XDCHECK(metadataFile_); |
| 155 | ftruncate(metadataFile_->fd(), 0); |
| 156 | } |
| 157 | |
| 158 | void NvmCacheState::markSafeShutDown() { |
| 159 | XDCHECK(metadataFile_); |