Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Dec 2008 18:23:13 -0500
From:      Joe Marcus Clarke <marcus@FreeBSD.org>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        Ed Schouten <ed@80386.nl>, Robert Watson <rwatson@FreeBSD.org>, arch@FreeBSD.org
Subject:   Re: RFC: New VOP to translate vnode to its component name
Message-ID:  <1228951393.39938.7.camel@shumai.marcuscom.com>
In-Reply-To: <20081210162312.GO2038@deviant.kiev.zoral.com.ua>
References:  <1228667168.69753.16.camel@shumai.marcuscom.com> <20081207170354.GI18652@hoeg.nl> <1228670197.69753.24.camel@shumai.marcuscom.com> <e7db6d980812071143x4d395c7bt3f871e95430efc94@mail.gmail.com> <alpine.BSF.1.10.0812081805120.91087@fledge.watson.org> <1228784805.69132.66.camel@shumai.marcuscom.com> <alpine.BSF.1.10.0812091120380.34663@fledge.watson.org> <1228894344.35477.40.camel@shumai.marcuscom.com> <20081210162312.GO2038@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Wed, 2008-12-10 at 18:23 +0200, Kostik Belousov wrote:
> On Wed, Dec 10, 2008 at 02:32:24AM -0500, Joe Marcus Clarke wrote:
> > On Tue, 2008-12-09 at 11:22 +0000, Robert Watson wrote:
> > > On Mon, 8 Dec 2008, Joe Marcus Clarke wrote:
> > > 
> > > >> Just to give a general vote of "we need to do something here, whether the 
> > > >> details are exactly these or not" -- having better object->path resolution 
> > > >> is quite important for audit, as well as if we want to adopt a file system 
> > > >> notification services along the lines of Apple's fsevents (which is 
> > > >> path-centric and operates from close() events rather than open() events). 
> > > >> I don't think we should run in the Linux 'dentry' direction, but having a 
> > > >> more robust translation service would be quite valuable.  One comment: I 
> > > >> think we should continue to have a KPI which does a sleep-free translation 
> > > >> to call, but with weaker semantics than one that is sleepable and can query 
> > > >> for more robust reverse lookup.
> > > >
> > > > Okay, what about a name?
> > > 
> > > Oh, I do love a good bikeshed.  I'm actually fine with any of these, but 
> > > vn_fullpath_cache() sounds good to me.  One of the cases I have in mind is 
> > > path-based MAC policies, which will convert from a vnode to a path while 
> > > holding the vnode lock -- if something is going to run around locking vnodes 
> > > and doing VOP_READDIR's, that is not the time to do it.
> > 
> > I've duplicated vn_fullpath, vn_fullpath_global, and textvp_fullpath in
> > this latest version.  The new (well, old) functions are named *_cache.
> > I even updated the vn_fullpath.9 man page.
> > 
> > http://www.marcuscom.com/downloads/vop_vptocnp_7.diff
> 
> Main reason for vn_fullpath_cache() is to not sleep inside the function.
> I think this shall be reflected in the man page changes you did.
> 
> I do not like having the old code pasted into the vfs_cache.c together
> with new implementation. I think that vn_fullpath1 can take a flag
> specifying whether to call the vop, and return ENOENT when call is
> disabled. This shall give the same effect without code bloat.

Of course. I should have thought of that.  New diff is up.

http://www.marcuscom.com/downloads/vop_vptocnp_8.diff

Joe

-- 
Joe Marcus Clarke
FreeBSD GNOME Team      ::      gnome@FreeBSD.org
FreeNode / #freebsd-gnome
http://www.FreeBSD.org/gnome

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEABECAAYFAklAT2AACgkQb2iPiv4Uz4c6KgCaAlcgbg9sOAzh0h7abVKbt3GI
BqAAn3ToyGEsjioQAaZ39ZVrq6Qi5nhE
=pzmr
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1228951393.39938.7.camel>