On 02/23/2017 08:00 PM, Frank Filz wrote:
>> 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.
>
> And now directory invalidation is enabled for create, link, and rename.
>
> I think this is pretty close to complete.
>
> Please have at it, we will torture it at Connectathon next week.
>
> If we can gain a reasonable confidence, we can merge it this week, though
> that doesn't give people much time to review...
>
> It can be disabled by setting Dir_Chunk to 0 in the CacheInode config block.
>
> Still to be decided is how to interact with disabling dirent cache.
> Currently, with chunking enabled, we will never skip caching. Also, do we
> want to keep the legacy dirent cache?
>
> One proposal is to dump the legacy cache, and if Dir_Chunk is 0 then don't
> cache.

I don't think we should ultimately keep both cache types.  For now, 
while we're testing, it's fine, but I think we should remove the old 
cache once we have confidence in the chunked cache.

Daniel

------------------------------------------------------------------------------
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