cvs commit: src/sys/fs/coda cnode.h coda_namecache.h coda_psdev.c
rwatson at FreeBSD.org
Wed Jan 23 04:09:43 PST 2008
rwatson 2008-01-23 12:09:43 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_7_0)
sys/fs/coda cnode.h coda_namecache.h coda_psdev.c
Merge a variety of Coda fixes from HEAD to RELENG_7_0:
Borrow the VM object associated with an underlying cache vnode with the
Coda vnode derived from it, in the style of nullfs. This allows files
in the Coda file system to be memory-mapped, such as with execve(2) or
Reported by: Rune <u+openafsdev-sr55 at chalmers dot se>
Lock the new directory vnode returned by coda_mkdir(), as this is required
by FreeBSD's vnode locking protocol.
Use VOP_NULL rather than VOP_PANIC for Coda's vop_print routine, so as
to avoid panicking in DDB show lockedvnods.
cnode.h:1.22, coda_namecache.h:1.12, coda_psdev.c:1.40, coda_vfsops.c:1.70:
Don't declare functions as extern.
Move all extern variable definitions to associated .h files, move some
extern variable definitions between include files to place them more
Don't acquire an additional vnode reference to a vnode when it is opened
and then release it when it is closed: we rely on the caller to keep the
vnode around with a valid reference. This avoids vrele() destroying the
vnode vop_close() is being called from during a call to vop_close(), and
a crash due to lockmgr recursing the vnode lock when a Coda unmount
Zero mi_rotovp and coda_ctlvp immediately after calling vrele() on the
vnodes during coda_unmount() in order to detect errant use of them
after the vnode references may no longer be valid.
No need to clear the VV_ROOT flag on mi_rootvp flag (especially after
the vnode reference is no longer valid) as this isn't done on other
Rework coda_statfs(): no longer need to zero the statfs structure or
fill out all fields, just fill out the ones the file system knows
about. Among other things, this causes the outpuf of "mount" and
"df" to make quite a bit more sense as /dev/cfs0 is specified as the
Improve default vnode operation handling for Coda:
- Don't specify vnode operations for mknod, lease, and advlock--let them
fall through to vop_default.
- Implement vop_default with &default_vnodeops, rather than with
VOP_PANIC, so that unimplemented vnode operations are handled in more
sensible ways than panicking, such as EOPNOTSUPP on ACL queries
generated by bsdtar, or mknod.
Remove unused oldhash definition from Coda namecache.
Replace references to VOP_LOCK() w/o LK_RETRY to vn_lock() with LK_RETRY,
avoiding extra error handling, or in some cases, missing error handling.
Discussed with: kib
Put "coda_rdwr: Internally Opening" printf generated by in-kernel writes
to files, such as ktrace output, under CODA_VERBOSE. Otherwise, each
such call to VOP_WRITE() results in a kernel printf.
Obtained from: NetBSD
Approved by: re (kensmith)
Revision Changes Path
22.214.171.124 +0 -6 src/sys/fs/coda/cnode.h
126.96.36.199 +22 -20 src/sys/fs/coda/coda_namecache.h
188.8.131.52 +0 -3 src/sys/fs/coda/coda_psdev.c
184.108.40.206 +4 -13 src/sys/fs/coda/coda_vfsops.c
220.127.116.11 +15 -23 src/sys/fs/coda/coda_vnops.c
More information about the cvs-src