[PATCH] D97850: Fix PCM read from ModuleCache for ext4 filesystem
Ilya Kuteev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 3 05:34:53 PST 2021
ilyakuteev created this revision.
ilyakuteev requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D97850
Files:
clang/lib/Serialization/ModuleManager.cpp
Index: clang/lib/Serialization/ModuleManager.cpp
===================================================================
--- clang/lib/Serialization/ModuleManager.cpp
+++ clang/lib/Serialization/ModuleManager.cpp
@@ -470,6 +470,12 @@
Optional<FileEntryRef> FileOrErr =
expectedToOptional(FileMgr.getFileRef(FileName, /*OpenFile=*/true,
/*CacheFailure=*/false));
+ if (FileOrErr) {
+ // On Linux ext4 FileManager's inode caching system does not
+ // provide us correct behaviour for ModuleCache directories.
+ // inode can be reused after PCM delete resulting in cache misleading.
+ FileOrErr = FileMgr.getBypassFile(*FileOrErr);
+ }
if (!FileOrErr)
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97850.327756.patch
Type: text/x-patch
Size: 738 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210303/d511a44c/attachment.bin>
More information about the cfe-commits
mailing list