From owner-cvs-src@FreeBSD.ORG Tue Jul 13 13:39:51 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C99A816A4CE; Tue, 13 Jul 2004 13:39:51 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71D9D43D5D; Tue, 13 Jul 2004 13:39:51 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i6DDdboT047169; Tue, 13 Jul 2004 09:39:37 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i6DDdbL0047166; Tue, 13 Jul 2004 09:39:37 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Tue, 13 Jul 2004 09:39:36 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Alfred Perlstein In-Reply-To: <200407120814.i6C8EA9d007919@repoman.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/coda coda_vfsops.c src/sys/fs/devfs devfs_vfsops.c src/sys/fs/fdescfs fdesc.h fdesc_vfsops.c src/sys/fs/hpfs hpfs_vfsops.c src/sys/fs/msdosfs msdosfs_vfsops.c src/sys/fs/ntfs ntfs_vfsops.c src/sys/fs/nullfs null_vfsops.c ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 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, 13 Jul 2004 13:39:52 -0000 On Mon, 12 Jul 2004, Alfred Perlstein wrote: > Make VFS_ROOT() and vflush() take a thread argument. > This is to allow filesystems to decide based on the passed thread > which vnode to return. > Several filesystems used curthread, they now use the passed thread. This strikes me as fairly suspect, as most consumers of any thread pointer are going to dereference it in a way that's only safe if that thread is curthread. The same dubious quality applies to passing threads into other VFS operations, and the only real purpose in most cases is to trade off the cost of a PCPU lookup and a stack argument. Do you plan to pass in a thread other than curthread? If so, how will you ensure this is safe? Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research