tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Max. number of subdirectories dump



On Sun, Aug 18, 2013 at 06:04:55PM +0200, Johnny Billquist wrote:
> It's an obvious optimization to keep type already in the directory
> itself. But is there any other reason why it was added there? It
> obviously means you have the same information in two places, with
> all the obvious risks of having the data out of sync, and potential
> mess from that... (I'm assuming the information is still in the
> inode anyway, since it could be interesting with hard links
> otherwise. By the way, this would assume that hard links must check
> what kind of thing you are adding a link to, so that your new
> directory entry gets the right type?)

The inode type doesn't change over the life time of the inode. As such,
all hard links have to be removed before it can change. Adding it avoids
a stat() call for a bunch of important applications and the associated
seek to read the inode from disk.

Joerg


Home | Main Index | Thread Index | Old Index