From owner-freebsd-current@FreeBSD.ORG Sat Apr 21 10:08:21 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 DEA2716A401; Sat, 21 Apr 2007 10:08:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id B5A3713C44C; Sat, 21 Apr 2007 10:08:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 5A7E347500; Sat, 21 Apr 2007 06:08:21 -0400 (EDT) Date: Sat, 21 Apr 2007 11:08:21 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "Stephane E. Potvin" In-Reply-To: <46297494.5050104@FreeBSD.org> Message-ID: <20070421110405.Y39377@fledge.watson.org> References: <46297494.5050104@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Greg Lewis , freebsd-current@FreeBSD.org, Pawel Jakub Dawidek 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:08:22 -0000 On Fri, 20 Apr 2007, Stephane E. Potvin wrote: > It seems that the ZFS cache (dnlc) doesn't update the VSF_namecache fields > in the vnodes (v_cache_src, v_cache_dst and v_dd). This unfortunately causes > the file link in /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 doesn't > expect the "unknown" return value returned when using ZFS (due to > vn_fullpath failing). The 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 namecache > fields or to add knowledge of dnlc into vn_fullpath? No application should rely on the correctness and usefulness of /proc/curproc/file -- the conversion from a vnode to a pathname is inherently unreliable. Likewise, properly ported applications should not rely on the availability of procfs, as its use is deprecated. My advice would be to talk to the Java porters about entirely eliminating this dependency. As a matter of debugging/logging convenience, it would be nice if ZFS implemented the name cache hooks, since using vn_fullpath is useful for procfs monitoring of process address space, audit, etc. Robert N M Watson Computer Laboratory University of Cambridge