[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: purpose of "." entry in a diretory
> Let me rephrase my question a little bit: BESIDES the obvious
> usage of "." entry, in terms of the filesystem, what is the
> purpose of "." entry?
>
> The obvious answer is that you can refer to the current
> directory using "./", however, in order to look up the "."
> entry, the kernel must have a knowledge of the current
> directory in the first place, doesn't it? The kernel needs
> the directory table for the current directory to look up
> which inode the "." entry refers to. Doesn't that seem a
> little redundant, since the kernel already knows what the
> current directory is?
> If the kernel is already caching the current directory table,
> it might as well just cache the current directory's inode.
>
> Coming back to my original question, does the kernel really
> need that "." entry? or is it purely for the user convenience?
>
See: http://www.kerneltraffic.org/kernel-traffic/kt20050404_305.html#4
-
Sekhar Nori.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/