Re: ZFS, procfs and java

From: Pawel Jakub Dawidek <pjd_at_FreeBSD.org>
Date: Sat, 21 Apr 2007 12:11:37 +0200
On Sat, Apr 21, 2007 at 11:08:21AM +0100, Robert Watson wrote:
> 
> 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.

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).

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd_at_FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

Received on Sat Apr 21 2007 - 08:12:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:09 UTC