From: Eric Sandeen <sandeen@redhat.com>
To: Andreas Dilger <adilger@sun.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH][7/28] e2fsprogs-extents.patch
Date: Mon, 18 Feb 2008 11:56:53 -0600 [thread overview]
Message-ID: <47B9C6E5.2010304@redhat.com> (raw)
In-Reply-To: <20080202082701.GH31694@webber.adilger.int>
Andreas Dilger wrote:
> Support for checking 32-bit extents format inodes and the INCOMPAT_EXTENTS
> feature.
>
> Clear the high 16 bits of extents and index entries, since the
> extents patches did not do this explicitly. Some parts of this
> code need fixing for checking > 32-bit block filesystems (when
> INCOMPAT_64BIT support is added), marked "FIXME: 48-bit support".
>
> Verify extent headers in blocks, logical ordering of extents,
> logical ordering of indexes.
>
> Add explicit checking of {d,t,}indirect and index blocks to detect
> corruption instead of implicitly doing this by checking the referred
> blocks and only block-at-a-time correctness. This avoids incorrectly
> invoking the very lengthy duplicate blocks pass for bad indirect/index
> blocks. We may want to tune the "threshold" for how many errors make
> a "bad" indirect/index block.
>
> Add ability to split or remove extents in order to allow extent
> reallocation during the duplicate blocks pass.
>
...
> @@ -904,21 +910,75 @@ void e2fsck_pass1(e2fsck_t ctx)
> ctx->fs_sockets_count++;
> } else
> mark_inode_bad(ctx, ino);
> - if (inode->i_block[EXT2_IND_BLOCK])
> - ctx->fs_ind_count++;
> - if (inode->i_block[EXT2_DIND_BLOCK])
> - ctx->fs_dind_count++;
> - if (inode->i_block[EXT2_TIND_BLOCK])
> - ctx->fs_tind_count++;
> - if (inode->i_block[EXT2_IND_BLOCK] ||
> - inode->i_block[EXT2_DIND_BLOCK] ||
> - inode->i_block[EXT2_TIND_BLOCK] ||
> - inode->i_file_acl) {
> - inodes_to_process[process_inode_count].ino = ino;
> - inodes_to_process[process_inode_count].inode = *inode;
> - process_inode_count++;
> - } else
> - check_blocks(ctx, &pctx, block_buf);
> +
> + eh = (struct ext3_extent_header *)inode->i_block;
> + if ((inode->i_flags & EXT4_EXTENTS_FL)) {
> + if ((LINUX_S_ISREG(inode->i_mode) ||
> + LINUX_S_ISDIR(inode->i_mode)) &&
So this trips up on things like sockets, fifos, and block & char nodes.
Also this is unhappy:
> @@ -137,7 +141,7 @@ int e2fsck_pass1_check_device_inode(ext2
> * If the index flag is set, then this is a bogus
> * device/fifo/socket
> */
> - if (inode->i_flags & EXT2_INDEX_FL)
> + if (inode->i_flags & (EXT2_INDEX_FL | EXT4_EXTENTS_FL))
> return 0;
Do we really care if these have the extents flag set? IOW should we
make sure the kernel doesn't set the flag, or should we make e2fsck not
care...
There are enough checks in e2fsck to show the intent was that these
files should not have the extents flag set, but I'm not sure why it
matters enough that the kernel needs to run around being sure to clear
it....
Or... (rambling on now) it seems odd to me that zero-length files have
the extents flag set at all; should we only set extents when we actually
get a block allocated to the file? That would also take care of this
from the kernel side I think.
-Eric
next prev parent reply other threads:[~2008-02-18 17:57 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-02 7:59 [PATCH][0/28] Lustre e2fsprogs patch series Andreas Dilger
2008-02-02 8:14 ` [PATCH][1/28] e2fsprogs-specdotin.patch Andreas Dilger
2008-02-02 8:16 ` [PATCH] [2/28] e2fsprogs-eacheck.patch Andreas Dilger
2008-02-02 8:17 ` [PATCH][3/28] e2fsprogs-extended_ops.patch Andreas Dilger
2008-02-02 8:20 ` [PATCH][4/28] e2fsprogs-tests-f_unsorted_EAs.patch Andreas Dilger
2008-02-02 8:22 ` [PATCH][5/28] e2fsprogs-tests-f_ea_checks.patch Andreas Dilger
2008-02-02 8:25 ` [PATCH][6/28] e2fsprogs-nlinks.patch Andreas Dilger
2008-02-02 8:25 ` [PATCH][0/28] e2fsprogs-extents.patch Andreas Dilger
2008-02-02 8:27 ` [PATCH][7/28] e2fsprogs-extents.patch Andreas Dilger
2008-02-18 17:56 ` Eric Sandeen [this message]
2008-02-18 18:12 ` Eric Sandeen
2008-02-18 19:53 ` Theodore Tso
2008-02-18 20:48 ` Eric Sandeen
2008-02-18 22:09 ` Theodore Tso
2008-02-19 4:35 ` Andreas Dilger
2008-02-02 8:29 ` [PATCH][8/28] e2fsprogs-config-before-cmdline.patch Andreas Dilger
2008-02-02 8:30 ` [PATCH][9/28] e2fsprogs-SLES10--m-support.patch Andreas Dilger
2008-02-02 8:34 ` [PATCH][10/28] e2fsprogs-uninit.patch Andreas Dilger
2008-03-15 19:41 ` Theodore Tso
2008-03-16 0:34 ` Andreas Dilger
2008-03-17 12:33 ` Theodore Tso
2008-02-02 8:36 ` [PATCH][11/28] e2fsprogs-nlinks-flag.patch Andreas Dilger
2008-02-02 8:36 ` [PATCH][12/28] e2fsprogs-expand-extra-isize.patch Andreas Dilger
2008-02-02 8:40 ` [PATCH][14/28] e2fsprogs-tests-f_expisize_ea_del.patch Andreas Dilger
2008-02-02 8:41 ` [PATCH][15/28] e2fsprogs-ibadness-counter.patch Andreas Dilger
2008-02-02 8:43 ` [PATCH][16/28] e2fsprogs-tests-f_ibadness.patch Andreas Dilger
2008-02-02 8:46 ` [PATCH][18/28] e2fsprogs-tests-f_random_corruption.patch Andreas Dilger
2008-02-02 8:47 ` [PATCH][19/28] e2fsprogs-stride_option.patch Andreas Dilger
2008-02-02 8:48 ` [PATCH][20/28] e2fsprogs-mmp.patch Andreas Dilger
2008-02-02 8:49 ` [PATCH][21/28] e2fsprogs-journal_chksum.patch Andreas Dilger
2008-02-02 8:54 ` [PATCH][25/28] e2fsprogs-i_size-corruption.patch Andreas Dilger
2008-02-02 8:54 ` [PATCH][26/28] e2fsprogs-fiemap.patch Andreas Dilger
2008-02-02 8:56 ` [PATCH][27/28] e2fsprogs-debugfs-supported_features.patch Andreas Dilger
2008-02-02 8:57 ` [PATCH][28/28] e2fsprogs-lts-make_rpms.patch Andreas Dilger
2008-02-11 4:19 ` [PATCH][0/28] Lustre e2fsprogs patch series Theodore Tso
2008-02-11 10:22 ` Aneesh Kumar K.V
2008-02-11 20:09 ` Andreas Dilger
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=47B9C6E5.2010304@redhat.com \
--to=sandeen@redhat.com \
--cc=adilger@sun.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 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.