* dentry object
@ 2006-02-28 11:04 Ashish Khurange
2006-02-28 12:05 ` phillip
2006-02-28 16:00 ` Ian Kent
0 siblings, 2 replies; 4+ messages in thread
From: Ashish Khurange @ 2006-02-28 11:04 UTC (permalink / raw)
To: linux-fsdevel
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dentry object
2006-02-28 11:04 dentry object Ashish Khurange
@ 2006-02-28 12:05 ` phillip
2006-02-28 16:47 ` Ashish Khurange
2006-02-28 16:00 ` Ian Kent
1 sibling, 1 reply; 4+ messages in thread
From: phillip @ 2006-02-28 12:05 UTC (permalink / raw)
To: Ashish Khurange, linux-fsdevel
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dentry object
2006-02-28 11:04 dentry object Ashish Khurange
2006-02-28 12:05 ` phillip
@ 2006-02-28 16:00 ` Ian Kent
1 sibling, 0 replies; 4+ messages in thread
From: Ian Kent @ 2006-02-28 16:00 UTC (permalink / raw)
To: Ashish Khurange; +Cc: linux-fsdevel
On Tue, 28 Feb 2006, Ashish Khurange 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.
Don't think this will cross mountpoints.
dentry->d_parent -> dentry at the root of a filesystem.
Check out fs/dcache.c:__d_path and look moe closely at d_path.
> 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.
> -
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dentry object
2006-02-28 12:05 ` phillip
@ 2006-02-28 16:47 ` Ashish Khurange
0 siblings, 0 replies; 4+ messages in thread
From: Ashish Khurange @ 2006-02-28 16:47 UTC (permalink / raw)
To: phillip; +Cc: linux-fsdevel
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
>>
>>
>>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-02-28 16:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-28 11:04 dentry object Ashish Khurange
2006-02-28 12:05 ` phillip
2006-02-28 16:47 ` Ashish Khurange
2006-02-28 16:00 ` Ian Kent
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).