All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: "Wilcox, Matthew R" <matthew.r.wilcox@intel.com>
Cc: Jared Hulbert <jaredeh@gmail.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"ross.zwisler@linux.intel.com" <ross.zwisler@linux.intel.com>
Subject: Re: bug in COW no page fault?
Date: Mon, 1 Feb 2016 14:12:24 -0700	[thread overview]
Message-ID: <20160201211224.GA21755@linux.intel.com> (raw)
In-Reply-To: <100D68C7BA14664A8938383216E40DE04217F8A5@FMSMSX114.amr.corp.intel.com>

On Sat, Jan 30, 2016 at 05:47:18AM +0000, Wilcox, Matthew R wrote:
> I remembered that Ross had a similar question, so it must be hard to understand.  How does this comment work for both of you?
> 
> +               /*
> +                * A truncate must remove COWs of pages that are removed
> +                * from the file.  If we have a struct page, the normal
> +                * page lock mechanism prevents truncate from missing the
> +                * COWed page.  If not, the i_mmap_lock can provide the
> +                * same guarantee.  It is dropped by the caller after the
> +                * page is safely in the page tables.
> +                */

Yep, this makes sense.  It may be worthwhile to explicitly say "It is dropped
by do_cow_fault() after the page is safely in the page tables." so the less
experienced among us (me) can easily find the match to the i_mmap_lock_read().

      parent reply	other threads:[~2016-02-01 21:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 21:38 DAX: bug in COW no page fault? Jared Hulbert
2016-01-29 21:53 ` Wilcox, Matthew R
2016-01-29 22:12   ` Jared Hulbert
2016-01-29 22:36     ` Wilcox, Matthew R
2016-01-29 23:16       ` Jared Hulbert
2016-01-30  5:47         ` Wilcox, Matthew R
2016-01-30  6:34           ` Jared Hulbert
2016-02-01 21:12           ` Ross Zwisler [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=20160201211224.GA21755@linux.intel.com \
    --to=ross.zwisler@linux.intel.com \
    --cc=jaredeh@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=matthew.r.wilcox@intel.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 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.