[Linux-cachefs] FSCache: Cookie create and destroy semantics on file open

Milosz Tanski milosz at adfin.com
Wed Aug 7 04:40:11 UTC 2013


David,

I have a question for you about how added / removing the cookie for a
NFS inode works. Right the cache entry gets added when the file is
open. It gets revoked when the file re-opened in write mode. What
happens in this case.

Open for read (create cookie) -> Open for write (destroy cookie) ->
Open for read (create cookie again)

In this case, none of the 3 files were closed.

As I understand understand when the 3rd file is open for read it will
open the old cookie, invalidate it the data... but it will still
create the cookie for that inode despite one file having being open
for write.

Is there some other kind of scheme that prevents this from happening
that I'm unaware of?

Thanks,
-Milosz




More information about the Linux-cachefs mailing list