linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@linux.intel.com>
To: Ross Zwisler <zwisler@gmail.com>
Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>,
	Jan Kara <jack@suse.cz>, Dave Chinner <david@fromorbit.com>,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 0/2] Fix dax races between page faults RFC only
Date: Wed, 27 Jan 2016 01:18:30 -0500	[thread overview]
Message-ID: <20160127061830.GS2948@linux.intel.com> (raw)
In-Reply-To: <CAOxpaSU_JgkeS=u61zxWTdP5hXymBkUsvkjkwNzm6XVig9y8RQ@mail.gmail.com>

On Tue, Jan 26, 2016 at 10:50:59PM -0700, Ross Zwisler wrote:
> On Tuesday, January 26, 2016, Matthew Wilcox <matthew.r.wilcox@intel.com>
> wrote:
> > If I understand the current state of the code correctly, truncate can't
> > race with the fault handler, so the re-checks we do of i_size are now
> > dead code, which can be deleted. right?
> 
> Yep, I think so.  I think we might be able to delete all the i_mmap locking
> in dax.c as well, now that the isolation from truncate all happens at the
> filesystem level.

No; we need to preserve the lock against truncate back down into the
MM code.  Consider the cow_page case; if truncate comes in after we drop
the filesystem lock and before the COWed page is inserted into the page
table, truncate won't see the page in order to remove it.  And truncate
is supposed to remove COWs as well as the underlying file.

I'm not sure what purpose it serves in dax_insert_mapping though.  Nor
the PMD fault handler.

  parent reply	other threads:[~2016-01-27  6:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27  4:08 [PATCH 0/2] Fix dax races between page faults RFC only Matthew Wilcox
2016-01-27  4:08 ` [PATCH 1/2] mm,fs,dax: Change ->pmd_fault to ->huge_fault Matthew Wilcox
2016-01-27  5:48   ` kbuild test robot
2016-01-27 17:47   ` Ross Zwisler
2016-01-28 12:17   ` Jan Kara
2016-01-29 14:31     ` Matthew Wilcox
2016-01-27  4:08 ` [PATCH 2/2] dax: Giant hack Matthew Wilcox
2016-01-28 13:10   ` Jan Kara
2016-01-28 21:23   ` Dave Chinner
2016-01-29 22:29   ` Jared Hulbert
     [not found] ` <CAOxpaSU_JgkeS=u61zxWTdP5hXymBkUsvkjkwNzm6XVig9y8RQ@mail.gmail.com>
2016-01-27  6:18   ` Matthew Wilcox [this message]
2016-02-01 21:25     ` [PATCH 0/2] Fix dax races between page faults RFC only Ross Zwisler
2016-01-28 12:48 ` 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=20160127061830.GS2948@linux.intel.com \
    --to=willy@linux.intel.com \
    --cc=david@fromorbit.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=matthew.r.wilcox@intel.com \
    --cc=ross.zwisler@linux.intel.com \
    --cc=zwisler@gmail.com \
    /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).