RFC: New VOP to translate vnode to its component name
Joe Marcus Clarke
marcus at FreeBSD.org
Wed Dec 10 15:23:18 PST 2008
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 at FreeBSD.org
FreeNode / #freebsd-gnome
http://www.FreeBSD.org/gnome
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20081210/41622e12/attachment.pgp
More information about the freebsd-arch
mailing list