All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the nvdimm tree with the xfs tree
@ 2018-06-01  8:58 Stephen Rothwell
  2018-06-01 17:16 ` Dan Williams
  2018-06-02  0:59 ` Darrick J. Wong
  0 siblings, 2 replies; 6+ messages in thread
From: Stephen Rothwell @ 2018-06-01  8:58 UTC (permalink / raw)
  To: Dan Williams, Darrick J. Wong, David Chinner, linux-xfs
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Dave Jiang

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

Hi Dan,

Today's linux-next merge of the nvdimm tree got a conflict in:

  drivers/dax/super.c

between commits:

  ba23cba9b3bd ("fs: allow per-device dax status checking for filesystems")
  80660f20252d ("dax: change bdev_dax_supported() to support boolean returns")

from the xfs tree and commit:

  e76384884344 ("mm: introduce MEMORY_DEVICE_FS_DAX and CONFIG_DEV_PAGEMAP_OPS")

from the nvdimm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell
diff --cc drivers/dax/super.c
index 1d7bd96511f0,88672b6f6252..000000000000
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@@ -80,11 -80,13 +80,12 @@@ EXPORT_SYMBOL_GPL(fs_dax_get_by_bdev)
   * This is a library function for filesystems to check if the block device
   * can be mounted with dax option.
   *
 - * Return: negative errno if unsupported, 0 if supported.
 + * Return: true if supported, false if unsupported
   */
 -int __bdev_dax_supported(struct super_block *sb, int blocksize)
 +bool __bdev_dax_supported(struct block_device *bdev, int blocksize)
  {
 -	struct block_device *bdev = sb->s_bdev;
  	struct dax_device *dax_dev;
+ 	bool dax_enabled = false;
  	pgoff_t pgoff;
  	int err, id;
  	void *kaddr;
@@@ -134,15 -135,22 +135,22 @@@
  		 * 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)) {
- 		/* pass */;
- 	} else {
+ 		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("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;
  	}
- 
- 	return true;
+ 	return 0;
  }
  EXPORT_SYMBOL_GPL(__bdev_dax_supported);
  #endif

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the nvdimm tree with the xfs tree
  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
  1 sibling, 0 replies; 6+ messages in thread
From: Dan Williams @ 2018-06-01 17:16 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Darrick J. Wong, David Chinner, linux-xfs,
	Linux-Next Mailing List, Linux Kernel Mailing List, Dave Jiang

On Fri, Jun 1, 2018 at 1:58 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Dan,
>
> Today's linux-next merge of the nvdimm tree got a conflict in:
>
>   drivers/dax/super.c
>
> between commits:
>
>   ba23cba9b3bd ("fs: allow per-device dax status checking for filesystems")
>   80660f20252d ("dax: change bdev_dax_supported() to support boolean returns")
>
> from the xfs tree and commit:
>
>   e76384884344 ("mm: introduce MEMORY_DEVICE_FS_DAX and CONFIG_DEV_PAGEMAP_OPS")
>
> from the nvdimm tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.

Resolution looks good to me Stephen. Thanks for fixing this up, I'll
let Linus know in the libnvdimm pull request.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the nvdimm tree with the xfs tree
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Darrick J. Wong @ 2018-06-02  0:59 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dan Williams, David Chinner, linux-xfs, Linux-Next Mailing List,
	Linux Kernel Mailing List, Dave Jiang

