Re: Why ext3 uses different policies to allocate inodes for dirs and files?

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

 



On Tue, Mar 07, 2006 at 09:34:53AM -0600, Joseph D. Wagner wrote:
> > I'm not sure what it is you are saying.  Directories may be renamed, but
> > the inodes are never moved.
> 
> If the "dir inode" were to be moved closer to the "parent dir inode", this would become quite an expensive "move" operation, as it would have to move all of the "dir inodes" of the "i386-redhat-linux" directory and all subdirectories away from the "parent dir inode" of "/usr/local/lib/" and closer to the "parent dir inode" of "/usr/lib/".

inodes are allocated once and never moved.  We're talking about initial
allocation.  So even though files have their inodes allocated near
their parent directory's inode, their inode is not moved when moved to
another directory.

The reason, as Andreas said, is that if we did allocate directory inodes
near their parent inode, we would end up just filling up from the start
of the drive and never spreading out.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux