From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 25 05:17:34 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD9D716A41F for ; Thu, 25 Aug 2005 05:17:34 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82B2743D45 for ; Thu, 25 Aug 2005 05:17:34 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with ESMTP id D324946C61; Thu, 25 Aug 2005 01:17:33 -0400 (EDT) Date: Thu, 25 Aug 2005 06:17:32 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?= In-Reply-To: <867jeb8phr.fsf@xps.des.no> Message-ID: <20050825061451.D11335@fledge.watson.org> References: <20050824103243.47160.qmail@web52710.mail.yahoo.com> <867jeb8phr.fsf@xps.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-271999875-1124947052=:11335" Cc: freebsd-hackers@freebsd.org, kamalp@acm.org Subject: Re: vode to pathname X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2005 05:17:34 -0000 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" 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--