linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Kazuya Mio <k-mio@sx.jp.nec.com>
Cc: ext4 <linux-ext4@vger.kernel.org>, Andreas Dilger <adilger@dilger.ca>
Subject: Re: [PATCH] ext4: fix the deadlock in mpage_da_map_and_submit()
Date: Thu, 20 Oct 2011 19:47:12 -0400	[thread overview]
Message-ID: <20111020234712.GJ17210@thunk.org> (raw)
In-Reply-To: <4E968F8E.5070802@sx.jp.nec.com>

On Thu, Oct 13, 2011 at 04:13:18PM +0900, Kazuya Mio wrote:
> If ext4_jbd2_file_inode() in mpage_da_map_and_submit() fails due to journal
> abort, this function returns to caller without unlocking the page.
> It leads to the deadlock, and the patch fixes this issue by calling
> mpage_da_submit_io().
> 
> Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>

Applied, thanks.

This is an area where we should really clean things up next merge
window, though.  I'm a little uneasy that we will potentially write
back some blocks even though the journal has been aborted (we do this
in other error paths, so this isn't a criticism of this patch, just of
the current state of affairs).

The problem mpage_da_submit_io() is the only way we have to unlock the
pages.  In the future we should probably have a separate path to
unlock the pages in case of an error.  We might also want to merge
mpage_da_submit_io() and mpage_da_map_and_submit(), and to also clean
up a number of comments which are out of date.  (For example,
mpage_da_submit_io() no longer uses ext4_writepage().)

						- Ted

      reply	other threads:[~2011-10-21  1:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13  7:13 [PATCH] ext4: fix the deadlock in mpage_da_map_and_submit() Kazuya Mio
2011-10-20 23:47 ` Ted Ts'o [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=20111020234712.GJ17210@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger@dilger.ca \
    --cc=k-mio@sx.jp.nec.com \
    --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).