From: Theodore Ts'o <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: 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: Wed, 17 Jul 2013 14:27:10 -0400 [thread overview]
Message-ID: <20130717182709.GB26859@thunk.org> (raw)
In-Reply-To: <20130716164942.GA6002@thunk.org>
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.
I suspect the right answer is to move these these calls, and possibly
also the truncate_pagecache() call.
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().
Cheeers,
- Ted
next prev parent reply other threads:[~2013-07-17 18:27 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 [this message]
2013-07-18 14:11 ` Jan Kara
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=20130717182709.GB26859@thunk.org \
--to=tytso@mit.edu \
--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 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.