From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 43260] ftruncate locks up when used with direct IO on ext4
Date: Mon, 21 May 2012 23:08:04 +0000 (UTC) [thread overview]
Message-ID: <20120521230804.CA44911FD11@bugzilla.kernel.org> (raw)
In-Reply-To: <bug-43260-13602@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=43260
--- Comment #2 from Ivan Tarasov <ivan@rethinkdb.com> 2012-05-21 23:08:04 ---
Created an attachment (id=73345)
--> (https://bugzilla.kernel.org/attachment.cgi?id=73345)
Output of SysRq-w at lock up
Eric,
You are correct that 3.2.10 does not exhibit the problem (both on
RedHat-patched and vanilla kernel versions). That means that the bug was fixed
between 8c0bec21 and v3.2.10 and then reappeared again between the v3.2.10 and
v3.2.14.
I repeated the bisect, this time between v3.2.10 and v3.2.14, and found this
commit which exhibited the problem again:
commit 8608fb78b2cbf9eb8794e592bf43a8b1884c5a85
Author: Jeff Moyer <jmoyer@redhat.com>
Date: Mon Feb 20 17:59:24 2012 -0500
ext4: fix race between unwritten extent conversion and truncate
commit 266991b13890049ee1a6bb95b9817f06339ee3d7 upstream.
The following comment in ext4_end_io_dio caught my attention:
/* XXX: probably should move into the real I/O completion handler */
inode_dio_done(inode);
The truncate code takes i_mutex, then calls inode_dio_wait. Because the
ext4 code path above will end up dropping the mutex before it is
reacquired by the worker thread that does the extent conversion, it
seems to me that the truncate can happen out of order. Jan Kara
mentioned that this might result in error messages in the system logs,
but that should be the extent of the "damage."
The fix is pretty straight-forward: don't call inode_dio_done until the
extent conversion is complete.
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The output of sysrq-w during the lock up on this commit is attached.
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
next prev parent reply other threads:[~2012-05-21 23:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-17 23:31 [Bug 43260] New: ftruncate locks up when used with direct IO on ext4 bugzilla-daemon
2012-05-18 2:06 ` [Bug 43260] " bugzilla-daemon
2012-05-21 23:08 ` bugzilla-daemon [this message]
2012-05-24 10:16 ` bugzilla-daemon
2015-02-19 17:26 ` bugzilla-daemon
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=20120521230804.CA44911FD11@bugzilla.kernel.org \
--to=bugzilla-daemon@bugzilla.kernel.org \
--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).