From: Josef Bacik <jbacik@fusionio.com>
To: Jan Kara <jack@suse.cz>
Cc: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
Josef Bacik <JBacik@fusionio.com>
Subject: Re: [PATCH] jbd: Fix assertion failure in commit code due to lacking transaction credits
Date: Fri, 17 Aug 2012 08:48:14 -0400 [thread overview]
Message-ID: <20120817124814.GC2133@localhost.localdomain> (raw)
In-Reply-To: <1345154672-22795-1-git-send-email-jack@suse.cz>
On Thu, Aug 16, 2012 at 04:04:32PM -0600, Jan Kara wrote:
> ext3 users of data=journal mode with blocksize < pagesize were occasionally
> hitting assertion failure in journal_commit_transaction() checking whether the
> transaction has at least as many credits reserved as buffers attached. The
> core of the problem is that when a file gets truncated, buffers that still need
> checkpointing or that are attached to the committing transaction are left with
> buffer_mapped set. When this happens to buffers beyond i_size attached to a
> page stradding i_size, subsequent write extending the file will see these
> buffers and as they are mapped (but underlying blocks were freed) things go
> awry from here.
>
> The assertion failure just coincidentally (and in this case luckily as we would
> start corrupting filesystem) triggers due to journal_head not being properly
> cleaned up as well.
>
> Under some rare circumstances this bug could even hit data=ordered mode users.
> There the assertion won't trigger and we would end up corrupting the
> filesystem.
>
> We fix the problem by unmapping buffers if possible (in lots of cases we just
> need a buffer attached to a transaction as a place holder but it must not be
> written out anyway). And in one case, we just have to bite the bullet and wait
> for transaction commit to finish.
>
> Signed-off-by: Jan Kara <jack@suse.cz>
You are my hero Jan
Reviewed-by: Josef Bacik <jbacik@fusionio.com>
Thanks,
Josef
prev parent reply other threads:[~2012-08-17 12:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-16 22:04 [PATCH] jbd: Fix assertion failure in commit code due to lacking transaction credits Jan Kara
2012-08-17 12:48 ` Josef Bacik [this message]
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=20120817124814.GC2133@localhost.localdomain \
--to=jbacik@fusionio.com \
--cc=jack@suse.cz \
--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 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.