From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/2] ext4: Spot-check block group sub-table locations
Date: Wed, 30 Oct 2013 10:33:49 -0700 [thread overview]
Message-ID: <20131030173349.GA8208@birch.djwong.org> (raw)
In-Reply-To: <20131030164507.GC13343@thunk.org>
On Wed, Oct 30, 2013 at 12:45:07PM -0400, Theodore Ts'o wrote:
> On Wed, Oct 09, 2013 at 03:08:24PM -0700, Darrick J. Wong wrote:
> > > FWIW, I notice that in ext4_check_descriptors() we also check the
> > > location of bitmap. So maybe we could use ext4_is_sane_bgdata_location
> > > in that function.
> >
> > That could be done, but all we'd be doing is trading this:
> >
> > block_bitmap = ext4_block_bitmap(sb, gdp);
> > if (block_bitmap < first_block || block_bitmap > last_block) {
> >
> > for this slightly slower code:
> >
> > if (ext4_is_sane_bgdata_location(sb, gdp,
> > ext4_block_bitmap(sb, gdb))) {
> >
> > I don't know if that's worth the code churn or not. It's an easy change, but I
> > don't think it adds much. Ted -- if you want me to make the change I'll do it,
> > but if you're content to leave the patch as it is, then so am I.
>
> The question I have is if we are checking to make sure all of the
> block and inode bitmaps are sane at mount time, how much is it worth
> it to check to make sure that they are sane each time we need to load
> the bitmap? This is especially true since for ext4 file systems with
> flex_bg, the only real check we can do is to is whether the block
> number is out of range, which will almost certainly cause a device
> error.
Probably not worth much, but I thought it was cheap compared to making and
bouncing an IO. Also, if the check fails, we can mark the bg offline and let
fsck sort out the mess. The regular error path doesn't do this... though we
could change that too.
--D
>
> - Ted
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-10-30 17:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-28 0:13 [PATCH v1.1 0/2] ext4: Shut down block groups when damage is detected, part 2 Darrick J. Wong
2013-09-28 0:13 ` [PATCH 1/2] ext4: Don't count free clusters from a corrupt block group Darrick J. Wong
2013-09-29 6:20 ` Zheng Liu
2013-10-30 15:21 ` Theodore Ts'o
2013-09-28 0:14 ` [PATCH 2/2] ext4: Spot-check block group sub-table locations Darrick J. Wong
2013-09-29 6:44 ` Zheng Liu
2013-10-09 22:08 ` Darrick J. Wong
2013-10-30 16:45 ` Theodore Ts'o
2013-10-30 17:33 ` Darrick J. Wong [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-09-27 0:03 [PATCH v1 0/2] ext4: Shut down block groups when damage is detected, part 2 Darrick J. Wong
2013-09-27 0:03 ` [PATCH 2/2] ext4: Spot-check block group sub-table locations Darrick J. Wong
2013-09-27 5:40 ` Zheng Liu
2013-09-27 17:57 ` Darrick J. Wong
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=20131030173349.GA8208@birch.djwong.org \
--to=darrick.wong@oracle.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).