8177: Expand trust_all_content comments.
[arvados.git] / services / fuse / arvados_fuse / fusefile.py
index d4c075a40d292f4515611a34706b7c670f831e18..e731327dec5524432d0eb12c7d9dfc2b900fafd4 100644 (file)
@@ -112,6 +112,13 @@ class FuncToJSONFile(StringFile):
         super(FuncToJSONFile, self).__init__(parent_inode, "", 0)
         self.func = func
 
+        # invalidate_inode() and invalidate_entry() are asynchronous
+        # with no callback to wait for. In order to guarantee
+        # userspace programs don't get stale data that was generated
+        # before the last invalidate(), we must disallow dirent
+        # caching entirely.
+        self.allow_dirent_cache = False
+
     def size(self):
         self._update()
         return super(FuncToJSONFile, self).size()