I am working on a VFS project, using Ganesha. We have our own FSAL module and export, and
we are using Ganesha's MDCACHE. In some scenarios a file is modified remotely, not via
the NFS front door. Our server already has support for noticing this. When something like
this happens we must invalidate cache entries. The plan to invalidate the kernel attr
cache is to do an open(2) syscall immediately followed by close(2) syscall in a background
thread. But that's not enough: before we do that we must invalidate Ganesha's
MDCACHE.
For invalidating the MDCACHE entry I think I need to use the invalidate "up
call" (
https://github.com/phdeniel/nfs-ganesha/blob/master/src/include/fsal_up.h)
provided via the fsal_up_vector.
1) Am I going in the right direction? Any advice/gotchas to keep an eye on?
2) Maybe the update up call is better.
3) Maybe I should use up_async_invalidate (or up_async_update).
Thanks!