Date: Tue, 13 Jul 2004 09:39:36 -0400 (EDT) From: Robert Watson <rwatson@FreeBSD.org> To: Alfred Perlstein <alfred@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 ... Message-ID: <Pine.NEB.3.96L.1040713092627.12083D-100000@fledge.watson.org> In-Reply-To: <200407120814.i6C8EA9d007919@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1040713092627.12083D-100000>