From: Ted Ts'o <tytso@mit.edu>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>,
Martin.Wilck@ts.fujitsu.com
Subject: Re: [PATCH V2] ext4: avoid deadlock on sync-mounted FS w/o journal
Date: Mon, 20 Feb 2012 23:08:31 -0500 [thread overview]
Message-ID: <20120221040831.GG25249@thunk.org> (raw)
In-Reply-To: <4F3D9439.3050908@redhat.com>
On Thu, Feb 16, 2012 at 03:41:45PM -0800, Eric Sandeen wrote:
> From: Martin.Wilck@ts.fujitsu.com
>
> Processes hang forever on a sync-mounted ext2 file system that
> is mounted with the ext4 module (default in Fedora 16).
>
> I can reproduce this reliably by mounting an ext2 partition with
> "-o sync" and opening a new file an that partition with vim. vim
> will hang in "D" state forever. The same happens on ext4 without
> a journal.
>
> I am attaching a small patch here that solves this issue for me.
> In the sync mounted case without a journal,
> ext4_handle_dirty_metadata() may call sync_dirty_buffer(), which
> can't be called with buffer lock held.
>
> Also move mb_cache_entry_release inside lock to avoid race
> fixed previously by 8a2bfdcb ext[34]: EA block reference count racing fix
> Nonte too that ext2 fixed this same problem in 2006 with
> b2f49033 [PATCH] fix deadlock in ext2
>
> Signed-off-by: Martin.Wilck@ts.fujitsu.com
> [sandeen@redhat.com: move mb_cache_entry_release before unlock, edit commit msg]
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Thanks, applied.
- Ted
prev parent reply other threads:[~2012-02-21 4:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 23:41 [PATCH V2] ext4: avoid deadlock on sync-mounted FS w/o journal Eric Sandeen
2012-02-21 4:08 ` 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=20120221040831.GG25249@thunk.org \
--to=tytso@mit.edu \
--cc=Martin.Wilck@ts.fujitsu.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
/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.