So the explicit lookup for the non-existing testvol name ended up
populating the kernel cache with a negative dentry. This negative entry
isn't dropped once the mountpoint is created, but I can get it to work
when I force an upcall which tells the kernel to flush the parent
directory and it's children,
You might need to take out your 'cache consistency is hard!' barbie doll!
Seriously, this is hard, and it would be good to document the cache
invariants explicitly so that it can be checked that they are maintained
on all state transitions. It might also be cool to have a debug option
in the kernel to walk the cache, do an upcall for each to get status,
and compare.
Of course this would fail, because of the problem where venus doesn't
respond correctly to .. lookups at realm attachment points. This seems
to have gotten better, though. On NetBSD, pwd still fails, but I can
look up .. (whereas before I think I couldn't):
poblano gdt 7 /coda/ir.bbn.com > l -ai
total 10
4293914627 drwxrwxrwx 1 root 65534 2048 Nov 10 2000 .
7 dr-xr-xr-x 1 root 65534 2048 Aug 4 09:32 ..
3072 drwxr-xr-x 1 500 65534 2048 Aug 27 2001 home
5121 drwxr-xr-x 1 500 65534 2048 Jun 3 2003 project
9223 drwxr-xr-x 1 500 65534 2048 Nov 10 2000 scratch
poblano gdt 8 /coda/ir.bbn.com > l -ai ..
total 7
7 dr-xr-xr-x 1 root 65534 2048 Aug 4 09:32 .
2 drwxr-xr-x 45 root wheel 1024 Sep 20 19:30 ..
4293914627 drwxrwxrwx 1 root 65534 2048 Nov 10 2000 ir.bbn.com
4293914626 drwxr-xr-x 1 root 65534 2048 May 13 09:53
testserver.coda.cs.cmu.edu
poblano gdt 9 /coda/ir.bbn.com > /bin/pwd
pwd: No such file or directory
pwd does work in /coda
I will have to debug this in the kernel; I wonder if there are two
vnodes for the same directory, but cd ../testserver.coda.cs.cmu.edu
works and there pwd fails as well.
This is all with 20070803 cvs; I'll update and mail again if there's
improvement.