All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: Rewrite ext4_page_mkwrite() to return locked page
Date: Sun, 5 Jun 2011 22:17:54 -0400	[thread overview]
Message-ID: <20110606021754.GA7180@thunk.org> (raw)
In-Reply-To: <1306767829-27580-1-git-send-email-jack@suse.cz>

On Mon, May 30, 2011 at 05:03:49PM +0200, Jan Kara wrote:
> ext4_page_mkwrite() does not return page locked. This makes it hard
> to avoid races with filesystem freezing code (so that we don't leave
> writeable page on a frozen fs) or writeback code (so that we allow page
> to be stable during writeback).
> 
> Also the current code uses i_alloc_sem to avoid races with truncate but that
> seems to be the wrong locking order according to lock ordering documented in
> mm/rmap.c.
> 
> Also add a check for frozen filesystem so that we don't busyloop in page fault
> when the filesystem is frozen.
> 
> Signed-off-by: Jan Kara <jack@suse.cz>

I'm not sure this commit description is accurate --- or I'm horribly
confused.

The old code was in fact returning the page locked --- I assume you're
referring to lock_page(page) (which is called right before the normal
path return).  So what am I missing?

							- Ted

  reply	other threads:[~2011-06-06  2:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30 15:03 [PATCH] ext4: Rewrite ext4_page_mkwrite() to return locked page Jan Kara
2011-06-06  2:17 ` Ted Ts'o [this message]
2011-06-08 14:10   ` Ted Ts'o
2011-06-08 14:55   ` Jan Kara
2011-06-20  2:53     ` Ted Ts'o
2011-06-20 10:38       ` 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=20110606021754.GA7180@thunk.org \
    --to=tytso@mit.edu \
    --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 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.