Subject: Re: linux-next: manual merge of the vfs-brauner tree with the btrfs tree

From: Stephen Rothwell <[email-masked]>
Date: Tue, 2 Dec 2025 11:58:34 +1100

Hi all,

On Mon, 3 Nov 2025 08:58:32 +1100 Stephen Rothwell <[email-masked]> wrote:
>
> Today's linux-next merge of the vfs-brauner tree got a conflict in:
> 
>   fs/btrfs/file.c
> 
> between commit:
> 
>   ede21a086a16 ("btrfs: use end_pos variable where needed in btrfs_dirty_folio()")
> 
> from the btrfs tree and commit:
> 
>   48f3784b17d9 ("btrfs: Use folio_next_pos()")
> 
> from the vfs-brauner 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 1e0ff3d7210d,977931cfa71e..000000000000
> --- a/fs/btrfs/file.c
> +++ b/fs/btrfs/file.c
> @@@ -86,9 -86,11 +86,9 @@@ int btrfs_dirty_folio(struct btrfs_inod
>   		extra_bits |= EXTENT_NORESERVE;
>   
>   	start_pos = round_down(pos, fs_info->sectorsize);
>  -	num_bytes = round_up(write_bytes + pos - start_pos,
>  -			     fs_info->sectorsize);
>  +	num_bytes = round_up(end_pos - start_pos, fs_info->sectorsize);
>   	ASSERT(num_bytes <= U32_MAX);
> - 	ASSERT(folio_pos(folio) <= pos && folio_end(folio) >= end_pos);
>  -	ASSERT(folio_pos(folio) <= pos &&
>  -	       folio_next_pos(folio) >= pos + write_bytes);
> ++	ASSERT(folio_pos(folio) <= pos && folio_next_pos(folio) >= end_pos);
>   
>   	end_of_last_block = start_pos + num_bytes - 1;
>   

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

-- 
Cheers,
Stephen Rothwell