lkml.org 
[lkml]   [2006]   [Mar]   [7]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
From"Joseph D. Wagner" <>
SubjectRE: Why ext3 uses different policies to allocate inodes for dirs and files?
DateMon, 6 Mar 2006 23:24:25 -0600
> The policy seems to distribute dir inodes uniformly on all block
> groups. Why do we want to do this?  Isn't it better to create a dir
> inode close to its parent dir inode?

Directories can, and frequently are, moved.  If you kept the dir inode close to its parent dir inode, you'd have to move dir inodes around every time you move directories.  Less is more.

Keeping the dir inodes uniform means the time to perform a name->inode lookup is relatively the same regardless of directory.  While admittedly this does not always yield the fastest performance, in this case we prefer consistency over speed.

I'm sure there are other good reasons too, but these two are enough to justify it.

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

\
 
 \ /
  Last update: 2006-03-07 05:25    [W:0.173 / U:0.010 seconds]
©2003-2008 Jasper Spaans