The vnode flags VI_CLEAN and VI_XLOCK are used in file systems to check for reclaimed or reclaiming but still active vnodes, so make the vnode flags VI_XLOCK, VI_CLEAN (and VI_LOCKSHARE) private to the files kern/vfs_* and add a function to check the vnode state:
int vdead_check(struct vnode *vp, bool may_sleep) will return one of: EBUSY: vnode is becoming dead, with "may_sleep == false" only. ENOENT: vnode is dead. 0: otherwise. Whenever this function returns a non-zero value all future calls will return a non-zero value as reclaiming a vnode will always succeed. Diff is at http://www.netbsd.org/~hannken/vnode-pass5-1.diff Comments or objections anyone? -- J. Hannken-Illjes - [email protected] - TU Braunschweig (Germany)
