linux-next: manual merge of the fs-next tree with the mm-nonmm-unstable tree

Mark Brown posted 1 patch 2 months, 1 week ago
linux-next: manual merge of the fs-next tree with the mm-nonmm-unstable tree
Posted by Mark Brown 2 months, 1 week ago
Hi all,

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

  fs/ocfs2/dir.c

between commits:

  bdff37e327275 ("ocfs2: validate dx_root extent list fields during block read")
  28c33de101792 ("ocfs2: remove empty extent list check in ocfs2_dx_dir_lookup_rec()")

from the mm-nonmm-unstable tree and commit:

  0b2600f81cefc ("treewide: change inode->i_ino from unsigned long to u64")

from the fs-next 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 --combined fs/ocfs2/dir.c
index d94595a499231,b82fe4431eb1f..0000000000000
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@@ -593,7 -593,7 +593,7 @@@ static int ocfs2_validate_dx_root(struc
  		mlog(ML_ERROR,
  		     "Checksum failed for dir index root block %llu\n",
  		     (unsigned long long)bh->b_blocknr);
 -		return ret;
 +		goto bail;
  	}
  
  	if (!OCFS2_IS_VALID_DX_ROOT(dx_root)) {
@@@ -601,32 -601,8 +601,32 @@@
  				  "Dir Index Root # %llu has bad signature %.*s\n",
  				  (unsigned long long)le64_to_cpu(dx_root->dr_blkno),
  				  7, dx_root->dr_signature);
 +		goto bail;
  	}
  
 +	if (!(dx_root->dr_flags & OCFS2_DX_FLAG_INLINE)) {
 +		struct ocfs2_extent_list *el = &dx_root->dr_list;
 +
 +		if (le16_to_cpu(el->l_count) != ocfs2_extent_recs_per_dx_root(sb)) {
 +			ret = ocfs2_error(sb,
 +					  "Dir Index Root # %llu has invalid l_count %u (expected %u)\n",
 +					  (unsigned long long)le64_to_cpu(dx_root->dr_blkno),
 +					  le16_to_cpu(el->l_count),
 +					  ocfs2_extent_recs_per_dx_root(sb));
 +			goto bail;
 +		}
 +
 +		if (le16_to_cpu(el->l_next_free_rec) > le16_to_cpu(el->l_count)) {
 +			ret = ocfs2_error(sb,
 +					  "Dir Index Root # %llu has invalid l_next_free_rec %u (l_count %u)\n",
 +					  (unsigned long long)le64_to_cpu(dx_root->dr_blkno),
 +					  le16_to_cpu(el->l_next_free_rec),
 +					  le16_to_cpu(el->l_count));
 +			goto bail;
 +		}
 +	}
 +
 +bail:
  	return ret;
  }
  
@@@ -815,6 -791,14 +815,6 @@@ static int ocfs2_dx_dir_lookup_rec(stru
  	struct ocfs2_extent_block *eb;
  	struct ocfs2_extent_rec *rec = NULL;
  
 -	if (le16_to_cpu(el->l_count) !=
 -	    ocfs2_extent_recs_per_dx_root(inode->i_sb)) {
 -		ret = ocfs2_error(inode->i_sb,
 -				  "Inode %llu has invalid extent list length %u\n",
 -				  inode->i_ino, le16_to_cpu(el->l_count));
 -		goto out;
 -	}
 -
  	if (el->l_tree_depth) {
  		ret = ocfs2_find_leaf(INODE_CACHE(inode), el, major_hash,
  				      &eb_bh);
@@@ -828,13 -812,21 +828,13 @@@
  
  		if (el->l_tree_depth) {
  			ret = ocfs2_error(inode->i_sb,
- 					  "Inode %lu has non zero tree depth in btree tree block %llu\n",
+ 					  "Inode %llu has non zero tree depth in btree tree block %llu\n",
  					  inode->i_ino,
  					  (unsigned long long)eb_bh->b_blocknr);
  			goto out;
  		}
  	}
  
 -	if (le16_to_cpu(el->l_next_free_rec) == 0) {
 -		ret = ocfs2_error(inode->i_sb,
 -				  "Inode %llu has empty extent list at depth %u\n",
 -				  inode->i_ino,
 -				  le16_to_cpu(el->l_tree_depth));
 -		goto out;
 -	}
 -
  	found = 0;
  	for (i = le16_to_cpu(el->l_next_free_rec) - 1; i >= 0; i--) {
  		rec = &el->l_recs[i];
@@@ -847,9 -839,10 +847,9 @@@
  
  	if (!found) {
  		ret = ocfs2_error(inode->i_sb,
- 				  "Inode %lu has no extent record for hash %u in btree (next_free_rec %u)\n",
 -				  "Inode %llu has bad extent record (%u, %u, 0) in btree\n",
 -				  inode->i_ino,
 -				  le32_to_cpu(rec->e_cpos),
 -				  ocfs2_rec_clusters(el, rec));
++				  "Inode %llu has no extent record for hash %u in btree (next_free_rec %u)\n",
 +				  inode->i_ino, major_hash,
 +				  le16_to_cpu(el->l_next_free_rec));
  		goto out;
  	}
  
Re: linux-next: manual merge of the fs-next tree with the mm-nonmm-unstable tree
Posted by Andrew Morton 2 months, 1 week ago
On Mon, 6 Apr 2026 14:13:49 +0100 Mark Brown <broonie@kernel.org> wrote:

> Today's linux-next merge of the fs-next tree got a conflict in:
> 
>   fs/ocfs2/dir.c
> 
> between commits:
> 
>   bdff37e327275 ("ocfs2: validate dx_root extent list fields during block read")
>   28c33de101792 ("ocfs2: remove empty extent list check in ocfs2_dx_dir_lookup_rec()")
> 
> from the mm-nonmm-unstable tree and commit:
> 
>   0b2600f81cefc ("treewide: change inode->i_ino from unsigned long to u64")
> 
> from the fs-next tree.

Thanks.  That's a nasty-looking conflict due to the applying order.  The
0b2600f81cefc change is actually small, below.

Hopefully Linus can figure it out ;)


