From owner-cvs-all@FreeBSD.ORG Sat Apr 14 14:08:31 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0241F16A400; Sat, 14 Apr 2007 14:08:31 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id E780613C459; Sat, 14 Apr 2007 14:08:30 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l3EE8Uoe081102; Sat, 14 Apr 2007 14:08:30 GMT (envelope-from des@repoman.freebsd.org) Received: (from des@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l3EE8UHP081101; Sat, 14 Apr 2007 14:08:30 GMT (envelope-from des) Message-Id: <200704141408.l3EE8UHP081101@repoman.freebsd.org> From: Dag-Erling Smorgrav Date: Sat, 14 Apr 2007 14:08:30 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/fs/pseudofs pseudofs.c pseudofs.h pseudofs_fileno.c pseudofs_internal.h pseudofs_vncache.c pseudofs_vnops.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Apr 2007 14:08:31 -0000 des 2007-04-14 14:08:30 UTC FreeBSD src repository Modified files: sys/fs/pseudofs pseudofs.c pseudofs.h pseudofs_fileno.c pseudofs_internal.h pseudofs_vncache.c pseudofs_vnops.c Log: Further pseudofs improvements: The pfs_info mutex is only needed to lock pi_unrhdr. Everything else in struct pfs_info is modified only while Giant is held (during vfs_init() / vfs_uninit()); add assertions to that effect. Simplify pfs_destroy somewhat. Remove superfluous arguments from pfs_fileno_{alloc,free}(), and the assertions which were added in the previous commit to ensure they were consistent. Assert that Giant is held while the vnode cache is initialized and destroyed. Also assert that the cache is empty when it is destroyed. Rename the vnode cache mutex for consistency. Fix a long-standing bug in pfs_getattr(): it would uncritically return the node's pn_fileno as st_ino. This would result in st_ino being 0 if the node had not previously been visited by readdir(), and also in an incorrect st_ino for process directories and any files contained therein. Correct this by abstracting the fileno manipulations previously done in pfs_readdir() into a new function, pfs_fileno(), which is used by both pfs_getattr() and pfs_readdir(). Revision Changes Path 1.31 +13 -21 src/sys/fs/pseudofs/pseudofs.c 1.35 +6 -2 src/sys/fs/pseudofs/pseudofs.h 1.14 +14 -24 src/sys/fs/pseudofs/pseudofs_fileno.c 1.6 +2 -2 src/sys/fs/pseudofs/pseudofs_internal.h 1.36 +7 -4 src/sys/fs/pseudofs/pseudofs_vncache.c 1.61 +17 -9 src/sys/fs/pseudofs/pseudofs_vnops.c