From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 5 13:52:20 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 ACF6A16A41F for ; Mon, 5 Sep 2005 13:52:20 +0000 (GMT) (envelope-from uvarovsl@mail.pnpi.spb.ru) Received: from mail.lsi.ru (mail.lsi.ru [212.58.192.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04F0443D46 for ; Mon, 5 Sep 2005 13:52:19 +0000 (GMT) (envelope-from uvarovsl@mail.pnpi.spb.ru) Received: by mail.lsi.ru (Postfix, from userid 426) id 4523D38703E; Mon, 5 Sep 2005 17:52:17 +0400 (MSD) Received: from [10.0.0.10] (unknown [212.58.210.222]) by mail.lsi.ru (Postfix) with ESMTP id 07A94387000 for ; Mon, 5 Sep 2005 17:52:14 +0400 (MSD) Message-ID: <431C4D90.2010602@mail.pnpi.spb.ru> Date: Mon, 05 Sep 2005 17:52:16 +0400 From: Sergey Uvarov User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050719 Fedora/1.7.10-1.5.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: vn_fullpath() again 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: Mon, 05 Sep 2005 13:52:20 -0000 Hello hackers, all knows that vn_fullpath() is unreliable. However I really need to get a filename for a given vnode. To simplify the task, I do not care of synthetic file systems or hardlinks. I have looked through archives in hope to find a better solution. It seems that linux_getcwd() approach could help. However to make that code work for me, I need to know a directory vnode where the file resides. vnode->v_dd field looks promising. But as I understand it did not help if file name is not in a name cache. So the question: is it ever possible to get directory vnode for a given file vnode? Thank you in advance, Sergey.