All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the block tree with the fscrypt tree
@ 2020-07-09  3:02 Stephen Rothwell
  2020-07-23  1:03 ` Stephen Rothwell
  0 siblings, 1 reply; 14+ messages in thread
From: Stephen Rothwell @ 2020-07-09  3:02 UTC (permalink / raw)
  To: Jens Axboe, Theodore Ts'o, Eric Biggers
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Christoph Hellwig

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

Hi all,

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

  fs/buffer.c

between commit:

  4f74d15fe408 ("ext4: add inline encryption support")

from the fscrypt tree and commit:

  ed9b3196d2b2 ("fs: remove a weird comment in submit_bh_wbc")

from the block 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/buffer.c
index dc5e05b47646,2725ebbcfdc2..000000000000
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@@ -3039,14 -3040,7 +3039,10 @@@ static int submit_bh_wbc(int op, int op
  	if (test_set_buffer_req(bh) && (op == REQ_OP_WRITE))
  		clear_buffer_write_io_error(bh);
  
- 	/*
- 	 * from here on down, it's all bio -- do the initial mapping,
- 	 * submit_bio -> generic_make_request may further map this bio around
- 	 */
  	bio = bio_alloc(GFP_NOIO, 1);
 +
 +	fscrypt_set_bio_crypt_ctx_bh(bio, bh, GFP_NOIO);
 +
  	bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9);
  	bio_set_dev(bio, bh->b_bdev);
  	bio->bi_write_hint = write_hint;

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

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

* Re: linux-next: manual merge of the block tree with the fscrypt tree
  2020-07-09  3:02 linux-next: manual merge of the block tree with the fscrypt tree Stephen Rothwell
@ 2020-07-23  1:03 ` Stephen Rothwell
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Rothwell @ 2020-07-23  1:03 UTC (permalink / raw)
  To: Jens Axboe, Theodore Ts'o, Eric Biggers
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Christoph Hellwig, Damien Le Moal

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

Hi all,

On Thu, 9 Jul 2020 13:02:54 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the block tree got a conflict in:
> 
>   fs/buffer.c
> 
> between commit:
> 
>   4f74d15fe408 ("ext4: add inline encryption support")
> 
> from the fscrypt tree and commit:
> 
>   ed9b3196d2b2 ("fs: remove a weird comment in submit_bh_wbc")
> 
> from the block tree.
> 
> 
> diff --cc fs/buffer.c
> index dc5e05b47646,2725ebbcfdc2..000000000000
> --- a/fs/buffer.c
> +++ b/fs/buffer.c
> @@@ -3039,14 -3040,7 +3039,10 @@@ static int submit_bh_wbc(int op, int op
>   	if (test_set_buffer_req(bh) && (op == REQ_OP_WRITE))
>   		clear_buffer_write_io_error(bh);
>   
> - 	/*
> - 	 * from here on down, it's all bio -- do the initial mapping,
> - 	 * submit_bio -> generic_make_request may further map this bio around
> - 	 */
>   	bio = bio_alloc(GFP_NOIO, 1);
>  +
>  +	fscrypt_set_bio_crypt_ctx_bh(bio, bh, GFP_NOIO);
>  +
>   	bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9);
>   	bio_set_dev(bio, bh->b_bdev);
>   	bio->bi_write_hint = write_hint;

This is now also a conflict between the zonefs tree and the fscrypt
tree (since the zonefs tree has merged part of the block tree).

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: manual merge of the block tree with the fscrypt tree
@ 2022-02-21 16:47 broonie
  0 siblings, 0 replies; 14+ messages in thread
From: broonie @ 2022-02-21 16:47 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Christoph Hellwig, Eric Biggers, Linux Kernel Mailing List,
	Linux Next Mailing List, Satya Tangirala

Hi all,

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

  fs/iomap/direct-io.c

between commit:

  489734ef94f4f ("iomap: support direct I/O with fscrypt using blk-crypto")

from the fscrypt tree and commit:

  07888c665b405 ("block: pass a block_device and opf to bio_alloc")

from the block 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/iomap/direct-io.c
index 20325b3926fa3,e2ba13645ef28..0000000000000
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@@ -185,10 -183,7 +185,9 @@@ static void iomap_dio_zero(const struc
  	int flags = REQ_SYNC | REQ_IDLE;
  	struct bio *bio;
  
- 	bio = bio_alloc(GFP_KERNEL, 1);
+ 	bio = bio_alloc(iter->iomap.bdev, 1, REQ_OP_WRITE | flags, GFP_KERNEL);
 +	fscrypt_set_bio_crypt_ctx(bio, inode, pos >> inode->i_blkbits,
 +				  GFP_KERNEL);
- 	bio_set_dev(bio, iter->iomap.bdev);
  	bio->bi_iter.bi_sector = iomap_sector(&iter->iomap, pos);
  	bio->bi_private = dio;
  	bio->bi_end_io = iomap_dio_bio_end_io;
@@@ -313,10 -307,7 +311,9 @@@ static loff_t iomap_dio_bio_iter(const 
  			goto out;
  		}
  
- 		bio = bio_alloc(GFP_KERNEL, nr_pages);
+ 		bio = bio_alloc(iomap->bdev, nr_pages, bio_opf, GFP_KERNEL);
 +		fscrypt_set_bio_crypt_ctx(bio, inode, pos >> inode->i_blkbits,
 +					  GFP_KERNEL);
- 		bio_set_dev(bio, iomap->bdev);
  		bio->bi_iter.bi_sector = iomap_sector(iomap, pos);
  		bio->bi_write_hint = dio->iocb->ki_hint;
  		bio->bi_ioprio = dio->iocb->ki_ioprio;

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

* linux-next: manual merge of the block tree with the fscrypt tree
@ 2022-02-21 16:45 broonie
  0 siblings, 0 replies; 14+ messages in thread
From: broonie @ 2022-02-21 16:45 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Christoph Hellwig, Eric Biggers, Linux Kernel Mailing List,
	Linux Next Mailing List, Satya Tangirala

Hi all,

FIXME: Add owner of second tree to To:
       Add author(s)/SOB of conflicting commits.

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

  fs/iomap/direct-io.c

between commit:

  489734ef94f4f ("iomap: support direct I/O with fscrypt using blk-crypto")

from the fscrypt tree and commit:

  07888c665b405 ("block: pass a block_device and opf to bio_alloc")

from the block 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.

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

* Re: linux-next: manual merge of the block tree with the fscrypt tree
  2022-02-14  1:11 Stephen Rothwell
  2022-02-14  7:15 ` Christoph Hellwig
@ 2022-02-14 19:26 ` Eric Biggers
  1 sibling, 0 replies; 14+ messages in thread
From: Eric Biggers @ 2022-02-14 19:26 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Jens Axboe, Theodore Ts'o, Christoph Hellwig,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Satya Tangirala

On Mon, Feb 14, 2022 at 12:11:39PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the block tree got a conflict in:
> 
>   fs/iomap/direct-io.c
> 
> between commit:
> 
>   489734ef94f4 ("iomap: support direct I/O with fscrypt using blk-crypto")
> 
> from the fscrypt tree and commit:
> 
>   07888c665b40 ("block: pass a block_device and opf to bio_alloc")
> 
> from the block tree.
> 
> I fixed it up (I think - 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.
> 

Looks fine to me, thanks.

- Eric

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

* Re: linux-next: manual merge of the block tree with the fscrypt tree
  2022-02-14  1:11 Stephen Rothwell
@ 2022-02-14  7:15 ` Christoph Hellwig
  2022-02-14 19:26 ` Eric Biggers
  1 sibling, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2022-02-14  7:15 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Jens Axboe, Theodore Ts'o, Eric Biggers, Christoph Hellwig,
	Eric Biggers, Linux Kernel Mailing List, Linux Next Mailing List,
	Satya Tangirala

On Mon, Feb 14, 2022 at 12:11:39PM +1100, Stephen Rothwell wrote:
> I fixed it up (I think - 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.

Thanks,

the fixup looks good to me.

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

* linux-next: manual merge of the block tree with the fscrypt tree
@ 2022-02-14  1:11 Stephen Rothwell
  2022-02-14  7:15 ` Christoph Hellwig
  2022-02-14 19:26 ` Eric Biggers
  0 siblings, 2 replies; 14+ messages in thread
From: Stephen Rothwell @ 2022-02-14  1:11 UTC (permalink / raw)
  To: Jens Axboe, Theodore Ts'o, Eric Biggers
  Cc: Christoph Hellwig, Eric Biggers, Linux Kernel Mailing List,
	Linux Next Mailing List, Satya Tangirala

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

Hi all,

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

  fs/iomap/direct-io.c

between commit:

  489734ef94f4 ("iomap: support direct I/O with fscrypt using blk-crypto")

from the fscrypt tree and commit:

  07888c665b40 ("block: pass a block_device and opf to bio_alloc")

from the block tree.

I fixed it up (I think - 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/iomap/direct-io.c
index 20325b3926fa,e2ba13645ef2..000000000000
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@@ -185,10 -183,7 +185,9 @@@ static void iomap_dio_zero(const struc
  	int flags = REQ_SYNC | REQ_IDLE;
  	struct bio *bio;
  
- 	bio = bio_alloc(GFP_KERNEL, 1);
+ 	bio = bio_alloc(iter->iomap.bdev, 1, REQ_OP_WRITE | flags, GFP_KERNEL);
 +	fscrypt_set_bio_crypt_ctx(bio, inode, pos >> inode->i_blkbits,
 +				  GFP_KERNEL);
- 	bio_set_dev(bio, iter->iomap.bdev);
  	bio->bi_iter.bi_sector = iomap_sector(&iter->iomap, pos);
  	bio->bi_private = dio;
  	bio->bi_end_io = iomap_dio_bio_end_io;
@@@ -313,10 -307,7 +311,9 @@@ static loff_t iomap_dio_bio_iter(const 
  			goto out;
  		}
  
- 		bio = bio_alloc(GFP_KERNEL, nr_pages);
+ 		bio = bio_alloc(iomap->bdev, nr_pages, bio_opf, GFP_KERNEL);
 +		fscrypt_set_bio_crypt_ctx(bio, inode, pos >> inode->i_blkbits,
 +					  GFP_KERNEL);
- 		bio_set_dev(bio, iomap->bdev);
  		bio->bi_iter.bi_sector = iomap_sector(iomap, pos);
  		bio->bi_write_hint = dio->iocb->ki_hint;
  		bio->bi_ioprio = dio->iocb->ki_ioprio;

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

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

* Re: linux-next: manual merge of the block tree with the fscrypt tree
  2019-01-16 14:27         ` Jens Axboe
@ 2019-01-18  2:45           ` Ming Lei
  0 siblings, 0 replies; 14+ messages in thread
From: Ming Lei @ 2019-01-18  2:45 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Stephen Rothwell, Theodore Ts'o, Linux Next Mailing List,
	Linux Kernel Mailing List, Eric Biggers

On Wed, Jan 16, 2019 at 07:27:25AM -0700, Jens Axboe wrote:
> On 1/16/19 12:39 AM, Ming Lei wrote:
> > On Tue, Jan 15, 2019 at 08:17:36PM -0700, Jens Axboe wrote:
> >> On 1/15/19 8:13 PM, Ming Lei wrote:
> >>> On Tue, Jan 15, 2019 at 07:55:39PM -0700, Jens Axboe wrote:
> >>>> On 1/15/19 7:25 PM, Stephen Rothwell wrote:
> >>>>> Hi all,
> >>>>>
> >>>>> Today's linux-next merge of the block tree got a conflict in:
> >>>>>
> >>>>>   fs/ext4/readpage.c
> >>>>>
> >>>>> between commit:
> >>>>>
> >>>>>   acc9eb0a6073 ("ext4: add fs-verity read support")
> >>>>>
> >>>>> from the fscrypt tree and commit:
> >>>>>
> >>>>>   eb754eb2a953 ("block: allow bio_for_each_segment_all() to iterate over multi-page bvec")
> >>>>>
> >>>>> from the block tree.
> >>>>>
> >>>>> I fixed it up (see below - the former moved the code modified by the
> >>>>> latter) 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.
> >>>>
> >>>> Ming, I'm pulling this, I thought we agreed none of these bullshit
> >>>> renames? The fact that a patch looks like this:
> >>>>
> >>>> -               for_each_bvec(bv, (it)->bvecs, __cur_iter, __cur_iter)        \
> >>>> +               for_each_segment(bv, (it)->bvecs, __cur_iter, __cur_iter)     \
> >>>>
> >>>> is SUPER annoying and does NOTHING but to cause merge conflicts.
> >>>>
> >>>> Resend it without that.
> >>>
> >>> We need to differentiate 'segment' with 'bvec' in bvec helpers, which is
> >>> usually seldom used by drivers. For example, only two in-tree users(ceph, iov_iter).
> >>> That is why I rename it, and seems Christoph prefers to do it too.
> >>
> >> If you want to do a rename, then we do it after. I don't want to deal with
> >> weeks and weeks of fallout from this. Write a rename script that we can
> >> then run at the end of the next merge window. You're going to be playing
> >> catch-up until that happens if we go the current route, and honestly
> >> I'm not at all interested in the fallout from that.
> >>
> >> I know exactly what will happen until 5.1-rc opens, and what my tree will
> >> look like from having to deal with this. And then I know exactly what Linus
> >> is going to say, and I can't even argue against it, since he'll be totally
> >> right.
> >>
> >> Hence it's not going to happen this way.
> > 
> > I can remove the renaming in patch 'block: rename bvec helpers', but
> > change on bio_for_each_segment_all() is inevitable, and it is still an
> > API change, so merge conflict can't avoid too.
> 
> That's not what I'm complaining about, API changes are inevitable for
> something like this. What I'm complaining about is the very example
> I posted above, and which has already caused issues. That's a frivolous
> name change. Don't do it.

Hi Jens,

I may avoid the rename for avoiding merge conflict.

However, given we have been back and forth for this naming thing several
times, I'd rather explain the story one more time:

In V13's patch4, we rename:

    for_each_bvec
    bvec_iter_bvec
    bvec_iter_len
    bvec_iter_page
    bvec_iter_offset

into:
    for_each_segment
    segment_iter_bvec
    segment_iter_len
    segment_iter_page
    segment_iter_offset

so that these helpers named with 'segment' only deal with single-page
bvec, or called segment. We re-introduce helpers named with 'bvec'
for multi-page bvec, as suggested by Christoph.

If the above renaming has to be avoided, we need one new name
for multi-page bvec helpers, previous I name it as 'mp_bvec', such as:

    for_each_mp_bvec
    mp_bvec_iter_bvec
    mp_bvec_iter_len
    mp_bvec_iter_page
    mp_bvec_iter_offset

However, Christoph were not very happy with the above name.

Given you mentioned one more rename after the patches are merged should
be fine, I understand the new name of 'mp_bvec' should be fine for you
because it is just short-life.

Please confirm or provide another better name, so that we can move on.

Thanks,
Ming

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

* Re: linux-next: manual merge of the block tree with the fscrypt tree
  2019-01-16  7:39       ` Ming Lei
@ 2019-01-16 14:27         ` Jens Axboe
  2019-01-18  2:45           ` Ming Lei
  0 siblings, 1 reply; 14+ messages in thread
From: Jens Axboe @ 2019-01-16 14:27 UTC (permalink / raw)
  To: Ming Lei
  Cc: Stephen Rothwell, Theodore Ts'o, Linux Next Mailing List,
	Linux Kernel Mailing List, Eric Biggers

On 1/16/19 12:39 AM, Ming Lei wrote:
> On Tue, Jan 15, 2019 at 08:17:36PM -0700, Jens Axboe wrote:
>> On 1/15/19 8:13 PM, Ming Lei wrote:
>>> On Tue, Jan 15, 2019 at 07:55:39PM -0700, Jens Axboe wrote:
>>>> On 1/15/19 7:25 PM, Stephen Rothwell wrote:
>>>>> Hi all,
>>>>>
>>>>> Today's linux-next merge of the block tree got a conflict in:
>>>>>
>>>>>   fs/ext4/readpage.c
>>>>>
>>>>> between commit:
>>>>>
>>>>>   acc9eb0a6073 ("ext4: add fs-verity read support")
>>>>>
>>>>> from the fscrypt tree and commit:
>>>>>
>>>>>   eb754eb2a953 ("block: allow bio_for_each_segment_all() to iterate over multi-page bvec")
>>>>>
>>>>> from the block tree.
>>>>>
>>>>> I fixed it up (see below - the former moved the code modified by the
>>>>> latter) 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.
>>>>
>>>> Ming, I'm pulling this, I thought we agreed none of these bullshit
>>>> renames? The fact that a patch looks like this:
>>>>
>>>> -               for_each_bvec(bv, (it)->bvecs, __cur_iter, __cur_iter)        \
>>>> +               for_each_segment(bv, (it)->bvecs, __cur_iter, __cur_iter)     \
>>>>
>>>> is SUPER annoying and does NOTHING but to cause merge conflicts.
>>>>
>>>> Resend it without that.
>>>
>>> We need to differentiate 'segment' with 'bvec' in bvec helpers, which is
>>> usually seldom used by drivers. For example, only two in-tree users(ceph, iov_iter).
>>> That is why I rename it, and seems Christoph prefers to do it too.
>>
>> If you want to do a rename, then we do it after. I don't want to deal with
>> weeks and weeks of fallout from this. Write a rename script that we can
>> then run at the end of the next merge window. You're going to be playing
>> catch-up until that happens if we go the current route, and honestly
>> I'm not at all interested in the fallout from that.
>>
>> I know exactly what will happen until 5.1-rc opens, and what my tree will
>> look like from having to deal with this. And then I know exactly what Linus
>> is going to say, and I can't even argue against it, since he'll be totally
>> right.
>>
>> Hence it's not going to happen this way.
> 
> I can remove the renaming in patch 'block: rename bvec helpers', but
> change on bio_for_each_segment_all() is inevitable, and it is still an
> API change, so merge conflict can't avoid too.

That's not what I'm complaining about, API changes are inevitable for
something like this. What I'm complaining about is the very example
I posted above, and which has already caused issues. That's a frivolous
name change. Don't do it.

-- 
Jens Axboe


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

* Re: linux-next: manual merge of the block tree with the fscrypt tree
  2019-01-16  3:17     ` Jens Axboe
@ 2019-01-16  7:39       ` Ming Lei
  2019-01-16 14:27         ` Jens Axboe
  0 siblings, 1 reply; 14+ messages in thread
From: Ming Lei @ 2019-01-16  7:39 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Stephen Rothwell, Theodore Ts'o, Linux Next Mailing List,
	Linux Kernel Mailing List, Eric Biggers

On Tue, Jan 15, 2019 at 08:17:36PM -0700, Jens Axboe wrote:
> On 1/15/19 8:13 PM, Ming Lei wrote:
> > On Tue, Jan 15, 2019 at 07:55:39PM -0700, Jens Axboe wrote:
> >> On 1/15/19 7:25 PM, Stephen Rothwell wrote:
> >>> Hi all,
> >>>
> >>> Today's linux-next merge of the block tree got a conflict in:
> >>>
> >>>   fs/ext4/readpage.c
> >>>
> >>> between commit:
> >>>
> >>>   acc9eb0a6073 ("ext4: add fs-verity read support")
> >>>
> >>> from the fscrypt tree and commit:
> >>>
> >>>   eb754eb2a953 ("block: allow bio_for_each_segment_all() to iterate over multi-page bvec")
> >>>
> >>> from the block tree.
> >>>
> >>> I fixed it up (see below - the former moved the code modified by the
> >>> latter) 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.
> >>
> >> Ming, I'm pulling this, I thought we agreed none of these bullshit
> >> renames? The fact that a patch looks like this:
> >>
> >> -               for_each_bvec(bv, (it)->bvecs, __cur_iter, __cur_iter)        \
> >> +               for_each_segment(bv, (it)->bvecs, __cur_iter, __cur_iter)     \
> >>
> >> is SUPER annoying and does NOTHING but to cause merge conflicts.
> >>
> >> Resend it without that.
> > 
> > We need to differentiate 'segment' with 'bvec' in bvec helpers, which is
> > usually seldom used by drivers. For example, only two in-tree users(ceph, iov_iter).
> > That is why I rename it, and seems Christoph prefers to do it too.
> 
> If you want to do a rename, then we do it after. I don't want to deal with
> weeks and weeks of fallout from this. Write a rename script that we can
> then run at the end of the next merge window. You're going to be playing
> catch-up until that happens if we go the current route, and honestly
> I'm not at all interested in the fallout from that.
> 
> I know exactly what will happen until 5.1-rc opens, and what my tree will
> look like from having to deal with this. And then I know exactly what Linus
> is going to say, and I can't even argue against it, since he'll be totally
> right.
> 
> Hence it's not going to happen this way.

I can remove the renaming in patch 'block: rename bvec helpers', but
change on bio_for_each_segment_all() is inevitable, and it is still an
API change, so merge conflict can't avoid too.

Thanks,
Ming

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

* Re: linux-next: manual merge of the block tree with the fscrypt tree
  2019-01-16  3:13   ` Ming Lei
@ 2019-01-16  3:17     ` Jens Axboe
  2019-01-16  7:39       ` Ming Lei
  0 siblings, 1 reply; 14+ messages in thread
From: Jens Axboe @ 2019-01-16  3:17 UTC (permalink / raw)
  To: Ming Lei
  Cc: Stephen Rothwell, Theodore Ts'o, Linux Next Mailing List,
	Linux Kernel Mailing List, Eric Biggers

On 1/15/19 8:13 PM, Ming Lei wrote:
> On Tue, Jan 15, 2019 at 07:55:39PM -0700, Jens Axboe wrote:
>> On 1/15/19 7:25 PM, Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> Today's linux-next merge of the block tree got a conflict in:
>>>
>>>   fs/ext4/readpage.c
>>>
>>> between commit:
>>>
>>>   acc9eb0a6073 ("ext4: add fs-verity read support")
>>>
>>> from the fscrypt tree and commit:
>>>
>>>   eb754eb2a953 ("block: allow bio_for_each_segment_all() to iterate over multi-page bvec")
>>>
>>> from the block tree.
>>>
>>> I fixed it up (see below - the former moved the code modified by the
>>> latter) 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.
>>
>> Ming, I'm pulling this, I thought we agreed none of these bullshit
>> renames? The fact that a patch looks like this:
>>
>> -               for_each_bvec(bv, (it)->bvecs, __cur_iter, __cur_iter)        \
>> +               for_each_segment(bv, (it)->bvecs, __cur_iter, __cur_iter)     \
>>
>> is SUPER annoying and does NOTHING but to cause merge conflicts.
>>
>> Resend it without that.
> 
> We need to differentiate 'segment' with 'bvec' in bvec helpers, which is
> usually seldom used by drivers. For example, only two in-tree users(ceph, iov_iter).
> That is why I rename it, and seems Christoph prefers to do it too.

If you want to do a rename, then we do it after. I don't want to deal with
weeks and weeks of fallout from this. Write a rename script that we can
then run at the end of the next merge window. You're going to be playing
catch-up until that happens if we go the current route, and honestly
I'm not at all interested in the fallout from that.

I know exactly what will happen until 5.1-rc opens, and what my tree will
look like from having to deal with this. And then I know exactly what Linus
is going to say, and I can't even argue against it, since he'll be totally
right.

Hence it's not going to happen this way.

-- 
Jens Axboe


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

* Re: linux-next: manual merge of the block tree with the fscrypt tree
  2019-01-16  2:55 ` Jens Axboe
@ 2019-01-16  3:13   ` Ming Lei
  2019-01-16  3:17     ` Jens Axboe
  0 siblings, 1 reply; 14+ messages in thread
From: Ming Lei @ 2019-01-16  3:13 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Stephen Rothwell, Theodore Ts'o, Linux Next Mailing List,
	Linux Kernel Mailing List, Eric Biggers

On Tue, Jan 15, 2019 at 07:55:39PM -0700, Jens Axboe wrote:
> On 1/15/19 7:25 PM, Stephen Rothwell wrote:
> > Hi all,
> > 
> > Today's linux-next merge of the block tree got a conflict in:
> > 
> >   fs/ext4/readpage.c
> > 
> > between commit:
> > 
> >   acc9eb0a6073 ("ext4: add fs-verity read support")
> > 
> > from the fscrypt tree and commit:
> > 
> >   eb754eb2a953 ("block: allow bio_for_each_segment_all() to iterate over multi-page bvec")
> > 
> > from the block tree.
> > 
> > I fixed it up (see below - the former moved the code modified by the
> > latter) 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.
> 
> Ming, I'm pulling this, I thought we agreed none of these bullshit
> renames? The fact that a patch looks like this:
> 
> -               for_each_bvec(bv, (it)->bvecs, __cur_iter, __cur_iter)        \
> +               for_each_segment(bv, (it)->bvecs, __cur_iter, __cur_iter)     \
> 
> is SUPER annoying and does NOTHING but to cause merge conflicts.
> 
> Resend it without that.

We need to differentiate 'segment' with 'bvec' in bvec helpers, which is
usually seldom used by drivers. For example, only two in-tree users(ceph, iov_iter).
That is why I rename it, and seems Christoph prefers to do it too.

Thanks,
Ming

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

* Re: linux-next: manual merge of the block tree with the fscrypt tree
  2019-01-16  2:25 Stephen Rothwell
@ 2019-01-16  2:55 ` Jens Axboe
  2019-01-16  3:13   ` Ming Lei
  0 siblings, 1 reply; 14+ messages in thread
From: Jens Axboe @ 2019-01-16  2:55 UTC (permalink / raw)
  To: Stephen Rothwell, Theodore Ts'o
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Ming Lei,
	Eric Biggers

On 1/15/19 7:25 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the block tree got a conflict in:
> 
>   fs/ext4/readpage.c
> 
> between commit:
> 
>   acc9eb0a6073 ("ext4: add fs-verity read support")
> 
> from the fscrypt tree and commit:
> 
>   eb754eb2a953 ("block: allow bio_for_each_segment_all() to iterate over multi-page bvec")
> 
> from the block tree.
> 
> I fixed it up (see below - the former moved the code modified by the
> latter) 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.

Ming, I'm pulling this, I thought we agreed none of these bullshit
renames? The fact that a patch looks like this:

-               for_each_bvec(bv, (it)->bvecs, __cur_iter, __cur_iter)        \
+               for_each_segment(bv, (it)->bvecs, __cur_iter, __cur_iter)     \

is SUPER annoying and does NOTHING but to cause merge conflicts.

Resend it without that.

-- 
Jens Axboe


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

* linux-next: manual merge of the block tree with the fscrypt tree
@ 2019-01-16  2:25 Stephen Rothwell
  2019-01-16  2:55 ` Jens Axboe
  0 siblings, 1 reply; 14+ messages in thread
From: Stephen Rothwell @ 2019-01-16  2:25 UTC (permalink / raw)
  To: Jens Axboe, Theodore Ts'o
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Ming Lei,
	Eric Biggers

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

Hi all,

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

  fs/ext4/readpage.c

between commit:

  acc9eb0a6073 ("ext4: add fs-verity read support")

from the fscrypt tree and commit:

  eb754eb2a953 ("block: allow bio_for_each_segment_all() to iterate over multi-page bvec")

from the block tree.

I fixed it up (see below - the former moved the code modified by the
latter) 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/ext4/readpage.c
index 0b353a0634f3,e53639784892..000000000000
--- a/fs/ext4/readpage.c
+++ b/fs/ext4/readpage.c
@@@ -61,124 -56,6 +61,125 @@@ static inline bool ext4_bio_encrypted(s
  #endif
  }
  
 +/* postprocessing steps for read bios */
 +enum bio_post_read_step {
 +	STEP_INITIAL = 0,
 +	STEP_DECRYPT,
 +	STEP_VERITY,
 +};
 +
 +struct bio_post_read_ctx {
 +	struct bio *bio;
 +	struct work_struct work;
 +	unsigned int cur_step;
 +	unsigned int enabled_steps;
 +};
 +
 +static void __read_end_io(struct bio *bio)
 +{
 +	struct page *page;
 +	struct bio_vec *bv;
 +	int i;
++	struct bvec_iter_all iter_all;
 +
- 	bio_for_each_segment_all(bv, bio, i) {
++	bio_for_each_segment_all(bv, bio, i, iter_all) {
 +		page = bv->bv_page;
 +
 +		/* PG_error was set if any post_read step failed */
 +		if (bio->bi_status || PageError(page)) {
 +			ClearPageUptodate(page);
 +			SetPageError(page);
 +		} else {
 +			SetPageUptodate(page);
 +		}
 +		unlock_page(page);
 +	}
 +	if (bio->bi_private)
 +		mempool_free(bio->bi_private, bio_post_read_ctx_pool);
 +	bio_put(bio);
 +}
 +
 +static void bio_post_read_processing(struct bio_post_read_ctx *ctx);
 +
 +static void decrypt_work(struct work_struct *work)
 +{
 +	struct bio_post_read_ctx *ctx =
 +		container_of(work, struct bio_post_read_ctx, work);
 +
 +	fscrypt_decrypt_bio(ctx->bio);
 +
 +	bio_post_read_processing(ctx);
 +}
 +
 +static void verity_work(struct work_struct *work)
 +{
 +	struct bio_post_read_ctx *ctx =
 +		container_of(work, struct bio_post_read_ctx, work);
 +
 +	fsverity_verify_bio(ctx->bio);
 +
 +	bio_post_read_processing(ctx);
 +}
 +
 +static void bio_post_read_processing(struct bio_post_read_ctx *ctx)
 +{
 +	/*
 +	 * We use different work queues for decryption and for verity because
 +	 * verity may require reading metadata pages that need decryption, and
 +	 * we shouldn't recurse to the same workqueue.
 +	 */
 +	switch (++ctx->cur_step) {
 +	case STEP_DECRYPT:
 +		if (ctx->enabled_steps & (1 << STEP_DECRYPT)) {
 +			INIT_WORK(&ctx->work, decrypt_work);
 +			fscrypt_enqueue_decrypt_work(&ctx->work);
 +			return;
 +		}
 +		ctx->cur_step++;
 +		/* fall-through */
 +	case STEP_VERITY:
 +		if (ctx->enabled_steps & (1 << STEP_VERITY)) {
 +			INIT_WORK(&ctx->work, verity_work);
 +			fsverity_enqueue_verify_work(&ctx->work);
 +			return;
 +		}
 +		ctx->cur_step++;
 +		/* fall-through */
 +	default:
 +		__read_end_io(ctx->bio);
 +	}
 +}
 +
 +static struct bio_post_read_ctx *get_bio_post_read_ctx(struct inode *inode,
 +						       struct bio *bio,
 +						       pgoff_t index)
 +{
 +	unsigned int post_read_steps = 0;
 +	struct bio_post_read_ctx *ctx = NULL;
 +
 +	if (IS_ENCRYPTED(inode) && S_ISREG(inode->i_mode))
 +		post_read_steps |= 1 << STEP_DECRYPT;
 +#ifdef CONFIG_FS_VERITY
 +	if (inode->i_verity_info != NULL &&
 +	    (index < ((i_size_read(inode) + PAGE_SIZE - 1) >> PAGE_SHIFT)))
 +		post_read_steps |= 1 << STEP_VERITY;
 +#endif
 +	if (post_read_steps) {
 +		ctx = mempool_alloc(bio_post_read_ctx_pool, GFP_NOFS);
 +		if (!ctx)
 +			return ERR_PTR(-ENOMEM);
 +		ctx->bio = bio;
 +		ctx->enabled_steps = post_read_steps;
 +		bio->bi_private = ctx;
 +	}
 +	return ctx;
 +}
 +
 +static bool bio_post_read_required(struct bio *bio)
 +{
 +	return bio->bi_private && !bio->bi_status;
 +}
 +
  /*
   * I/O completion handler for multipage BIOs.
   *

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

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

end of thread, other threads:[~2022-02-21 16:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09  3:02 linux-next: manual merge of the block tree with the fscrypt tree Stephen Rothwell
2020-07-23  1:03 ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2022-02-21 16:47 broonie
2022-02-21 16:45 broonie
2022-02-14  1:11 Stephen Rothwell
2022-02-14  7:15 ` Christoph Hellwig
2022-02-14 19:26 ` Eric Biggers
2019-01-16  2:25 Stephen Rothwell
2019-01-16  2:55 ` Jens Axboe
2019-01-16  3:13   ` Ming Lei
2019-01-16  3:17     ` Jens Axboe
2019-01-16  7:39       ` Ming Lei
2019-01-16 14:27         ` Jens Axboe
2019-01-18  2:45           ` Ming Lei

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.