Re: structure dentry help...

dony (dony.he@huawei.com.cn)
Tue, 2 Nov 1999 05:07:23 +0800


On Mon, 01 Nov 1999, Matthew Wilcox wrote:
> On Tue, Nov 02, 1999 at 12:02:37AM +0800, dony wrote:
> > > It's slightly messy, but the current layout looks so:
> > > d_parent: points to the parent node in the tree.
> >
> > Does d_parent mean that it points to this dentry's parent node? I am really
> > confused.
>
> Yes.
>
> > > d_subdirs: anchor of the cyclic list that goes through all
> > > children
> >
> > "all children " means whose children? this dentry's childrenor this dentry's
> > parent's children? In the Dcache.h, "d_subdirs" is explained as "our
> > children". I am very much confused.
>
> The children of this dentry.
>
> > > d_children: that's where the aforementioned list sits (i.e we
> > > have parent's d_subdirs <-> 1st child's d_children <-> 2nd child's
> > > d_children <-> ... <-> parent's d_subdirs).
> >
> > In Dcache.h, "d_children" is explained as "child of parent list". that is to
> > say, it points to this dentry's parent's children , instead of pointing to this
> > dentry's own children? right?
>
> The siblings of this dentry... mmm, Al, a rename might not be a bad idea
> when you do the Grand VFS Cleanup.
>
> d_children -> d_sibling
> d_subdirs -> d_child

> > > d_mounts: who overlaps it (root of the tree mounted atop of our
> > > dentry) _or_ dentry itself if it's not a mountpoint; in other words it's a
> > > step upwards.
> > > d_covers: opposite.
> >
> > Sorry, I still cannot distinguish between d_mounts and d_covers. Say a
> > example, if /dev/cdrom is mounted under /mnt , then what does d_mounts and
> > d_covers mean respectively? What's the difference or relationship between them?
>
> /mnt has d_covers pointing to the root of the filesystem mounted on it.
> d_mounts of the root of the mounted filesystem points to /mnt on the
> root filesystem.

With your kind help, now I can understand d_parent, d_subdirs, d_child. But I
still cannot grasp the meaning of d_covers and d_mounts exactly :-((
Can you give me more detailed information about these two, please?
Thank you very much.


> --
> Matthew Wilcox <willy@bofh.ai>
> "Windows and MacOS are products, contrived by engineers in the service of
> specific companies. Unix, by contrast, is not so much a product as it is a
> painstakingly compiled oral history of the hacker subculture." - N Stephenson

--
####################################
Linux is more powerful than windows
dony.he@huawei.com.cn
####################################

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/