linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Jan Kara <jack@suse.cz>
Cc: Dan Williams <dan.j.williams@intel.com>,
	Seema Pandit <seema.pandit@intel.com>,
	linux-nvdimm <linux-nvdimm@lists.01.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>,
	Robert Barror <robert.barror@intel.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] filesystem-dax: Disable PMD support
Date: Wed, 3 Jul 2019 08:47:00 -0700	[thread overview]
Message-ID: <20190703154700.GI1729@bombadil.infradead.org> (raw)
In-Reply-To: <20190701121119.GE31621@quack2.suse.cz>

On Mon, Jul 01, 2019 at 02:11:19PM +0200, Jan Kara wrote:
> BTW, looking into the xarray code, I think I found another difference
> between the old radix tree code and the new xarray code that could cause
> issues. In the old radix tree code if we tried to insert PMD entry but
> there was some PTE entry in the covered range, we'd get EEXIST error back
> and the DAX fault code relies on this. I don't see how similar behavior is
> achieved by xas_store()...

Are you referring to this?

-               entry = dax_make_locked(0, size_flag | DAX_EMPTY);
-
-               err = __radix_tree_insert(&mapping->i_pages, index,
-                               dax_entry_order(entry), entry);
-               radix_tree_preload_end();
-               if (err) {
-                       xa_unlock_irq(&mapping->i_pages);
-                       /*
-                        * Our insertion of a DAX entry failed, most likely
-                        * because we were inserting a PMD entry and it
-                        * collided with a PTE sized entry at a different
-                        * index in the PMD range.  We haven't inserted
-                        * anything into the radix tree and have no waiters to
-                        * wake.
-                        */
-                       return ERR_PTR(err);
-               }

If so, that can't happen any more because we no longer drop the i_pages
lock while the entry is NULL, so the entry is always locked while the
i_pages lock is dropped.

  reply	other threads:[~2019-07-03 15:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-27  0:15 [PATCH] filesystem-dax: Disable PMD support Dan Williams
2019-06-27 12:34 ` Matthew Wilcox
2019-06-27 16:06   ` Dan Williams
2019-06-27 18:29     ` Dan Williams
2019-06-27 18:58       ` Dan Williams
2019-06-27 19:09         ` Dan Williams
2019-06-27 19:59           ` Matthew Wilcox
2019-06-28  2:39             ` Dan Williams
2019-06-28 16:37               ` Matthew Wilcox
2019-06-28 16:39                 ` Dan Williams
2019-06-28 16:54                   ` Matthew Wilcox
2019-06-29 16:03               ` Matthew Wilcox
2019-06-30  7:27                 ` Dan Williams
2019-06-30  8:01                   ` Dan Williams
2019-06-30 15:23                     ` Matthew Wilcox
2019-06-30 21:37                       ` Dan Williams
2019-07-02  3:34                         ` Matthew Wilcox
2019-07-02 15:37                           ` Dan Williams
2019-07-03  0:22                             ` Boaz Harrosh
2019-07-03  0:42                               ` Dan Williams
2019-07-03  1:39                                 ` Boaz Harrosh
2019-07-01 12:11                       ` Jan Kara
2019-07-03 15:47                         ` Matthew Wilcox [this message]
2019-07-04 16:40                           ` 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=20190703154700.GI1729@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=dan.j.williams@intel.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=robert.barror@intel.com \
    --cc=seema.pandit@intel.com \
    --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 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).