I have a first pass that works and passes pynfs! It isn't quite correct in
that a rename into a directory or a create doesn't invalidate the dirent
cache and thus a readdir might not show the new file.

Unlink and rename out of a directory need not invalidate and should work
properly.

Also left to do is memory management to constrain the total number of
dirents.

The inode cache LRU reclaims the least recently used entry, however that
would cause problems for dirents since to reclaim one, we must hold the
content lock on the containing directory, but we also hold the content lock
on the directory that needs another dirent. If the two directories happen to
be involved in a rename from one directory to another, the order could be
reversed and create a deadlock.

Another option is to have the LRU thread dispose of dirents from the least
recently used directories the same way it disposes of open global file
descriptors. That combined with logic that switched to uncached mode if we
couldn't get a free dirent would allow a reasonable mechanism.

Anyway, I encourage folks who are interested to take a look at the WIP code
and play with it.

Frank


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to