From owner-cvs-src@FreeBSD.ORG Tue Jan 22 00:32:55 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3C0416A417; Tue, 22 Jan 2008 00:32:55 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9C76113C459; Tue, 22 Jan 2008 00:32:55 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0M0Wt1k031185; Tue, 22 Jan 2008 00:32:55 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0M0Wt3x031184; Tue, 22 Jan 2008 00:32:55 GMT (envelope-from rwatson) Message-Id: <200801220032.m0M0Wt3x031184@repoman.freebsd.org> From: Robert Watson Date: Tue, 22 Jan 2008 00:32:54 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_7 Cc: Subject: cvs commit: src/sys/fs/coda cnode.h coda_namecache.h coda_psdev.c coda_vfsops.c coda_vnops.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2008 00:32:55 -0000 rwatson 2008-01-22 00:32:54 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/fs/coda cnode.h coda_namecache.h coda_psdev.c coda_vfsops.c coda_vnops.c Log: Merge a variety of Coda fixes from HEAD to RELENG_7: coda_vnops.c:1.79: 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 mmap(2). Reported by: Rune coda_vnops.c:1.80: Lock the new directory vnode returned by coda_mkdir(), as this is required by FreeBSD's vnode locking protocol. coda_vnops.c:1.81: 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 appropriately. coda_vnops.c:1.82: 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 occurs. coda_vfsops.c:1.71: 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 file systems. coda_vfsops.c: 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 mountfrom name. coda_vnops.c:1.83: 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. coda_namecache.h:1.13: Remove unused oldhash definition from Coda namecache. coda_vnops.c:1.84: 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 coda_vnops.c:1.85: 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 Revision Changes Path 1.21.2.1 +0 -6 src/sys/fs/coda/cnode.h 1.11.2.1 +22 -20 src/sys/fs/coda/coda_namecache.h 1.39.2.1 +0 -3 src/sys/fs/coda/coda_psdev.c 1.67.2.1 +4 -13 src/sys/fs/coda/coda_vfsops.c 1.76.2.1 +15 -23 src/sys/fs/coda/coda_vnops.c