From: Andreas Dilger <adilger@clusterfs.com>
To: "Joseph D. Wagner" <technojoe@josephdwagner.info>
Cc: '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 01:33:19 -0700 [thread overview]
Message-ID: <20060307083319.GH6393@schatzie.adilger.int> (raw)
In-Reply-To: <002601c641a7$6687d680$0201a8c0@joe>
On Mar 06, 2006 23:24 -0600, Joseph D. Wagner wrote:
> > 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.
I'm not sure what it is you are saying. Directories may be renamed, but
the inodes are never moved.
The reason that directory inodes are spread across the disk is that this
allows later balancing of the file inodes that are created within each
directory. If all of the parent directories are kept in the same group,
you would just end up having all inodes at the start of the filesystem
in use, with high fragmentation and no locality between directories and
the files created therein, and similar problems with inode blocks.
Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.
next prev parent reply other threads:[~2006-03-07 8:33 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 [this message]
2006-03-07 15:34 ` Joseph D. Wagner
2006-03-07 15:39 ` Matthew Wilcox
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=20060307083319.GH6393@schatzie.adilger.int \
--to=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).