This page is a list of stuff to take note of if you're maintaining an out-of-tree file system for NetBSD. It may not be complete, but it should list at least everything I've changed around while hacking up the VFS layer.
if ((error = cache_lookup(vdp, vpp, cnp)) >= 0) return (error);to
if (cache_lookup(vdp, cnp, NULL, vpp)) { return *vpp == NULLVP ? ENOENT : 0; }that is, the order of the arguments is fixed to put the result parameter last and the sense of the return value changes. The new return value is either true (for a cache hit) or false (for a cache miss); a hit can be either a negative result, in which case the vnode is null, or a positive one, in which case it is not. If your filesystem supports whiteouts, you must to fetch an additional "iswhiteout" result and update cnp_flags; see the changes in ufs for details. Other/most filesystems can just pass NULL.
if (cache_lookup(vdp, cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_nameiop, cnp->cn_flags, NULL, vpp)) { return *vpp == NULLVP ? ENOENT: 0; }and the changes to other namecache calls are similarly mechanical.