From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ashish Khurange Subject: dentry object Date: Tue, 28 Feb 2006 16:34:06 +0530 Message-ID: <44042E26.1050608@it.iitb.ac.in> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from smtp1.iitb.ac.in ([202.68.145.249]:48549 "HELO smtp1.iitb.ac.in") by vger.kernel.org with SMTP id S1751493AbWB1LEt (ORCPT ); Tue, 28 Feb 2006 06:04:49 -0500 To: linux-fsdevel@vger.kernel.org Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hi, From a given dentry, i want to generate that files absolute path. I don't want to use d_path, because it doesn't cross mount points. Here is the algorithm what I have decided. 1. From dentry object get dname. 2. store in string 3. if IS_ROOT (dentry) goto stop 3. find its parent using dentry->parent 4. go to 1. Stop. Will this work? I have one more question, when I have dentry of a file, then if dentries of all its parents up to '/' are present in the dcache? Regards, - Ashish K.