Date: Tue, 20 Jan 2009 19:01:59 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/conf options src/sys/kern vfs_cache.c vfs_lookup.c src/sys/nfsclient nfs_vnops.c src/sys/ufs/ffs ffs_vfsops.c src/sys/ufs/ufs dirhash.h inode.h ufs_dirhash.c ufs_lookup.c Message-ID: <200901201904.n0KJ42pN027520@repoman.freebsd.org>
index | next in thread | raw e-mail
jhb 2009-01-20 19:01:59 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_7)
sys/conf options
sys/kern vfs_cache.c vfs_lookup.c
sys/nfsclient nfs_vnops.c
sys/ufs/ffs ffs_vfsops.c
sys/ufs/ufs dirhash.h inode.h ufs_dirhash.c
ufs_lookup.c
Log:
SVN rev 187478 on 2009-01-20 19:01:59Z by jhb
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.
Revision Changes Path
1.608.2.9 +0 -3 src/sys/conf/options
1.114.2.5 +23 -11 src/sys/kern/vfs_cache.c
1.102.2.3 +1 -5 src/sys/kern/vfs_lookup.c
1.276.2.5 +4 -1 src/sys/nfsclient/nfs_vnops.c
1.329.2.6 +1 -1 src/sys/ufs/ffs/ffs_vfsops.c
1.5.10.1 +6 -1 src/sys/ufs/ufs/dirhash.h
1.51.2.2 +0 -2 src/sys/ufs/ufs/inode.h
1.23.2.1 +338 -222 src/sys/ufs/ufs/ufs_dirhash.c
1.83.2.3 +72 -47 src/sys/ufs/ufs/ufs_lookup.c
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901201904.n0KJ42pN027520>
