| 182 | } |
| 183 | |
| 184 | FileHandle* ShadowFile::getOrCreateShadowingFH() { |
| 185 | if (!shadowingFH) { |
| 186 | shadowingFH = bm.getFileHandle(shadowFilePath, |
| 187 | FileHandle::O_PERSISTENT_FILE_CREATE_NOT_EXISTS, vfs, nullptr); |
| 188 | if (shadowingFH->getNumPages() == 0) { |
| 189 | // Reserve the first page for the header. |
| 190 | shadowingFH->addNewPage(); |
| 191 | } |
| 192 | } |
| 193 | return shadowingFH; |
| 194 | } |
| 195 | |
| 196 | } // namespace storage |
| 197 | } // namespace lbug |
nothing calls this directly
no test coverage detected