I took another whack at trying to make sense of the vnode life cycle, now that hannken@ has helped clarify some things. This one has a pretty (ha) diagram for all the vnode states and their transition, too. Fortunately, most of them are not exposed outside the vnode abstraction.
I also wrote two drafts of a generic inode->vnode table, one using pserialized hash tables and one using rwlocked rbtrees[*] -- nothing terribly exciting, but doing this helped clarify to me how vget needs to work. These should replace ufs_ihash and all the (not entirely correct) copypasta of it throughout the tree. With apologies to the mailing list archive (half a dozen files and >2000 lines of code), I put it here: https://www.NetBSD.org/~riastradh/tmp/20140303/ Comments? (Other than `forget vfs and make drm2 happen!', which I intend to do...) [*] Neither is a good choice of synchronized data structure, but until Someone^TM makes a better one easily usable in the kernel, these will do. It may turn out that a spin lock or an adaptive lock is better than either pserialize or an rwlock -- in any case, it won't be hard to adapt.
