From: Andreas Dilger <adilger@sun.com>
To: Theodore Tso <tytso@MIT.EDU>
Cc: linux-ext4@vger.kernel.org
Subject: Re: What's cooking in e2fsprogs.git (topics)
Date: Fri, 29 Feb 2008 11:59:48 -0800 [thread overview]
Message-ID: <20080229195948.GN2997@webber.adilger.int> (raw)
In-Reply-To: <20080229154333.GC8968@mit.edu>
On Feb 29, 2008 10:43 -0500, Theodore Ts'o wrote:
> * ad/nlinks-dir (Sat Feb 2 01:25:03 2008 -0700) 1 commit
> - e2fsprogs-nlinks.patch
>
> I'm really not sure about this change in e2fsck/pass4.c:
>
> - if (fix_problem(ctx, PR_4_BAD_REF_COUNT, &pctx)) {
> + /* i_link_count was previously exceeded, but no longer
> + * is, fix this but don't consider it an error */
> + if ((LINUX_S_ISDIR(inode->i_mode) && link_counted > 1 &&
> + (inode->i_flags & EXT2_INDEX_FL) &&
> + link_count == 1 && !(ctx->options & E2F_OPT_NO)) ||
> + (fix_problem(ctx, PR_4_BAD_REF_COUNT, &pctx))) {
> inode->i_links_count = link_counted;
> e2fsck_write_inode(ctx, i, inode, "pass4");
> }
>
> Why do we require EXT2_INDEX_FL to be set before deciding that
> it's OK if the i_link_count is 1 but we now have less than
> EXT2_LINK_MAX links?
The reason that INDEX_FL is important here is because only indexed
directories are allowed to exceed 65000 entries in the kernel. This is a
"save users from themselves" measure, because of the O(n^2) operations
needed to create/delete entries in unindexed directories. It also helps
detect the difference between corruption and expected behaviour.
> As a result of the "make check" failures which I mentioned at
> the beginning of this note, I noticed the following
> unfortunate problem in how errors are getting reported in
> e2fsck pass 5. As a sample:
>
> Block bitmap differences: +8195Group 3 block(s) in use but group is marked BLO
> CK_UNINIT
> Fix? yes
>
> This mangling is happening because error reporting for
> PR_5_INODE_UNINIT is getting intermingled with the
> PR_5_INODE_USED/PR_5_INODE_UNUSED reporting, which isn't a
> good idea. The comment around the code says:
>
> /*
> * We should never hit this, because it means that
> * inodes were marked in use that weren't noticed
> * in pass1 or pass 2. It is easier to fix the problem
> * than to kill e2fsck and leave the user stuck.
> */
>
> So I'm guessing there's something else wrong going on here....
Does this test case have both flexbg and uninit_groups? Alternately,
maybe some part of the e2fsck fixup code is allocating blocks in the
group, but doesn't know that the UNINIT flag needs to be cleared.
Instead of burning a lot of time on diagnosing this, I'd suggest to
try using the original uninit_groups patchset + Jose's patch on top of
that series to see if that works better?
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
next prev parent reply other threads:[~2008-02-29 19:59 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-04 22:42 What's cooking in e2fsprogs.git (topics) Theodore Ts'o, Theodore Ts'o
2007-11-05 2:15 ` Andreas Dilger
2007-11-05 4:32 ` Theodore Tso
2007-11-05 15:06 ` Andreas Dilger
2007-12-17 17:11 ` Theodore Tso
2007-12-17 22:34 ` Andreas Dilger
2007-12-17 22:59 ` Theodore Tso
2007-12-17 23:36 ` Andreas Dilger
2007-12-18 3:32 ` Theodore Tso
2007-12-18 8:13 ` Florian Weimer
2007-12-18 19:10 ` What's cooking in e2fsprogs.git (topics) - [RFC] FLEX_BG bmap and itable allocation patch Jose R. Santos
2008-02-11 4:51 ` What's cooking in e2fsprogs.git (topics) Theodore Tso
2008-02-11 5:08 ` Eric Sandeen
2008-02-11 7:24 ` Theodore Tso
2008-02-19 5:09 ` Theodore Tso
2008-02-20 18:46 ` Eric Sandeen
2008-02-21 14:05 ` Theodore Tso
2008-02-21 16:40 ` Eric Sandeen
2008-02-22 23:14 ` Andreas Dilger
2008-02-23 0:15 ` Theodore Tso
2008-02-25 4:20 ` Andreas Dilger
2008-02-25 15:13 ` Theodore Tso
2008-02-25 16:01 ` Aneesh Kumar K.V
2008-02-25 17:32 ` Eric Sandeen
2008-02-25 20:23 ` Theodore Tso
2008-02-29 15:43 ` Theodore Tso
2008-02-29 19:59 ` Andreas Dilger [this message]
2008-02-29 22:49 ` Theodore Tso
2008-03-02 3:24 ` Jose R. Santos
2008-03-05 16:59 ` Jose R. Santos
2008-03-13 18:11 ` Theodore Tso
2008-03-20 20:32 ` Theodore Tso
2008-04-02 0:09 ` Theodore Tso
2008-04-07 17:12 ` Theodore Tso
2008-04-18 18:43 ` Theodore Tso
2008-04-21 16:41 ` Theodore Tso
2008-04-23 7:32 ` Aneesh Kumar K.V
2008-04-23 11:55 ` Theodore Tso
2008-04-23 18:58 ` Aneesh Kumar K.V
2008-04-28 19:44 ` The changes I made to the undo-mgr (Re: What's cooking in e2fsprogs.git (topics)) Theodore Tso
2008-05-24 23:54 ` What's cooking in e2fsprogs.git (topics) Theodore Tso
2008-06-03 2:40 ` Theodore Tso
2008-06-17 12:03 ` Theodore Tso
2008-03-02 23:50 ` Christian Kujau
-- strict thread matches above, loose matches on Subject: below --
2007-10-16 4:48 Theodore Ts'o
2007-10-16 5:36 ` Aneesh Kumar K.V
2007-10-16 16:41 ` Jose R. Santos
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=20080229195948.GN2997@webber.adilger.int \
--to=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 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).