From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ashish Khurange Subject: Re: dentry object Date: Tue, 28 Feb 2006 22:17:40 +0530 Message-ID: <44047EAC.4080207@it.iitb.ac.in> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from smtp1.iitb.ac.in ([202.68.145.249]:16617 "HELO smtp1.iitb.ac.in") by vger.kernel.org with SMTP id S1751068AbWB1Qs0 (ORCPT ); Tue, 28 Feb 2006 11:48:26 -0500 To: phillip@lougher.demon.co.uk In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org phillip@lougher.demon.co.uk wrote: I am sorry, if I am not using right terms. Please consider. I have one basic query. I tried to google for 'dentry object' but didnt found the right answer. When I have dentry object of a file. Can I traverse till root's dentry using dentry->d_parent, step by step? How does kernel shrinks dentry cache? Does it removes any of the dentry which is in 'parent path' of the concerned dentry object? If kernel can remove such parent dentry, what happens when I access dentry->d_parent. Thanks, - Ashish > > > > >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 >> >> >> > > >