From: "Lukáš Czerner" <lczerner@redhat.com>
To: Andreas Dilger <adilger@dilger.ca>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/3] ext4: Try to initialize all groups we can in case of failure on ppc64
Date: Tue, 2 Jun 2015 09:53:27 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.1506020953100.4950@localhost.localdomain> (raw)
In-Reply-To: <A65D0935-3D92-4C0A-979A-7AAD8C7A39FA@dilger.ca>
On Mon, 1 Jun 2015, Andreas Dilger wrote:
> Date: Mon, 1 Jun 2015 13:15:35 -0600
> From: Andreas Dilger <adilger@dilger.ca>
> To: Lukas Czerner <lczerner@redhat.com>
> Cc: linux-ext4@vger.kernel.org
> Subject: Re: [PATCH 2/3] ext4: Try to initialize all groups we can in case of
> failure on ppc64
>
>
> > On Jun 1, 2015, at 1:55 AM, Lukas Czerner <lczerner@redhat.com> wrote:
> >
> > Currently on the machines with page size > block size when initializing
> > block group buddy cache we initialize it for all the block group bitmaps
> > in the page. However in the case of read error, checksum error, or if
> > a single bitmap is in any way corrupted we would fail to initialize all
> > of the bitmaps. This is problematic because we will not have access to
> > the other allocation groups even though those might be perfectly fine
> > and usable.
> >
> > Fix this by reading all the bitmaps instead of error out on the first
> > problem and simply skip the bitmaps which were either not read properly,
> > or are not valid.
> >
> > Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> > ---
> > fs/ext4/mballoc.c | 10 +++++++---
> > 1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> > index 8d1e602..5677a03 100644
> > --- a/fs/ext4/mballoc.c
> > +++ b/fs/ext4/mballoc.c
> > @@ -882,10 +882,8 @@ static int ext4_mb_init_cache(struct page *page, char *incore)
> >
> > /* wait for I/O completion */
> > for (i = 0, group = first_group; i < groups_per_page; i++, group++) {
> > - if (bh[i] && ext4_wait_block_bitmap(sb, group, bh[i])) {
> > + if (bh[i] && ext4_wait_block_bitmap(sb, group, bh[i]))
> > err = -EIO;
> > - goto out;
> > - }
> > }
> >
> > first_block = page->index * blocks_per_page;
> > @@ -898,6 +896,12 @@ static int ext4_mb_init_cache(struct page *page, char *incore)
> > /* skip initialized uptodate buddy */
> > continue;
> >
> > + if (!buffer_verified(bh[group - first_group]))
> > + /* Skip faulty bitmaps */
> > + continue;
> > + else
> > + err = 0;
>
> Not really a need for "else" here after the "continue" line, but that
> is mostly harmless.
>
> Cheers, Andreas
Good point, I can fix that.
Thanks!
-Lukas
next prev parent reply other threads:[~2015-06-02 7:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-01 7:54 [PATCH 1/3] ext4: Verify block bitmap even after fresh initialization Lukas Czerner
2015-06-01 7:55 ` [PATCH 2/3] ext4: Try to initialize all groups we can in case of failure on ppc64 Lukas Czerner
2015-06-01 19:15 ` Andreas Dilger
2015-06-02 7:53 ` Lukáš Czerner [this message]
2015-06-01 7:55 ` [PATCH 3/3] ext4: Return error code from ext4_mb_good_group() Lukas Czerner
2015-06-01 19:20 ` [PATCH 1/3] ext4: Verify block bitmap even after fresh initialization Andreas Dilger
2015-06-02 7:59 ` Lukáš Czerner
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=alpine.LFD.2.00.1506020953100.4950@localhost.localdomain \
--to=lczerner@redhat.com \
--cc=adilger@dilger.ca \
--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).