From: Theodore Tso <tytso@mit.edu>
To: Kalpak Shah <kalpak@clusterfs.com>
Cc: Andreas Dilger <adilger@clusterfs.com>,
linux-ext4 <linux-ext4@vger.kernel.org>,
Lustre-discuss <Lustre-discuss@clusterfs.com>
Subject: Re: [PATCH] Correction to check_filetype()
Date: Fri, 30 Mar 2007 20:44:17 -0400 [thread overview]
Message-ID: <20070331004417.GJ3198@thunk.org> (raw)
In-Reply-To: <1172049359.4727.15.camel@garfield>
[-- Attachment #1: Type: text/plain, Size: 2305 bytes --]
On Wed, Feb 21, 2007 at 02:45:59PM +0530, Kalpak Shah wrote:
>
> If the mode of a directory gets corrupted, check_filetype() makes
> wrong decisions for all its sub-directories. For example, using
> debugfs we can corrupt the mode of a directory to 0140755 (i.e. a
> socket). e2fsck will set the filetype of all its subdirectories as 6
> (filetype for socket). All the subdirectories would be moved to
> lost+found, and in second run of e2fsck their filetype would be set
> back to 2.
Um, I'm not seeing this. Using stock e2fsprogs, given the following
test image, I'm not seeing the behavior you describe.
It does require a second e2fsck to fix things, which is bad; we need
to make sure the i_size is fixed in pass 1.
- Ted
e2fsck 1.40-WIP (14-Nov-2006)
Pass 1: Checking inodes, blocks, and sizes
Inode 12, i_blocks is 2, should be 0. Fix? yes
Pass 2: Checking directory structure
Entry 'dir' in / (2) has an incorrect filetype (was 2, should be 6).
Fix? yes
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Inode 2 ref count is 4, should be 3. Fix? yes
Inode 12 ref count is 2, should be 1. Fix? yes
Unattached inode 13
Connect to /lost+found? yes
Inode 13 ref count is 2, should be 1. Fix? yes
Unattached inode 14
Connect to /lost+found? yes
Inode 14 ref count is 2, should be 1. Fix? yes
Unattached inode 15
Connect to /lost+found? yes
Inode 15 ref count is 2, should be 1. Fix? yes
Pass 5: Checking group summary information
Block bitmap differences: -21
Fix? yes
Free blocks count wrong for group #0 (75, counted=76).
Fix? yes
Free blocks count wrong (75, counted=76).
Fix? yes
Directories count wrong for group #0 (3, counted=2).
Fix? yes
foo.img: ***** FILE SYSTEM WAS MODIFIED *****
foo.img: 15/16 files (0.0% non-contiguous), 24/100 blocks
<tytso@candygram> {/usr/projects/e2fsprogs/e2fsprogs/build/e2fsck}
730% e2fsck -fy foo.img
e2fsck 1.40-WIP (14-Nov-2006)
Pass 1: Checking inodes, blocks, and sizes
Special (device/socket/fifo) inode 12 has non-zero size. Fix? yes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
foo.img: ***** FILE SYSTEM WAS MODIFIED *****
foo.img: 15/16 files (0.0% non-contiguous), 24/100 blocks
[-- Attachment #2: foo.img.gz --]
[-- Type: application/octet-stream, Size: 621 bytes --]
next prev parent reply other threads:[~2007-03-31 0:44 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 [this message]
[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
[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=20070331004417.GJ3198@thunk.org \
--to=tytso@mit.edu \
--cc=Lustre-discuss@clusterfs.com \
--cc=adilger@clusterfs.com \
--cc=kalpak@clusterfs.com \
--cc=linux-ext4@vger.kernel.org \
/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).