Skip to contentSkip to conversation

linux-next: manual merge of the bcachefs tree with Linus tree

DISCUSSION Stephen Rothwell 1 participant 2 messages Feb 27, 2025 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next merge of the bcachefs tree got conflicts in:

fs/bcachefs/dirent.h
fs/bcachefs/fs-common.c
fs/bcachefs/sb-downgrade.c

between commit:

4804f3ac2649 ("bcachefs: Revert directory i_size")

from Linus tree and commits:

1afdbf54cda5 ("bcachefs: bcachefs_metadata_version_cached_backpointers") 713d0639b9f7 ("bcachefs: bcachefs_metadata_version_stripe_backpointers") 3e97fc2b1bb1 ("bcachefs: Kill dirent_occupied_size()") bb13a9d96daa ("bcachefs: bcachefs_metadata_version_casefolding")

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

Signature · 33 lines
Cheers,
Stephen Rothwell

diff --cc fs/bcachefs/dirent.h
index 362b3b2f2f2e,a6e15a012936..000000000000
--- a/fs/bcachefs/dirent.h
+++ b/fs/bcachefs/dirent.h
diff --cc fs/bcachefs/fs-common.c
index 2c3d46ac70c6,ca70a3de805c..000000000000
--- a/fs/bcachefs/fs-common.c
+++ b/fs/bcachefs/fs-common.c
diff --cc fs/bcachefs/sb-downgrade.c
index 051214fdc735,21130eadaf32..000000000000
--- a/fs/bcachefs/sb-downgrade.c
+++ b/fs/bcachefs/sb-downgrade.c
@@@ -90,7 -90,16 +90,13 @@@
  	  BIT_ULL(BCH_RECOVERY_PASS_check_allocations),		\
  	  BCH_FSCK_ERR_accounting_mismatch,			\
  	  BCH_FSCK_ERR_accounting_key_replicas_nr_devs_0,	\
- 	  BCH_FSCK_ERR_accounting_key_junk_at_end)
+ 	  BCH_FSCK_ERR_accounting_key_junk_at_end)		\
 -	x(directory_size,					\
 -	  BIT_ULL(BCH_RECOVERY_PASS_check_dirents),		\
 -	  BCH_FSCK_ERR_directory_size_mismatch)			\
+ 	x(cached_backpointers,					\
+ 	  BIT_ULL(BCH_RECOVERY_PASS_check_extents_to_backpointers),\
+ 	  BCH_FSCK_ERR_ptr_to_missing_backpointer)		\
+ 	x(stripe_backpointers,					\
+ 	  BIT_ULL(BCH_RECOVERY_PASS_check_extents_to_backpointers),\
+ 	  BCH_FSCK_ERR_ptr_to_missing_backpointer)
  
  #define DOWNGRADE_TABLE()					\
  	x(bucket_stripe_sectors,				\
#1 lore raw

Hi all,

Quoted 51 lines · On Fri, 28 Feb 2025 09:28:26 +1100 Stephen Rothwell <[email protected]>…

Today's linux-next merge of the bcachefs tree got conflicts in:

fs/bcachefs/dirent.h
fs/bcachefs/fs-common.c
fs/bcachefs/sb-downgrade.c

between commit:

4804f3ac2649 ("bcachefs: Revert directory i_size")

from Linus tree and commits:

1afdbf54cda5 ("bcachefs: bcachefs_metadata_version_cached_backpointers") 713d0639b9f7 ("bcachefs: bcachefs_metadata_version_stripe_backpointers") 3e97fc2b1bb1 ("bcachefs: Kill dirent_occupied_size()") bb13a9d96daa ("bcachefs: bcachefs_metadata_version_casefolding")

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

Signature · 2 lines
Cheers,
Stephen Rothwell
fs/bcachefs/dirent.h +0 -0
diff --cc fs/bcachefs/dirent.h
index 362b3b2f2f2e,a6e15a012936..000000000000
fs/bcachefs/fs-common.c +0 -0
diff --cc fs/bcachefs/fs-common.c
index 2c3d46ac70c6,ca70a3de805c..000000000000
fs/bcachefs/sb-downgrade.c +1 -1
diff --cc fs/bcachefs/sb-downgrade.c
index 051214fdc735,21130eadaf32..000000000000
@@@ -90,7 -90,16 +90,13 @@@
  	  BIT_ULL(BCH_RECOVERY_PASS_check_allocations),		\
  	  BCH_FSCK_ERR_accounting_mismatch,			\
  	  BCH_FSCK_ERR_accounting_key_replicas_nr_devs_0,	\
- 	  BCH_FSCK_ERR_accounting_key_junk_at_end)
+ 	  BCH_FSCK_ERR_accounting_key_junk_at_end)		\
 -	x(directory_size,					\
 -	  BIT_ULL(BCH_RECOVERY_PASS_check_dirents),		\

fs/bcachefs/sb-downgrade.c

Quoted 10 lines
fs/bcachefs/sb-downgrade.c +6 -0
 -	  BCH_FSCK_ERR_directory_size_mismatch)			\
+ 	x(cached_backpointers,					\
+ 	  BIT_ULL(BCH_RECOVERY_PASS_check_extents_to_backpointers),\
+ 	  BCH_FSCK_ERR_ptr_to_missing_backpointer)		\
+ 	x(stripe_backpointers,					\
+ 	  BIT_ULL(BCH_RECOVERY_PASS_check_extents_to_backpointers),\
+ 	  BCH_FSCK_ERR_ptr_to_missing_backpointer)
 
  #define DOWNGRADE_TABLE()					\
  	x(bucket_stripe_sectors,				\

I also needed this to make it build:

From: Stephen Rothwell <[email protected]>
Date: Fri, 28 Feb 2025 09:59:39 +1100
Subject: [PATCH] fix up for "bcachefs: fix directory i_size checking for the
last entry"

interacting with "bcachefs: Revert directory i_size"

---
 fs/bcachefs/fsck.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/bcachefs/fsck.c +1 -2
index 9e922babace0..0e85131d0af8 100644
@@ -2449,8 +2449,7 @@ int bch2_check_dirents(struct bch_fs *c)
 				POS(BCACHEFS_ROOT_INO, 0),
 				BTREE_ITER_prefetch|BTREE_ITER_all_snapshots, k,
 			check_dirent(trans, &iter, k, &hash_info, &dir, &target, &s)) ?:
-		check_subdir_count_notnested(trans, &dir) ?:
-		check_dir_i_size_notnested(trans, &dir));
+		check_subdir_count_notnested(trans, &dir));
 
 	snapshots_seen_exit(&s);
 	inode_walker_exit(&dir);
Signature · 5 lines
2.45.2

-- 
Cheers,
Stephen Rothwell