--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -794,7 +794,7 @@ static int ocfs2_dx_dir_lookup_rec(struct inode *inode,
 	if (le16_to_cpu(el->l_count) !=
 	    ocfs2_extent_recs_per_dx_root(inode->i_sb)) {
 		ret = ocfs2_error(inode->i_sb,
-				  "Inode %lu has invalid extent list length %u\n",
+				  "Inode %llu has invalid extent list length %u\n",
 				  inode->i_ino, le16_to_cpu(el->l_count));
 		goto out;
 	}
@@ -812,7 +812,7 @@ static int ocfs2_dx_dir_lookup_rec(struct inode *inode,
 
 		if (el->l_tree_depth) {
 			ret = ocfs2_error(inode->i_sb,
-					  "Inode %lu has non zero tree depth in btree tree block %llu\n",
+					  "Inode %llu has non zero tree depth in btree tree block %llu\n",
 					  inode->i_ino,
 					  (unsigned long long)eb_bh->b_blocknr);
 			goto out;
@@ -821,7 +821,7 @@ static int ocfs2_dx_dir_lookup_rec(struct inode *inode,
 
 	if (le16_to_cpu(el->l_next_free_rec) == 0) {
 		ret = ocfs2_error(inode->i_sb,
-				  "Inode %lu has empty extent list at depth %u\n",
+				  "Inode %llu has empty extent list at depth %u\n",
 				  inode->i_ino,
 				  le16_to_cpu(el->l_tree_depth));
 		goto out;
@@ -839,7 +839,7 @@ static int ocfs2_dx_dir_lookup_rec(struct inode *inode,
 
 	if (!found) {
 		ret = ocfs2_error(inode->i_sb,
-				  "Inode %lu has bad extent record (%u, %u, 0) in btree\n",
+				  "Inode %llu has bad extent record (%u, %u, 0) in btree\n",
 				  inode->i_ino,
 				  le32_to_cpu(rec->e_cpos),
 				  ocfs2_rec_clusters(el, rec));
Re: linux-next: manual merge of the fs-next tree with the mm-nonmm-unstable tree
Posted by Joseph Qi 2 months, 1 week ago

On 4/7/26 12:25 AM, Andrew Morton wrote:
> On Mon, 6 Apr 2026 14:13:49 +0100 Mark Brown <broonie@kernel.org> wrote:
> 
>> Today's linux-next merge of the fs-next tree got a conflict in:
>>
>>   fs/ocfs2/dir.c
>>
>> between commits:
>>
>>   bdff37e327275 ("ocfs2: validate dx_root extent list fields during block read")
>>   28c33de101792 ("ocfs2: remove empty extent list check in ocfs2_dx_dir_lookup_rec()")
>>
>> from the mm-nonmm-unstable tree and commit:
>>
>>   0b2600f81cefc ("treewide: change inode->i_ino from unsigned long to u64")
>>
>> from the fs-next tree.
> 
> Thanks.  That's a nasty-looking conflict due to the applying order.  The
> 0b2600f81cefc change is actually small, below.
> 
> Hopefully Linus can figure it out ;)
> 
> 
Should I resend the series base on the latest linux-next?

Thanks,
Joseph

> --- a/fs/ocfs2/dir.c
> +++ b/fs/ocfs2/dir.c
> @@ -794,7 +794,7 @@ static int ocfs2_dx_dir_lookup_rec(struct inode *inode,
>  	if (le16_to_cpu(el->l_count) !=
>  	    ocfs2_extent_recs_per_dx_root(inode->i_sb)) {
>  		ret = ocfs2_error(inode->i_sb,
> -				  "Inode %lu has invalid extent list length %u\n",
> +				  "Inode %llu has invalid extent list length %u\n",
>  				  inode->i_ino, le16_to_cpu(el->l_count));
>  		goto out;
>  	}
> @@ -812,7 +812,7 @@ static int ocfs2_dx_dir_lookup_rec(struct inode *inode,
>  
>  		if (el->l_tree_depth) {
>  			ret = ocfs2_error(inode->i_sb,
> -					  "Inode %lu has non zero tree depth in btree tree block %llu\n",
> +					  "Inode %llu has non zero tree depth in btree tree block %llu\n",
>  					  inode->i_ino,
>  					  (unsigned long long)eb_bh->b_blocknr);
>  			goto out;
> @@ -821,7 +821,7 @@ static int ocfs2_dx_dir_lookup_rec(struct inode *inode,
>  
>  	if (le16_to_cpu(el->l_next_free_rec) == 0) {
>  		ret = ocfs2_error(inode->i_sb,
> -				  "Inode %lu has empty extent list at depth %u\n",
> +				  "Inode %llu has empty extent list at depth %u\n",
>  				  inode->i_ino,
>  				  le16_to_cpu(el->l_tree_depth));
>  		goto out;
> @@ -839,7 +839,7 @@ static int ocfs2_dx_dir_lookup_rec(struct inode *inode,
>  
>  	if (!found) {
>  		ret = ocfs2_error(inode->i_sb,
> -				  "Inode %lu has bad extent record (%u, %u, 0) in btree\n",
> +				  "Inode %llu has bad extent record (%u, %u, 0) in btree\n",
>  				  inode->i_ino,
>  				  le32_to_cpu(rec->e_cpos),
>  				  ocfs2_rec_clusters(el, rec));
Re: linux-next: manual merge of the fs-next tree with the mm-nonmm-unstable tree
Posted by Mark Brown 2 months, 1 week ago
On Tue, Apr 07, 2026 at 10:19:59AM +0800, Joseph Qi wrote:
> On 4/7/26 12:25 AM, Andrew Morton wrote:

> > Thanks.  That's a nasty-looking conflict due to the applying order.  The
> > 0b2600f81cefc change is actually small, below.

> > Hopefully Linus can figure it out ;)

> Should I resend the series base on the latest linux-next?

Definitely don't do that, things sent to Linus should be based on his
tree only - basing on -next will pull in far too much stuff.
Re: linux-next: manual merge of the fs-next tree with the mm-nonmm-unstable tree
Posted by Andrew Morton 2 months, 1 week ago
On Tue, 7 Apr 2026 10:19:59 +0800 Joseph Qi <joseph.qi@linux.alibaba.com> wrote:

> 
> 
> On 4/7/26 12:25 AM, Andrew Morton wrote:
> > On Mon, 6 Apr 2026 14:13:49 +0100 Mark Brown <broonie@kernel.org> wrote:
> > 
> >> Today's linux-next merge of the fs-next tree got a conflict in:
> >>
> >>   fs/ocfs2/dir.c
> >>
> >> between commits:
> >>
> >>   bdff37e327275 ("ocfs2: validate dx_root extent list fields during block read")
> >>   28c33de101792 ("ocfs2: remove empty extent list check in ocfs2_dx_dir_lookup_rec()")
> >>
> >> from the mm-nonmm-unstable tree and commit:
> >>
> >>   0b2600f81cefc ("treewide: change inode->i_ino from unsigned long to u64")
> >>
> >> from the fs-next tree.
> > 
> > Thanks.  That's a nasty-looking conflict due to the applying order.  The
> > 0b2600f81cefc change is actually small, below.
> > 
> > Hopefully Linus can figure it out ;)
> > 
> > 
> Should I resend the series base on the latest linux-next?

It should be OK - the resolution is straightforward and Linus is good at
these things.