linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [patch] ext4: fix race between unwritten extent conversion and truncate
Date: Thu, 26 Jan 2012 16:17:08 -0500	[thread overview]
Message-ID: <x4962fyyxij.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <20120126211526.GA28368@quack.suse.cz> (Jan Kara's message of "Thu, 26 Jan 2012 22:15:26 +0100")

Jan Kara <jack@suse.cz> writes:

> On Thu 26-01-12 15:59:11, Jeff Moyer wrote:
>> Hi,
>> 
>> 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 extra journal I/O, which isn't nice,
>   Funny misunderstanding ;) I meant we will complain to system log with error
> messages / WARN_ON.

Heh.  Ted, let me know if I need to repost to fix that up...

Cheers,
Jeff

      reply	other threads:[~2012-01-26 21:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26 20:59 [patch] ext4: fix race between unwritten extent conversion and truncate Jeff Moyer
2012-01-26 21:15 ` Jan Kara
2012-01-26 21:17   ` Jeff Moyer [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=x4962fyyxij.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=jack@suse.cz \
    --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).