From: Curt Wohlgemuth <curtw@google.com>
To: Jan Kara <jack@suse.cz>
Cc: tytso@mit.edu, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 1/2] ext4: Fix BUG_ON in ext4_da_block_invalidatepages()
Date: Wed, 16 Mar 2011 14:02:02 -0700 [thread overview]
Message-ID: <AANLkTin31soAwuZERFTikPtCHXtj6G52HXgj6ep2=eGR@mail.gmail.com> (raw)
In-Reply-To: <1300308774-14140-2-git-send-email-jack@suse.cz>
Hi Jan:
This problem was fixed by the patch I sent on 18 Feb, titled
[PATCH 1/2] ext4: mark multi-page IO complete on mapping failure
I guess this didn't make it into 2.6.38, but it's in the ext4 patch queue now.
Thanks,
Curt
On Wed, Mar 16, 2011 at 1:52 PM, Jan Kara <jack@suse.cz> wrote:
> When an allocation of blocks fails in mpage_da_map_and_submit() e.g. because of
> EIO we call ext4_da_block_invalidatepages() to invalidate pages we cannot write
> but we fail to set mpd->io_done. Thus we continue searching for dirty pages and
> add them to the current extent in mpd structure. Eventually we try to allocate
> blocks for the extent again and strange things start happening. In particular
> if the allocation fails again, we try to invalidate pages again and that
> triggers BUG_ON in ext4_da_block_invalidatepages().
>
> Fix the issue by setting mpd->io_done after the pages are invalidated.
>
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
> fs/ext4/inode.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 9f7f9e4..337d9ca 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -2314,6 +2314,7 @@ static void mpage_da_map_and_submit(struct mpage_da_data *mpd)
> /* invalidate all the pages */
> ext4_da_block_invalidatepages(mpd, next,
> mpd->b_size >> mpd->inode->i_blkbits);
> + mpd->io_done = 1;
> return;
> }
> BUG_ON(blks == 0);
> --
> 1.7.1
>
> --
> 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
>
--
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:[~2011-03-16 21:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-16 20:52 [PATCH 0/2] Fix BUG_ON and hang in ext4_da_writepages() in presence of IO errors Jan Kara
2011-03-16 20:52 ` [PATCH 1/2] ext4: Fix BUG_ON in ext4_da_block_invalidatepages() Jan Kara
2011-03-16 21:02 ` Curt Wohlgemuth [this message]
2011-03-16 21:11 ` Jan Kara
2011-03-16 20:52 ` [PATCH 2/2] ext4: Redirty page which could not be added to current extent in __mpage_da_writepage() Jan Kara
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='AANLkTin31soAwuZERFTikPtCHXtj6G52HXgj6ep2=eGR@mail.gmail.com' \
--to=curtw@google.com \
--cc=jack@suse.cz \
--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).