linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the akpm-current tree with the btrfs tree
@ 2021-01-27 11:39 Stephen Rothwell
  2021-02-14 21:46 ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2021-01-27 11:39 UTC (permalink / raw)
  To: Andrew Morton, David Sterba
  Cc: Christoph Hellwig, Linux Kernel Mailing List,
	Linux Next Mailing List, Martin Raiber, Matthew Wilcox (Oracle)

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

Hi all,

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

  fs/btrfs/file.c

between commit:

  0225a20db6d8 ("btrfs: Prevent nowait or async read from doing sync IO")

from the btrfs tree and commit:

  ddcd14c48a30 ("mm/filemap: rename generic_file_buffered_read to filemap_read")

from the akpm-current 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/btrfs/file.c
index 5282f456c99c,898ef7b792b7..000000000000
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@@ -3629,18 -3639,7 +3629,18 @@@ static ssize_t btrfs_file_read_iter(str
  			return ret;
  	}
  
 -	return filemap_read(iocb, to, ret);
 +	if (iocb->ki_flags & IOCB_NOWAIT)
 +		iocb->ki_flags |= IOCB_NOIO;
 +
- 	ret = generic_file_buffered_read(iocb, to, ret);
++	ret = filemap_read(iocb, to, ret);
 +
 +	if (iocb->ki_flags & IOCB_NOWAIT) {
 +		iocb->ki_flags &= ~IOCB_NOIO;
 +		if (ret == 0)
 +			ret = -EAGAIN;
 +	}
 +
 +	return ret;
  }
  
  const struct file_operations btrfs_file_operations = {

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

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

* Re: linux-next: manual merge of the akpm-current tree with the btrfs tree
  2021-01-27 11:39 linux-next: manual merge of the akpm-current tree with the btrfs tree Stephen Rothwell
@ 2021-02-14 21:46 ` Stephen Rothwell
  2021-02-25 23:32   ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2021-02-14 21:46 UTC (permalink / raw)
  To: Andrew Morton, David Sterba
  Cc: Christoph Hellwig, Linux Kernel Mailing List,
	Linux Next Mailing List, Martin Raiber, Matthew Wilcox (Oracle)

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

Hi all,

On Wed, 27 Jan 2021 22:39:18 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
> 
>   fs/btrfs/file.c
> 
> between commit:
> 
>   0225a20db6d8 ("btrfs: Prevent nowait or async read from doing sync IO")
> 
> from the btrfs tree and commit:
> 
>   ddcd14c48a30 ("mm/filemap: rename generic_file_buffered_read to filemap_read")
> 
> from the akpm-current 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.
> 
> diff --cc fs/btrfs/file.c
> index 5282f456c99c,898ef7b792b7..000000000000
> --- a/fs/btrfs/file.c
> +++ b/fs/btrfs/file.c
> @@@ -3629,18 -3639,7 +3629,18 @@@ static ssize_t btrfs_file_read_iter(str
>   			return ret;
>   	}
>   
>  -	return filemap_read(iocb, to, ret);
>  +	if (iocb->ki_flags & IOCB_NOWAIT)
>  +		iocb->ki_flags |= IOCB_NOIO;
>  +
> - 	ret = generic_file_buffered_read(iocb, to, ret);
> ++	ret = filemap_read(iocb, to, ret);
>  +
>  +	if (iocb->ki_flags & IOCB_NOWAIT) {
>  +		iocb->ki_flags &= ~IOCB_NOIO;
>  +		if (ret == 0)
>  +			ret = -EAGAIN;
>  +	}
>  +
>  +	return ret;
>   }
>   
>   const struct file_operations btrfs_file_operations = {

With the merge window about to open, this is a reminder that this
conflict still exists.

The btrfs tree commit is now

  1605f1b63c76 ("btrfs: Prevent nowait or async read from doing sync IO")

The akpm-current commit is now

  de45c82ebea8 ("mm/filemap: rename generic_file_buffered_read to filemap_read")

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: manual merge of the akpm-current tree with the btrfs tree
  2021-02-14 21:46 ` Stephen Rothwell
@ 2021-02-25 23:32   ` Stephen Rothwell
  2021-02-26  5:16     ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2021-02-25 23:32 UTC (permalink / raw)
  To: David Sterba
  Cc: Andrew Morton, Christoph Hellwig, Linux Kernel Mailing List,
	Linux Next Mailing List, Martin Raiber, Matthew Wilcox (Oracle)

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

Hi all,

On Mon, 15 Feb 2021 08:46:34 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Wed, 27 Jan 2021 22:39:18 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Today's linux-next merge of the akpm-current tree got a conflict in:
> > 
> >   fs/btrfs/file.c
> > 
> > between commit:
> > 
> >   0225a20db6d8 ("btrfs: Prevent nowait or async read from doing sync IO")
> > 
> > from the btrfs tree and commit:
> > 
> >   ddcd14c48a30 ("mm/filemap: rename generic_file_buffered_read to filemap_read")
> > 
> > from the akpm-current 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.
> > 
> > diff --cc fs/btrfs/file.c
> > index 5282f456c99c,898ef7b792b7..000000000000
> > --- a/fs/btrfs/file.c
> > +++ b/fs/btrfs/file.c
> > @@@ -3629,18 -3639,7 +3629,18 @@@ static ssize_t btrfs_file_read_iter(str
> >   			return ret;
> >   	}
> >   
> >  -	return filemap_read(iocb, to, ret);
> >  +	if (iocb->ki_flags & IOCB_NOWAIT)
> >  +		iocb->ki_flags |= IOCB_NOIO;
> >  +
> > - 	ret = generic_file_buffered_read(iocb, to, ret);
> > ++	ret = filemap_read(iocb, to, ret);
> >  +
> >  +	if (iocb->ki_flags & IOCB_NOWAIT) {
> >  +		iocb->ki_flags &= ~IOCB_NOIO;
> >  +		if (ret == 0)
> >  +			ret = -EAGAIN;
> >  +	}
> >  +
> >  +	return ret;
> >   }
> >   
> >   const struct file_operations btrfs_file_operations = {  
> 
> With the merge window about to open, this is a reminder that this
> conflict still exists.
> 
> The btrfs tree commit is now
> 
>   1605f1b63c76 ("btrfs: Prevent nowait or async read from doing sync IO")

Now

  5b1c5c4216f2 ("btrfs: Prevent nowait or async read from doing sync IO")

> The akpm-current commit is now
> 
>   de45c82ebea8 ("mm/filemap: rename generic_file_buffered_read to filemap_read")

Now in Linus' tree as

  87fa0f3eb267 ("mm/filemap: rename generic_file_buffered_read to filemap_read")

This ia now a conflict between the btrfs tree and Linus' tree.
-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: manual merge of the akpm-current tree with the btrfs tree
  2021-02-25 23:32   ` Stephen Rothwell
@ 2021-02-26  5:16     ` Christoph Hellwig
  2021-03-01 11:04       ` David Sterba
  0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2021-02-26  5:16 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Sterba, Andrew Morton, Christoph Hellwig,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Martin Raiber, Matthew Wilcox (Oracle)

On Fri, Feb 26, 2021 at 10:32:50AM +1100, Stephen Rothwell wrote:
> > >  -	return filemap_read(iocb, to, ret);
> > >  +	if (iocb->ki_flags & IOCB_NOWAIT)
> > >  +		iocb->ki_flags |= IOCB_NOIO;
> > >  +
> > > - 	ret = generic_file_buffered_read(iocb, to, ret);
> > > ++	ret = filemap_read(iocb, to, ret);
> > >  +
> > >  +	if (iocb->ki_flags & IOCB_NOWAIT) {
> > >  +		iocb->ki_flags &= ~IOCB_NOIO;
> > >  +		if (ret == 0)
> > >  +			ret = -EAGAIN;
> > >  +	}
> > >  +
> > >  +	return ret;
> > >   }

