The invalidate UP calls are the correct calls to use.  If you need your 
thread back immediately, and don't care that the invalidate is done 
inline, then you can use up_async_invalidate(), which will spawn a 
thread and invalidate in the background.  If it's okay to use your 
thread, or you need to know that the invalidate is done before you 
return out, then use the invalidate UP call directly.
Daniel
On 6/2/22 20:17, David Rieber via Devel wrote:
 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!
 _______________________________________________
 Devel mailing list -- devel(a)lists.nfs-ganesha.org
 To unsubscribe send an email to devel-leave(a)lists.nfs-ganesha.org