From owner-freebsd-current@FreeBSD.ORG Sat Apr 21 10:12:26 2007 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 252F316A400; Sat, 21 Apr 2007 10:12:26 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id A4E5013C455; Sat, 21 Apr 2007 10:12:25 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id AE2ED487F2; Sat, 21 Apr 2007 12:12:23 +0200 (CEST) Received: from localhost (public-gprs74242.centertel.pl [91.94.163.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id E798745B26; Sat, 21 Apr 2007 12:12:11 +0200 (CEST) Date: Sat, 21 Apr 2007 12:11:37 +0200 From: Pawel Jakub Dawidek To: Robert Watson Message-ID: <20070421101137.GA46583@garage.freebsd.pl> References: <46297494.5050104@FreeBSD.org> <20070421110405.Y39377@fledge.watson.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline In-Reply-To: <20070421110405.Y39377@fledge.watson.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL autolearn=no version=3.0.4 Cc: Greg Lewis , freebsd-current@FreeBSD.org, "Stephane E. Potvin" Subject: Re: ZFS, procfs and java X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Apr 2007 10:12:26 -0000 --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 21, 2007 at 11:08:21AM +0100, Robert Watson wrote: >=20 > On Fri, 20 Apr 2007, Stephane E. Potvin wrote: >=20 > >It seems that the ZFS cache (dnlc) doesn't update the VSF_namecache fiel= ds in the vnodes (v_cache_src, v_cache_dst and v_dd). This unfortunately ca= uses the file link in=20 > >/proc/curproc to return "unknown" as it uses vn_fullpath which relies on= the namecache fields to be set correctly. > > > >Java uses /proc/curproc/file to know where to find its libraries and doe= sn't expect the "unknown" return value returned when using ZFS (due to vn_f= ullpath failing). The=20 > >attached patches to the java/jdk15 port fixes this issue but it doesn't = fix the root of the problem. > > > >Would it be possible to add support in dnlc for updating the VFS namecac= he fields or to add knowledge of dnlc into vn_fullpath? >=20 > No application should rely on the correctness and usefulness of /proc/cur= proc/file -- the conversion from a vnode to a pathname is inherently unreli= able. Likewise,=20 > properly ported applications should not rely on the availability of procf= s, as its use is deprecated. My advice would be to talk to the Java porter= s about entirely=20 > eliminating this dependency. >=20 > As a matter of debugging/logging convenience, it would be nice if ZFS imp= lemented the name cache hooks, since using vn_fullpath is useful for procfs= monitoring of process=20 > address space, audit, etc. I tried to teach ZFS about our namecache (the code is under FREEBSD_NAMECACHE define), but it didn't worked stable, I'm probably still missing something. On the other hand it was rather easy to use namecache from OpenSolaris with ZFS (DNLC). --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --ReaqsoxgOBHFXBhH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGKeNZForvXbEpPzQRArM6AKDqcjh7iPTuKDjLJRv0W2SNLyJNHgCgsaNn lcfPxj4ajci/24OrJCk7aGU= =yhaC -----END PGP SIGNATURE----- --ReaqsoxgOBHFXBhH--