From owner-freebsd-arch@FreeBSD.ORG Wed Dec 10 23:23:17 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4742106564A; Wed, 10 Dec 2008 23:23:17 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from creme-brulee.marcuscom.com (marcuscom-pt.tunnel.tserv1.fmt.ipv6.he.net [IPv6:2001:470:1f00:ffff::1279]) by mx1.freebsd.org (Postfix) with ESMTP id 830738FC13; Wed, 10 Dec 2008 23:23:17 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from [IPv6:2001:470:1f00:2464::4] (shumai.marcuscom.com [IPv6:2001:470:1f00:2464::4]) by creme-brulee.marcuscom.com (8.14.3/8.14.3) with ESMTP id mBANOxIs062092; Wed, 10 Dec 2008 18:24:59 -0500 (EST) (envelope-from marcus@FreeBSD.org) From: Joe Marcus Clarke To: Kostik Belousov 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> <1228784805.69132.66.camel@shumai.marcuscom.com> <1228894344.35477.40.camel@shumai.marcuscom.com> <20081210162312.GO2038@deviant.kiev.zoral.com.ua> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-3S3t+uGpGV7anj5ggysm" Organization: FreeBSD, Inc. Date: Wed, 10 Dec 2008 18:23:13 -0500 Message-Id: <1228951393.39938.7.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on creme-brulee.marcuscom.com Cc: Ed Schouten , Robert Watson , arch@FreeBSD.org Subject: Re: RFC: New VOP to translate vnode to its component name X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 23:23:18 -0000 --=-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--