From: Valerie Aurora <vaurora@redhat.com>
To: "J. R. Okajima" <hooanon05@yahoo.co.jp>
Cc: David Dillow <dillowda@ornl.gov>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christoph Hellwig <hch@infradead.org>,
Miklos Szeredi <miklos@szeredi.hu>, Jan Blunck <jblunck@suse.de>,
Jamie Lokier <jamie@shareable.org>,
David Woodhouse <dwmw2@infradead.org>,
Arnd Bergmann <arnd@arndb.de>, Andreas Dilger <adilger@sun.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2] d_ino considered harmful
Date: Thu, 17 Jun 2010 14:58:29 -0400 [thread overview]
Message-ID: <20100617185828.GC14389@shell> (raw)
In-Reply-To: <30568.1276797848@jrobl>
On Fri, Jun 18, 2010 at 03:04:08AM +0900, J. R. Okajima wrote:
>
> David Dillow:
> > For example, our main Lustre scratch space has over 285 million files in
> > it, and using find -inum takes over 72 hours to walk the tree using
> :::
> > Using ne2scan -- which uses libext2fs and combines the inode scan and
> > the name lookup -- takes over 48 hours to generate a list of candidate
> > files for the purge example. With an optimized inode scan and the custom
> :::
>
> While I've never heard of ne2scan, I am interested in this simplified
> problem such as "find the pathname(s) from an inum in a huge fs."
> Is ne2scan essentially equivalent to "debugfs ncheck inum"?
>
> About Valeris's patch, as long as "ls -i" is useful/helpful,
> > + /* Use of d_ino without st_dev is always buggy. */
> is not true.
What I'm hearing again and again is that d_ino is useful to improve
performance. As Andreas put it to me, if d_ino is the same, the
referenced file may or may not be the same, but if it's different, the
files are definitely different. Only in well-controlled environments
known not to have submounts or bind mounts do people trust d_ino to be
from the same file system as the other entries in a directory.
I only submitted this patch half-seriously - mainly I wanted to find
out how people are using d_ino, and therefore what I need to do for
fallthru directory entries in union mounts.
In order to get the correct inode number for a directory entry
referring to a lower layer file or directory, we have to do a
->lookup() from the fs-specific readdir code (or else require that
fallthrus store an arbitrarily sized integer - which seriously
restricts the implementation). Now, doing a ->lookup() to get d_ino
makes no sense if we are using d_ino as a way to avoid the cost
stat(), which is mainly the ->lookup(). And you definitely can't use
d_ino by itself in a union mount.
I'm inclined to save the trouble and just return 1 in d_ino for
fallthru directory entries, especially now that I've tested it
system-wide and had no obvious problems.
-VAL
next prev parent reply other threads:[~2010-06-17 18:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-16 18:59 [PATCH] d_ino considered harmful Valerie Aurora
2010-06-16 18:59 ` Valerie Aurora
2010-06-16 19:10 ` Arnd Bergmann
2010-06-16 19:58 ` Valerie Aurora
2010-06-16 19:15 ` Jeff Layton
2010-06-16 19:58 ` Valerie Aurora
2010-06-16 19:54 ` [PATCH v2] " Valerie Aurora
2010-06-16 19:54 ` Valerie Aurora
2010-06-16 20:44 ` David Dillow
2010-06-17 18:04 ` J. R. Okajima
2010-06-17 18:17 ` David Dillow
2010-06-17 18:58 ` Valerie Aurora [this message]
2010-06-18 1:41 ` Andreas Dilger
2010-06-18 2:57 ` J. R. Okajima
2010-06-17 17:54 ` Jamie Lokier
2010-06-17 19:10 ` Valerie Aurora
2010-06-17 23:39 ` Andreas Dilger
2010-06-18 19:41 ` Valerie Aurora
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=20100617185828.GC14389@shell \
--to=vaurora@redhat.com \
--cc=adilger@sun.com \
--cc=arnd@arndb.de \
--cc=dillowda@ornl.gov \
--cc=dwmw2@infradead.org \
--cc=hch@infradead.org \
--cc=hooanon05@yahoo.co.jp \
--cc=jamie@shareable.org \
--cc=jblunck@suse.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.