Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Aug 2005 06:17:32 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?= <des@des.no>
Cc:        freebsd-hackers@freebsd.org, kamalp@acm.org
Subject:   Re: vode to pathname
Message-ID:  <20050825061451.D11335@fledge.watson.org>
In-Reply-To: <867jeb8phr.fsf@xps.des.no>
References:  <20050824103243.47160.qmail@web52710.mail.yahoo.com> <867jeb8phr.fsf@xps.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-271999875-1124947052=:11335
Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE


On Wed, 24 Aug 2005, Dag-Erling Sm=F8rgrav wrote:

> "Kamal R. Prasad" <kamalpr@yahoo.com> writes:
>> So the question is, how do I get hold of pathname given
>> vnode*/(inode, devno, generation no) -without relying on the name
>> cache (on freebsd)?
>
> You can't.  The semantics of Unix file systems are such that the mapping=
=20
> from file name to file is one-way.  Furthermore, a file can be=20
> associated with more than one file name, or even none at all (if it has=
=20
> been unlinked but is still held open by a process).

In fact, there's another troublesome edge case -- different files can also=
=20
return the same name, if you have a way to generate names from linked=20
files, due to mountpoint covering.  Covered vnodes can still be accessed=20
after the mount, if they have been opened, or if the cwd of a process is a=
=20
directory (other than the mountpoint vnode) of the covered file system,=20
and an identically named node can exist in the covering file system.

Robert N M Watson
--0-271999875-1124947052=:11335--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050825061451.D11335>