From: Miklos S. <mi...@sz...> - 2008-01-17 12:56:01
|
> I'm trying to make sure I understand the various interactions with > FORGET, entry_timeout, and exporting a fuse filesystem over NFS. > > If I understand correctly, entry_timeout specifies the *maximum* > amount of time a entry is kept in cache. After that time expires, a > FORGET is sent to the library. Not exactly. Rather, after the time expires, if the entry is looked up, another LOOKUP is always sent. Currently FORGET is only sent on memory pressure, regardless of the entry's validity. I have plans to garbage collect stale entries, though. > However, the kernel may cause a FORGET to be sent sooner, if there > is memory pressure. The kernel will never FORGET a file that is > open, though. Right. > With regards to NFS, if the NFS client has a filehandle to a > particular file, and the server happens to FORGET that file, then the > client will get ESTALE when it tries to use that filehandle. > > Do I understand correctly? (And if not, where did I go wrong?) Yes, because NFS (at least v2/v3) don't have the notion of an open file, and have no state associated with a handle in the server. So it's impossible for the server to know, whether a file handle is being referenced by the client or not. Miklos |