K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-01-20T19:01:59.498401Z K 7 svn:log V 1223 MFC: Close several races with using shared vnode locks for pathname lookups with UFS and enable shared lookups for UFS. - Change the name cache to fail lookups with EBADF if a directory vnode is recycled while it waits for a lock upgrade. - Rework the locking of the dirhash to use an sx lock and reference count on each hash structure. Using an sx lock instead of a mutex allows the lock to be held across disk I/O closing a number of races when using shared vnode locks that were previously handled by exclusive vnode locks. - Remove the 'i_ino' and 'i_reclen' fields from the i-node. i_ino is now a local variable in ufs_lookup(), and i_reclen is not needed since ufs_dirremove() always has the entire block holding the directory entry in memory when it updates the directory. - 'i_diroff' and 'i_offset' are now local variables in ufs_lookup(). 'i_diroff' is updated after a successful lookup. - Only set i_offset in the parent directory's i-node during a lookup for non-LOOKUP operations. - Remove the LOOKUP_SHARED option. One can set vfs.lookup_shared to 1 in either loader.conf or sysctl.conf instead. The default setting for vfs.lookup_shared is not changed and remains off by default. END