linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Joseph D. Wagner" <technojoe@josephdwagner.info>
To: "'Xin Zhao'" <uszhaoxin@gmail.com>,
	"'linux-kernel'" <linux-kernel@vger.kernel.org>
Cc: <linux-fsdevel@vger.kernel.org>
Subject: RE: Why ext3 uses different policies to allocate inodes for dirs and files?
Date: Mon, 6 Mar 2006 23:24:25 -0600	[thread overview]
Message-ID: <002601c641a7$6687d680$0201a8c0@joe> (raw)
In-Reply-To: <4ae3c140603061342r26ca2226s2e6e41792104c633@mail.gmail.com>

> 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

  reply	other threads:[~2006-03-07  5:23 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 [this message]
2006-03-07  8:33   ` Andreas Dilger
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='002601c641a7$6687d680$0201a8c0@joe' \
    --to=technojoe@josephdwagner.info \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).