public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
	David Chinner <david@fromorbit.com>,
	linux-xfs@vger.kernel.org,
	Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Dave Jiang <dave.jiang@intel.com>
Subject: Re: linux-next: manual merge of the nvdimm tree with the xfs tree
Date: Sat, 2 Jun 2018 11:33:12 +1000	[thread overview]
Message-ID: <20180602113312.55667641@canb.auug.org.au> (raw)
In-Reply-To: <20180602005948.GH7825@magnolia>

[-- Attachment #1: Type: text/plain, Size: 1933 bytes --]

Hi Darrick,

On Fri, 1 Jun 2018 17:59:48 -0700 "Darrick J. Wong" <darrick.wong@oracle.com> wrote:
>
> > + 	if (!dax_enabled) {
> >  -		pr_debug("VFS (%s): error: dax support not enabled\n",
> >  -				sb->s_id);
> >  +		pr_debug("%s: error: dax support not enabled\n",
> >  +				bdevname(bdev, buf));
> > - 		return false;
> > + 		return -EOPNOTSUPP;  
> 
> Hang on a sec, the changes in the xfs tree make this function return a
> boolean (true for dax-is-supported, false for dax-not-supported), but
> this change partially reverts the boolean return values.

OK, weird, that is what I though I had done.  Thanks for pointing it
out (I guess it was getting late :-().

> >   	}
> > - 
> > - 	return true;
> > + 	return 0;  
> 
> The merge should retain the 'return false' above and the 'return true'
> here... or possibly just return dax_enabled:
> 
> if (!dax_enabled) {
> 	pr_debug(...);
> 	pr_debug(...);
> }
> 
> return dax_enabled;

OK, I have fixed up my merge resolution.  The end of that function will
now look like this:

	if (IS_ENABLED(CONFIG_FS_DAX_LIMITED) && pfn_t_special(pfn)) {
		/*
		 * An arch that has enabled the pmem api should also
		 * have its drivers support pfn_t_devmap()
		 *
		 * This is a developer warning and should not trigger in
		 * production. dax_flush() will crash since it depends
		 * on being able to do (page_address(pfn_to_page())).
		 */
		WARN_ON(IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API));
		dax_enabled = true;
	} else if (pfn_t_devmap(pfn)) {
		struct dev_pagemap *pgmap;

		pgmap = get_dev_pagemap(pfn_t_to_pfn(pfn), NULL);
		if (pgmap && pgmap->type == MEMORY_DEVICE_FS_DAX)
			dax_enabled = true;
		put_dev_pagemap(pgmap);
	}

	if (!dax_enabled)
		pr_debug("%s: error: dax support not enabled\n",
				bdevname(bdev, buf));

	return dax_enabled;
}
EXPORT_SYMBOL_GPL(__bdev_dax_supported);

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-06-02  1:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01  8:58 linux-next: manual merge of the nvdimm tree with the xfs tree Stephen Rothwell
2018-06-01 17:16 ` Dan Williams
2018-06-02  0:59 ` Darrick J. Wong
2018-06-02  1:33   ` Stephen Rothwell [this message]
2018-06-02  3:37     ` Dan Williams
  -- strict thread matches above, loose matches on Subject: below --
2018-03-22  6:54 Stephen Rothwell

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=20180602113312.55667641@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=dan.j.williams@intel.com \
    --cc=darrick.wong@oracle.com \
    --cc=dave.jiang@intel.com \
    --cc=david@fromorbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-xfs@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