linux-next: manual merge of the block tree with the vfs tree

Stephen Rothwell posted 1 patch 1 year, 4 months ago
linux-next: manual merge of the block tree with the vfs tree
Posted by Stephen Rothwell 1 year, 4 months ago
Hi all,

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

  block/blk-core.c

between commit:

  3f9b8fb46e5d ("Use bdev_is_paritition() instead of open-coding it")

from the vfs tree and commit:

  99dc422335d8 ("block: support to account io_ticks precisely")

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 block/blk-core.c
index a4035dc7640d,01186333c88e..000000000000
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@@ -990,11 -986,12 +989,12 @@@ void update_io_ticks(struct block_devic
  	unsigned long stamp;
  again:
  	stamp = READ_ONCE(part->bd_stamp);
- 	if (unlikely(time_after(now, stamp))) {
- 		if (likely(try_cmpxchg(&part->bd_stamp, &stamp, now)))
- 			__part_stat_add(part, io_ticks, end ? now - stamp : 1);
- 	}
+ 	if (unlikely(time_after(now, stamp)) &&
+ 	    likely(try_cmpxchg(&part->bd_stamp, &stamp, now)) &&
+ 	    (end || part_in_flight(part)))
+ 		__part_stat_add(part, io_ticks, now - stamp);
+ 
 -	if (part->bd_partno) {
 +	if (bdev_is_partition(part)) {
  		part = bdev_whole(part);
  		goto again;
  	}
Re: linux-next: manual merge of the block tree with the vfs tree
Posted by Stephen Rothwell 1 year, 4 months ago
Hi all,

On Fri, 10 May 2024 12:34:19 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the block tree got a conflict in:
> 
>   block/blk-core.c
> 
> between commit:
> 
>   3f9b8fb46e5d ("Use bdev_is_paritition() instead of open-coding it")
> 
> from the vfs tree and commit:
> 
>   99dc422335d8 ("block: support to account io_ticks precisely")
> 
> 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 block/blk-core.c
> index a4035dc7640d,01186333c88e..000000000000
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@@ -990,11 -986,12 +989,12 @@@ void update_io_ticks(struct block_devic
>   	unsigned long stamp;
>   again:
>   	stamp = READ_ONCE(part->bd_stamp);
> - 	if (unlikely(time_after(now, stamp))) {
> - 		if (likely(try_cmpxchg(&part->bd_stamp, &stamp, now)))
> - 			__part_stat_add(part, io_ticks, end ? now - stamp : 1);
> - 	}
> + 	if (unlikely(time_after(now, stamp)) &&
> + 	    likely(try_cmpxchg(&part->bd_stamp, &stamp, now)) &&
> + 	    (end || part_in_flight(part)))
> + 		__part_stat_add(part, io_ticks, now - stamp);
> + 
>  -	if (part->bd_partno) {
>  +	if (bdev_is_partition(part)) {
>   		part = bdev_whole(part);
>   		goto again;
>   	}

This is now a conflict between the vfs tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell