Date: Sat, 9 Apr 2005 06:46:26 -0700 From: Alfred Perlstein <alfred@freebsd.org> To: Jeff Roberson <jroberson@chesapeake.net> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys namei.h src/sys/kern vfs_syscalls.c Message-ID: <20050409134626.GL60345@elvis.mu.org> In-Reply-To: <20050409093326.C28571@mail.chesapeake.net> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
* Jeff Roberson <jroberson@chesapeake.net> [050409 06:33] wrote: > > On Sat, 9 Apr 2005, Alfred Perlstein wrote: > > > * Jeff Roberson <jroberson@chesapeake.net> [050409 05:55] wrote: > > > On Sat, 9 Apr 2005, Alfred Perlstein wrote: > > > > > > > * Jeff Roberson <jeff@FreeBSD.org> [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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050409134626.GL60345>