From: Matthew Wilcox <matthew@wil.cx>
To: "Joseph D. Wagner" <technojoe@josephdwagner.info>
Cc: 'Andreas Dilger' <adilger@clusterfs.com>,
'Xin Zhao' <uszhaoxin@gmail.com>,
'linux-kernel' <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: Why ext3 uses different policies to allocate inodes for dirs and files?
Date: Tue, 7 Mar 2006 08:39:10 -0700 [thread overview]
Message-ID: <20060307153910.GC7301@parisc-linux.org> (raw)
In-Reply-To: <001901c641fc$ae8120e0$0201a8c0@joe>
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.
prev parent reply other threads:[~2006-03-07 15:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-06 21:42 Why ext3 uses different policies to allocate inodes for dirs and files? Xin Zhao
2006-03-07 5:24 ` Joseph D. Wagner
2006-03-07 8:33 ` Andreas Dilger
2006-03-07 15:34 ` Joseph D. Wagner
2006-03-07 15:39 ` Matthew Wilcox [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060307153910.GC7301@parisc-linux.org \
--to=matthew@wil.cx \
--cc=adilger@clusterfs.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=technojoe@josephdwagner.info \
--cc=uszhaoxin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).