| 219 | } |
| 220 | |
| 221 | Future<Void> AsyncFileEncrypted::writeLastBlockToFile() { |
| 222 | // The source buffer for the write is owned by *this so this must be kept alive by reference count until the write |
| 223 | // is finished. |
| 224 | return uncancellable( |
| 225 | holdWhile(Reference<AsyncFileEncrypted>::addRef(this), |
| 226 | file->write(&writeBuffer[0], offsetInBlock, currentBlock * FLOW_KNOBS->ENCRYPTION_BLOCK_SIZE))); |
| 227 | } |
| 228 | |
| 229 | size_t AsyncFileEncrypted::RandomCache::evict() { |
| 230 | ASSERT_EQ(vec.size(), maxSize); |
no test coverage detected