I think the above code looks completely bogus.  Instead whatever code
in btrfs hecks for IOCB_NOIO to avoid blocking readahead should also
check IOCB_NOWAIT.

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

* Re: linux-next: manual merge of the akpm-current tree with the btrfs tree
  2021-02-26  5:16     ` Christoph Hellwig
@ 2021-03-01 11:04       ` David Sterba
  0 siblings, 0 replies; 7+ messages in thread
From: David Sterba @ 2021-03-01 11:04 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Stephen Rothwell, Andrew Morton, Linux Kernel Mailing List,
	Linux Next Mailing List, Martin Raiber, Matthew Wilcox (Oracle)

On Fri, Feb 26, 2021 at 06:16:26AM +0100, Christoph Hellwig wrote:
> On Fri, Feb 26, 2021 at 10:32:50AM +1100, Stephen Rothwell wrote:
> > > >  -	return filemap_read(iocb, to, ret);
> > > >  +	if (iocb->ki_flags & IOCB_NOWAIT)
> > > >  +		iocb->ki_flags |= IOCB_NOIO;
> > > >  +
> > > > - 	ret = generic_file_buffered_read(iocb, to, ret);
> > > > ++	ret = filemap_read(iocb, to, ret);
> > > >  +
> > > >  +	if (iocb->ki_flags & IOCB_NOWAIT) {
> > > >  +		iocb->ki_flags &= ~IOCB_NOIO;
> > > >  +		if (ret == 0)
> > > >  +			ret = -EAGAIN;
> > > >  +	}
> > > >  +
> > > >  +	return ret;
> > > >   }
> 
> I think the above code looks completely bogus.  Instead whatever code
> in btrfs hecks for IOCB_NOIO to avoid blocking readahead should also
> check IOCB_NOWAIT.

Thanks for the comment, I've removed the patch from for-next and
notified the authors.

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

* Re: linux-next: manual merge of the akpm-current tree with the btrfs tree
  2020-05-25 11:11 Stephen Rothwell
@ 2020-06-03  2:07 ` Stephen Rothwell
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2020-06-03  2:07 UTC (permalink / raw)
  To: David Sterba
  Cc: Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, Matthew Wilcox (Oracle),
	Goldwyn Rodrigues

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

Hi all,

On Mon, 25 May 2020 21:11:28 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
> 
>   fs/btrfs/inode.c
> 
> between commit:
> 
>   f31e5f70919f ("btrfs: switch to iomap_dio_rw() for dio")
> 
> from the btrfs tree and commit:
> 
>   2167c1133b8b ("btrfs: convert from readpages to readahead")
> 
> from the akpm-current tree.
> 
> diff --cc fs/btrfs/inode.c
> index fb95efeb63ed,8b3489f229c7..000000000000
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@@ -10075,8 -10538,8 +10060,8 @@@ static const struct address_space_opera
>   	.readpage	= btrfs_readpage,
>   	.writepage	= btrfs_writepage,
>   	.writepages	= btrfs_writepages,
> - 	.readpages	= btrfs_readpages,
> + 	.readahead	= btrfs_readahead,
>  -	.direct_IO	= btrfs_direct_IO,
>  +	.direct_IO	= noop_direct_IO,
>   	.invalidatepage = btrfs_invalidatepage,
>   	.releasepage	= btrfs_releasepage,
>   #ifdef CONFIG_MIGRATION

This is now a conflict between commit

  ba206a026ff4 ("btrfs: convert from readpages to readahead")

from Linus' tree and commit

  a43a67a2d715 ("btrfs: switch to iomap_dio_rw() for dio")

from the btrfs tree.
-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: manual merge of the akpm-current tree with the btrfs tree
@ 2020-05-25 11:11 Stephen Rothwell
  2020-06-03  2:07 ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2020-05-25 11:11 UTC (permalink / raw)
  To: Andrew Morton, David Sterba
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Matthew Wilcox (Oracle),
	Goldwyn Rodrigues

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

Hi all,

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

  fs/btrfs/inode.c

between commit:

  f31e5f70919f ("btrfs: switch to iomap_dio_rw() for dio")

from the btrfs tree and commit:

  2167c1133b8b ("btrfs: convert from readpages to readahead")

from the akpm-current 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/btrfs/inode.c
index fb95efeb63ed,8b3489f229c7..000000000000
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@@ -10075,8 -10538,8 +10060,8 @@@ static const struct address_space_opera
  	.readpage	= btrfs_readpage,
  	.writepage	= btrfs_writepage,
  	.writepages	= btrfs_writepages,
- 	.readpages	= btrfs_readpages,
+ 	.readahead	= btrfs_readahead,
 -	.direct_IO	= btrfs_direct_IO,
 +	.direct_IO	= noop_direct_IO,
  	.invalidatepage = btrfs_invalidatepage,
  	.releasepage	= btrfs_releasepage,
  #ifdef CONFIG_MIGRATION

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

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

end of thread, other threads:[~2021-03-01 11:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 11:39 linux-next: manual merge of the akpm-current tree with the btrfs tree Stephen Rothwell
2021-02-14 21:46 ` Stephen Rothwell
2021-02-25 23:32   ` Stephen Rothwell
2021-02-26  5:16     ` Christoph Hellwig
2021-03-01 11:04       ` David Sterba
  -- strict thread matches above, loose matches on Subject: below --
2020-05-25 11:11 Stephen Rothwell
2020-06-03  2:07 ` Stephen Rothwell

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).