On Fri, Jun 01, 2018 at 06:58:46PM +1000, Stephen Rothwell wrote:
> Hi Dan,
> 
> Today's linux-next merge of the nvdimm tree got a conflict in:
> 
>   drivers/dax/super.c
> 
> between commits:
> 
>   ba23cba9b3bd ("fs: allow per-device dax status checking for filesystems")
>   80660f20252d ("dax: change bdev_dax_supported() to support boolean returns")
> 
> from the xfs tree and commit:
> 
>   e76384884344 ("mm: introduce MEMORY_DEVICE_FS_DAX and CONFIG_DEV_PAGEMAP_OPS")
> 
> from the nvdimm tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> diff --cc drivers/dax/super.c
> index 1d7bd96511f0,88672b6f6252..000000000000
> --- a/drivers/dax/super.c
> +++ b/drivers/dax/super.c
> @@@ -80,11 -80,13 +80,12 @@@ EXPORT_SYMBOL_GPL(fs_dax_get_by_bdev)
>    * This is a library function for filesystems to check if the block device
>    * can be mounted with dax option.
>    *
>  - * Return: negative errno if unsupported, 0 if supported.
>  + * Return: true if supported, false if unsupported
>    */
>  -int __bdev_dax_supported(struct super_block *sb, int blocksize)
>  +bool __bdev_dax_supported(struct block_device *bdev, int blocksize)
>   {
>  -	struct block_device *bdev = sb->s_bdev;
>   	struct dax_device *dax_dev;
> + 	bool dax_enabled = false;
>   	pgoff_t pgoff;
>   	int err, id;
>   	void *kaddr;
> @@@ -134,15 -135,22 +135,22 @@@
>   		 * 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)) {
> - 		/* pass */;
> - 	} else {
> + 		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("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.

>   	}
> - 
> - 	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;

--D

>   }
>   EXPORT_SYMBOL_GPL(__bdev_dax_supported);
>   #endif

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the nvdimm tree with the xfs tree
  2018-06-02  0:59 ` Darrick J. Wong
@ 2018-06-02  1:33   ` Stephen Rothwell
  2018-06-02  3:37     ` Dan Williams
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2018-06-02  1:33 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Dan Williams, David Chinner, linux-xfs, Linux-Next Mailing List,
	Linux Kernel Mailing List, Dave Jiang

[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the nvdimm tree with the xfs tree
  2018-06-02  1:33   ` Stephen Rothwell
@ 2018-06-02  3:37     ` Dan Williams
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Williams @ 2018-06-02  3:37 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Darrick J. Wong, David Chinner, linux-xfs,
	Linux-Next Mailing List, Linux Kernel Mailing List, Dave Jiang

On Fri, Jun 1, 2018 at 6:33 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 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;

Good catch Darrick, I missed that too...

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the nvdimm tree with the xfs tree
@ 2018-03-22  6:54 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2018-03-22  6:54 UTC (permalink / raw)
  To: Dan Williams, Darrick J. Wong, David Chinner, linux-xfs
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Christoph Hellwig

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

Hi Dan,

Today's linux-next merge of the nvdimm tree got a conflict in:

  fs/xfs/xfs_inode.h

between commit:

  f5c54717bf2b ("xfs: remove xfs_zero_range")

from the xfs tree and commit:

  6ea4108852e9 ("xfs: prepare xfs_break_layouts() for another layout type")

from the nvdimm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/xfs/xfs_inode.h
index 132d8aa2afc4,6951d57aae71..000000000000
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@@ -443,6 -457,12 +457,8 @@@ enum xfs_prealloc_flags 
  
  int	xfs_update_prealloc_flags(struct xfs_inode *ip,
  				  enum xfs_prealloc_flags flags);
 -int	xfs_zero_eof(struct xfs_inode *ip, xfs_off_t offset,
 -		     xfs_fsize_t isize, bool *did_zeroing);
 -int	xfs_zero_range(struct xfs_inode *ip, xfs_off_t pos, xfs_off_t count,
 -		bool *did_zero);
+ int	xfs_break_layouts(struct inode *inode, uint *iolock,
+ 		enum layout_break_reason reason);
  
  /* from xfs_iops.c */
  extern void xfs_setup_inode(struct xfs_inode *ip);

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-06-02  3:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2018-06-02  3:37     ` Dan Williams
  -- strict thread matches above, loose matches on Subject: below --
2018-03-22  6:54 Stephen Rothwell

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.