From: Jan Kara <jack@suse.cz>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>,
Ext4 Developers List <linux-ext4@vger.kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH] ext4: block direct I/O writes during ext4_truncate
Date: Thu, 18 Jul 2013 16:11:17 +0200 [thread overview]
Message-ID: <20130718141117.GB10419@quack.suse.cz> (raw)
In-Reply-To: <20130717182709.GB26859@thunk.org>
On Wed 17-07-13 14:27:10, Ted Tso wrote:
> On Tue, Jul 16, 2013 at 12:49:42PM -0400, Theodore Ts'o wrote:
> > On Tue, Jul 16, 2013 at 05:46:58PM +0200, Jan Kara wrote:
> > > and ext4_setattr() does (again under i_mutex):
> > > ext4_inode_block_unlocked_dio(inode);
> > > inode_dio_wait(inode);
> > > ext4_inode_resume_unlocked_dio(inode);
> >
> > Ah, I missed this; thanks for pointing this out.
>
> I took a closer look, and there are other code paths which call
> ext4_truncate() which don't call ext4_inode_block_unlocked_dio() and
> inode_dio_wait(). In particular, the orphan cleanup code and the
> SETFLAGS ioctl.
True although both should be harmless. Also you have
ext4_truncate_failed_write() which is harmless as well.
> I suspect the right answer is to move these these calls, and possibly
> also the truncate_pagecache() call.
Could be.
> The other thing that we probably will want to do as a cleanup for the
> next merge window is to look at merging more of the code paths for
> ext4_punch_hole() and ext4_truncate().
Yeah, that would be definitely worthwhile effort.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2013-07-18 14:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-15 4:11 [PATCH] ext4: block direct I/O writes during ext4_truncate Theodore Ts'o
2013-07-16 15:46 ` Jan Kara
2013-07-16 16:49 ` Theodore Ts'o
2013-07-17 18:27 ` Theodore Ts'o
2013-07-18 14:11 ` Jan Kara [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=20130718141117.GB10419@quack.suse.cz \
--to=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tytso@mit.edu \
/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).