On 8/1/06, Dave Kleikamp <firstname.lastname@example.org> wrote:
On Mon, 2006-07-31 at 16:37 +0530, Kamal R. Prasad wrote:
> I was looking at some stuff related to ext2 and it seems as if one
> can look at an inode, and map to an entry in the dcache and resolve
> inode to filename mapping. My question to this forum is:-
> -can the same technique be used with jfs2 on linux ?
You don't really describe what the technique is. Something like
d_find_alias() may do what you want. Without knowing more about what
you're asking, I would assume that if the technique works for ext2, it
will probably work for jfs.
I am trying to find a mechanism wherein given an inode -one can find the filename with which it is associated. The technique that comes to mind is to locate the dentry corresponding to it, and then the name field in the dentry.
Are you suggesting d_find_alias() will do the job?
> -can the same technique be used with jfs2 on AIX ?
I have no idea
I guess it is not file system dependent -but rather name cache dependent.
> -is there a mechanism to suggest that the dcache entry for a jfs2
> inode is still valid?
There's nothing jfs-specific about a dcache entry. If "dentry->d_flags
& DCACHE_UNHASHED" is zero, then it should be valid.
IBM Linux Technology Center