Subject: Re: kern/4099: Gather coredumps in one place
To: John F. Woods <jfw@jfwhome.funhouse.com>
From: Michael L. VanLoon -- HeadCandy.com <michaelv@MindBender.serv.net>
List: current-users
Date: 09/09/1997 10:12:09
>> Obviously if there is no name, one can't get the name. But when there is
>> a name, it should be possible to get it :-). Is there no way to
>> accomplish that in the kernel short of walking up the tree?

>No.  I apologize for what I hope is a way-too-basic explanation, but:
>vnodes don't have names.  Entry-names have vnodes.  Walking the tree to find
>a currently-plausible pathname for a vnode is the only way to come up with
>a pathname for a file.  The kernel does not keep around any string
>corresponding to what the pathname of a vnode might have been the last time
>it was looked up.  This would be burdensome to keep, potentially expensive to
>generate, and very expensive to keep correct (unless you declare that you don't
>care if it's correct, in which case why maintain it at all?).

It should also be pointed out that it could have several names (hard
links to the same file/directory), and the first name you find might
not be the one that makes "sense".

-----------------------------------------------------------------------------
  Michael L. VanLoon                           michaelv@MindBender.serv.net
      Contract software development for Windows NT, Windows 95 and Unix.
             Windows NT and Unix server development in C++ and C.

        --<  Free your mind and your machine -- NetBSD free un*x  >--
    NetBSD working ports: 386+PC, Mac 68k, Amiga, Atari 68k, HP300, Sun3,
        Sun4/4c/4m, DEC MIPS, DEC Alpha, PC532, VAX, MVME68k, arm32...
    NetBSD ports in progress: PICA, others...
-----------------------------------------------------------------------------