Hmm, I think the following code blows our dirent cache if we are not able to
add the dirent for a created file to a chunk (either because there isn't a
chunk to add it to, or the FSAL is not RGW):
if (new_dir_entry == allocated_dir_entry &&
mdcache_param.dir.avl_chunk > 0) {
/* If chunking, try and add this entry to a chunk. */
bool chunked = add_dirent_to_chunk(parent, new_dir_entry);
if (!chunked && *invalidate) {
/* If chunking and invalidating parent, and chunking
* this entry failed, invalidate parent.
*/
mdcache_dirent_invalidate_all(parent);
} else if (chunked && *invalidate) {
/* We succeeded in adding to chunk, don't invalidate
the
* parent directory.
*/
*invalidate = false;
}
}
This means the only time we will actually have any loose dirents is due to
lookups...
I don't think we should blow out the loose dirents in this case, though we
need to blow out any chunks since they are no longer valid.
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel