I'm using nfs4j with custom VFS implementation that uses file paths instead of Inode numbers. As Inode data is limited to 64/128 bytes, based on nfs version, I'm keeping cache with mapping between INode and file path. Everything works fine until I reboot the server and I loose this cache, as nfs client also use caching and it sends already cached inode values, but I'm unable to rebuild file path from inode itself. I disable all type of client cache (-o noac,lookupcache=none), but still there are cases that won't work. If I enter some sub-folder structure, restart the nfs server, and execute "ls -al" I get "ls: cannot open directory '.': Stale file handle", as the Inode is not in the cache and I'm unable to complete "getattr()" call. On the other hand, if I call "ls -al ", then the client correctly perform lookup for every path item and I'm able to rebuild the cache mappings and operation succeed.
So is there a way when you perform operation on invalid Inode, to force the client to perform those lookups? I've tried throwing StaleException in such cases, but without luck. Nfs client is v4.1.