From: Theodore Ts'o <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>,
enwlinux@gmail.com, stable@vger.kernel.org
Subject: Re: [PATCH] ext4: fix race between truncate and __ext4_journalled_writepage()
Date: Mon, 15 Jun 2015 15:37:55 -0400 [thread overview]
Message-ID: <20150615193755.GE5003@thunk.org> (raw)
In-Reply-To: <20150615170325.GA2381@quack.suse.cz>
On Mon, Jun 15, 2015 at 07:03:25PM +0200, Jan Kara wrote:
> I think that fully switching lock ordering for data=journal mode back to
> page lock -> transaction start (which is what you effectively do when you
> never drop page lock in ->writepage) is rather error prone. We'd have to be
> careful to avoid lock inversion also for places like ->write_begin,
> ->releasepage, ->invalidatepage etc. For example ext4_write_begin() will
> currently call lock_page() with transaction started which could deadlock
> against journalled writepage you suggest. So effectively we'd have to
> completely separate aops for data=journal mode. Doable but I'm not sure
> it's worth it.
Good point. OTOH, things are kind of fragile with respect to
ext4_write_begin() in data=journal mode, as you've pointed out. But
it's not causing any problems as far as we know, so so I'll use the
patch which you ack'ed and maybe later on, we can figure out a better
way to clean this up.
Thanks,
- Ted
next prev parent reply other threads:[~2015-06-15 19:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-10 18:13 [PATCH] xfstests-bld: exclude ext4 defrag tests from unsupported configurations Eric Whitney
2015-06-10 19:28 ` Theodore Ts'o
2015-06-11 20:00 ` Eric Whitney
2015-06-12 0:24 ` Eric Whitney
2015-06-15 1:14 ` Theodore Ts'o
2015-06-15 1:23 ` [PATCH] ext4: fix race between truncate and __ext4_journalled_writepage() Theodore Ts'o
2015-06-15 12:33 ` Jan Kara
2015-06-15 13:06 ` Theodore Ts'o
2015-06-15 17:03 ` Jan Kara
2015-06-15 19:37 ` Theodore Ts'o [this message]
2015-06-15 17:59 ` Andreas Dilger
2015-06-16 12:57 ` Jan Kara
2015-06-15 20:39 ` Eric Whitney
2015-06-16 19:29 ` Eric Whitney
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=20150615193755.GE5003@thunk.org \
--to=tytso@mit.edu \
--cc=enwlinux@gmail.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=stable@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).