From: Kalpak Shah <kalpak@clusterfs.com>
To: Theodore Tso <tytso@mit.edu>
Cc: linux-ext4 <linux-ext4@vger.kernel.org>,
Lustre-discuss <Lustre-discuss@clusterfs.com>
Subject: Re: [PATCH] Correction to check_filetype()
Date: Sun, 01 Apr 2007 01:10:10 +0530 [thread overview]
Message-ID: <1175370010.3064.15.camel@garfield> (raw)
In-Reply-To: <20070331143926.GG25539@thunk.org>
On Sat, 2007-03-31 at 10:39 -0400, Theodore Tso wrote:
> On Sat, Mar 31, 2007 at 08:35:09AM -0400, Theodore Tso wrote:
> > And we can't really check the case where a directory gets turned into
> > a regular file without destroying e2fsck's performance, since that
> > would require reading the first block of every single file, and this
> > also significantly increases the chance of false positives. So it's a
> > lot of complexity for what seems to have always been an artificial
> > test case.
Yes, you can't check whether each regular file is a directory or not.
The only case which is easy to check is whether the mode of a directory
is corrupted since directories will always have a "." and ".." entry.
Note that we will still lose all data of a regular file if its mode is
changed to lets say, a socket. But there is hardly anything we can do
about this since there is no special check that can be associated with a
regular file.
Since dir_index feature is going to be set by default in ext3/4, maybe
we can check for EXT2_INDEX_FL in check_is_really_dir() and if this flag
is set then check if such a file is a directory or not. So we would not
be reading the first block of each file and yet would be able to correct
most directory mode corruptions.
Thanks,
Kalpak.
next prev parent reply other threads:[~2007-03-31 19:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-21 9:15 [PATCH] Correction to check_filetype() Kalpak Shah
2007-02-21 11:49 ` Kalpak Shah
2007-02-21 14:49 ` Peter Staubach
[not found] ` <45DC5BFF.4000302-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2007-02-21 15:26 ` Kalpak Shah
2007-03-31 0:44 ` Theodore Tso
[not found] ` <20070331004417.GJ3198-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2007-03-31 8:16 ` Andreas Dilger
2007-03-31 12:35 ` Theodore Tso
2007-03-31 14:39 ` Theodore Tso
2007-03-31 19:40 ` Kalpak Shah [this message]
[not found] ` <20070331143926.GG25539-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2007-04-03 17:37 ` Andreas Dilger
2007-04-03 19:58 ` Theodore Tso
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=1175370010.3064.15.camel@garfield \
--to=kalpak@clusterfs.com \
--cc=Lustre-discuss@clusterfs.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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).