From: phillip@lougher.demon.co.uk Subject: Re: dentry object Date: Tue, 28 Feb 2006 12:05:22 +0000 Message-ID: References: <44042E26.1050608@it.iitb.ac.in> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: Received: from anchor-post-31.mail.demon.net ([194.217.242.89]:56079 "EHLO anchor-post-31.mail.demon.net") by vger.kernel.org with ESMTP id S932377AbWB1MFZ (ORCPT ); Tue, 28 Feb 2006 07:05:25 -0500 To: "Ashish Khurange" , linux-fsdevel@vger.kernel.org In-Reply-To: <44042E26.1050608@it.iitb.ac.in> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org ashishk@it.iitb.ac.in wrote: > 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? > AFAIK yes, unless the filesystem is being exported in which case this may not hold. Read Documentation/filesystems/Exporting. Phillip > Regards, > - Ashish K. > - > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >