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
--=-3S3t+uGpGV7anj5ggysm Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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: > > >=20 > > > >> Just to give a general vote of "we need to do something here, whet= her the=20 > > > >> details are exactly these or not" -- having better object->path re= solution=20 > > > >> is quite important for audit, as well as if we want to adopt a fil= e system=20 > > > >> notification services along the lines of Apple's fsevents (which i= s=20 > > > >> path-centric and operates from close() events rather than open() e= vents).=20 > > > >> I don't think we should run in the Linux 'dentry' direction, but h= aving a=20 > > > >> more robust translation service would be quite valuable. One comm= ent: I=20 > > > >> think we should continue to have a KPI which does a sleep-free tra= nslation=20 > > > >> to call, but with weaker semantics than one that is sleepable and = can query=20 > > > >> for more robust reverse lookup. > > > > > > > > Okay, what about a name? > > >=20 > > > Oh, I do love a good bikeshed. I'm actually fine with any of these, = but=20 > > > vn_fullpath_cache() sounds good to me. One of the cases I have in mi= nd is=20 > > > path-based MAC policies, which will convert from a vnode to a path wh= ile=20 > > > holding the vnode lock -- if something is going to run around locking= vnodes=20 > > > and doing VOP_READDIR's, that is not the time to do it. > >=20 > > 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. > >=20 > > http://www.marcuscom.com/downloads/vop_vptocnp_7.diff >=20 > 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. >=20 > 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 --=20 Joe Marcus Clarke FreeBSD GNOME Team :: gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome --=-3S3t+uGpGV7anj5ggysm Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAklAT2AACgkQb2iPiv4Uz4c6KgCaAlcgbg9sOAzh0h7abVKbt3GI BqAAn3ToyGEsjioQAaZ39ZVrq6Qi5nhE =pzmr -----END PGP SIGNATURE----- --=-3S3t+uGpGV7anj5ggysm--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1228951393.39938.7.camel>