From owner-cvs-src@FreeBSD.ORG Sat Apr 9 13:46:26 2005 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 761E316A4CE; Sat, 9 Apr 2005 13:46:26 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D3D543D2F; Sat, 9 Apr 2005 13:46:26 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 336175CA34; Sat, 9 Apr 2005 06:46:26 -0700 (PDT) Date: Sat, 9 Apr 2005 06:46:26 -0700 From: Alfred Perlstein To: Jeff Roberson Message-ID: <20050409134626.GL60345@elvis.mu.org> References: <200504091204.j39C4aH4033816@repoman.freebsd.org> <20050409125239.GI60345@elvis.mu.org> <20050409085414.M28571@mail.chesapeake.net> <20050409132339.GJ60345@elvis.mu.org> <20050409093326.C28571@mail.chesapeake.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050409093326.C28571@mail.chesapeake.net> User-Agent: Mutt/1.4.2.1i cc: cvs-src@FreeBSD.org cc: Jeff Roberson cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys namei.h src/sys/kern vfs_syscalls.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: Sat, 09 Apr 2005 13:46:26 -0000 * Jeff Roberson [050409 06:33] wrote: > > On Sat, 9 Apr 2005, Alfred Perlstein wrote: > > > * Jeff Roberson [050409 05:55] wrote: > > > On Sat, 9 Apr 2005, Alfred Perlstein wrote: > > > > > > > * Jeff Roberson [050409 05:04] wrote: > > > > > jeff 2005-04-09 12:04:36 UTC > > > > > > > > > > FreeBSD src repository > > > > > > > > > > Modified files: > > > > > sys/sys namei.h > > > > > sys/kern vfs_syscalls.c > > > > > Log: > > > > > - Remove the namei NOOBJ flag. It is meaningless now. > > > > > > > > Please bring this back, it is very useful actually. > > > > > > > > It is the flag that happens to tell the underlying FS if the > > > > vnode is going to be used or not. Basically, if there will > > > > be an attribute fetch or an open. > > > > > > > > (autofs) > > > > > > Nothing presently makes use of it. And the name is misleading if that's > > > what you want to use it for. When someone adds functionality to make use > > > of this in a filesystem we can revive it easily enough with a better name. > > > > I just explained to you that I have functionality that makes use > > of it right now. Autofs depends on it. Please revert it. If you > > hate the name NOOBJ then rename it JUSTSTAT or NOOPEN. Thank you. > > I don't understand, where does autofs inspect this flag? It allows one to differentiate between calls such as stat(2) and lstat(2) versus calls like open(2) inside of lookup. Basically if we see the NOOBJ flag, we know that the kernel is not opening the file, only doing an attribute fetch. This means we can avoid a superfelous mount when the user is just doing a stat(2). This is critical for things like gui browsers, or doing something like "ls -l" under /auto without it mounting every single auto mount. Logic in lookup is as follows: the lookup for a node fails AND the directory is marked as 'dynamic'/'browseable' AND NOOBJ is set We create a "bogus" vnode that is returned to the caller with a refcount of just 1, after the caller does a stat, it will vrele the vnode and it will be gc'd. This allows one to do an stat(2)/lstat(2) of an entry under autofs without forcing a mount of that directory. This would also be used by NFSv4 to implement the browseable rootfs thing (I think). thanks! -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684