public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: manual merge of the bcachefs tree with Linus' tree
@ 2024-07-10 23:50 Stephen Rothwell
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2024-07-10 23:50 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  fs/bcachefs/alloc_background.c

between commit:

  d39881d2da2a ("bcachefs: add check for missing fragmentation in check_alloc_to_lru_ref()")

from Linus' tree and commit:

  f75ad706a1cf ("bcachefs: fsck_err() may now take a btree_trans")

from the bcachefs tree.

I fixed it up (I just used the former where they conflicted) 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

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

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

* linux-next: manual merge of the bcachefs tree with Linus' tree
@ 2024-07-10 23:57 Stephen Rothwell
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2024-07-10 23:57 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  fs/bcachefs/backpointers.c

between commit:

  92e1c29ae803 ("bcachefs: bch2_btree_write_buffer_maybe_flush()")

from Linus' tree and commit:

  f75ad706a1cf ("bcachefs: fsck_err() may now take a btree_trans")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/bcachefs/backpointers.c
index 6d8b1bc90be0,ca16fa5de7c8..000000000000
--- a/fs/bcachefs/backpointers.c
+++ b/fs/bcachefs/backpointers.c
@@@ -903,18 -925,20 +903,18 @@@ static int check_one_backpointer(struc
  	if (ret)
  		return ret;
  
 -	if (!k.k && !bpos_eq(*last_flushed_pos, bp.k->p)) {
 -		*last_flushed_pos = bp.k->p;
 -		ret = bch2_btree_write_buffer_flush_sync(trans) ?:
 -			-BCH_ERR_transaction_restart_write_buffer_flush;
 -		goto out;
 -	}
 +	if (!k.k) {
 +		ret = bch2_btree_write_buffer_maybe_flush(trans, bp.s_c, last_flushed);
 +		if (ret)
 +			goto out;
  
- 		if (fsck_err(c, backpointer_to_missing_ptr,
 -	if (fsck_err_on(!k.k,
 -			trans, backpointer_to_missing_ptr,
 -			"backpointer for missing %s\n  %s",
 -			bp.v->level ? "btree node" : "extent",
 -			(bch2_bkey_val_to_text(&buf, c, bp.s_c), buf.buf))) {
 -		ret = bch2_btree_delete_at_buffered(trans, BTREE_ID_backpointers, bp.k->p);
 -		goto out;
++		if (fsck_err(trans, backpointer_to_missing_ptr,
 +			     "backpointer for missing %s\n  %s",
 +			     bp.v->level ? "btree node" : "extent",
 +			     (bch2_bkey_val_to_text(&buf, c, bp.s_c), buf.buf))) {
 +			ret = bch2_btree_delete_at_buffered(trans, BTREE_ID_backpointers, bp.k->p);
 +			goto out;
 +		}
  	}
  out:
  fsck_err:

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

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

* linux-next: manual merge of the bcachefs tree with Linus' tree
@ 2024-07-11  0:04 Stephen Rothwell
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2024-07-11  0:04 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  fs/bcachefs/btree_gc.c

between commit:

  b5cbb42dc59f ("bcachefs: Repair fragmentation_lru in alloc_write_key()")

from Linus' tree and commits:

  282e9325dd4a ("bcachefs: bch_alloc->stripe_sectors")
  f75ad706a1cf ("bcachefs: fsck_err() may now take a btree_trans")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/bcachefs/btree_gc.c
index 7c72a9e6f511,2e9ccb2071ff..000000000000
--- a/fs/bcachefs/btree_gc.c
+++ b/fs/bcachefs/btree_gc.c
@@@ -899,14 -812,14 +812,16 @@@ static int bch2_alloc_write_key(struct 
  	alloc_data_type_set(&gc, gc.data_type);
  
  	if (gc.data_type != old_gc.data_type ||
- 	    gc.dirty_sectors != old_gc.dirty_sectors)
- 		bch2_dev_usage_update(c, ca, &old_gc, &gc, 0, true);
- 	percpu_up_read(&c->mark_lock);
+ 	    gc.dirty_sectors != old_gc.dirty_sectors) {
+ 		ret = bch2_alloc_key_to_dev_counters(trans, ca, &old_gc, &gc, BTREE_TRIGGER_gc);
+ 		if (ret)
+ 			return ret;
+ 	}
  
 +	gc.fragmentation_lru = alloc_lru_idx_fragmentation(gc, ca);
 +
- 	if (fsck_err_on(new.data_type != gc.data_type, c,
- 			alloc_key_data_type_wrong,
+ 	if (fsck_err_on(new.data_type != gc.data_type,
+ 			trans, alloc_key_data_type_wrong,
  			"bucket %llu:%llu gen %u has wrong data_type"
  			": got %s, should be %s",
  			iter->pos.inode, iter->pos.offset,
@@@ -916,21 -829,28 +831,23 @@@
  		new.data_type = gc.data_type;
  
  #define copy_bucket_field(_errtype, _f)					\
- 	if (fsck_err_on(new._f != gc._f, c, _errtype,			\
+ 	if (fsck_err_on(new._f != gc._f,				\
+ 			trans, _errtype,				\
  			"bucket %llu:%llu gen %u data type %s has wrong " #_f	\
 -			": got %u, should be %u",			\
 +			": got %llu, should be %llu",			\
  			iter->pos.inode, iter->pos.offset,		\
  			gc.gen,						\
  			bch2_data_type_str(gc.data_type),		\
 -			new._f, gc._f))					\
 +			(u64) new._f, (u64) gc._f))				\
  		new._f = gc._f;						\
  
 -	copy_bucket_field(alloc_key_gen_wrong,
 -			  gen);
 -	copy_bucket_field(alloc_key_dirty_sectors_wrong,
 -			  dirty_sectors);
 -	copy_bucket_field(alloc_key_stripe_sectors_wrong,
 -			  stripe_sectors);
 -	copy_bucket_field(alloc_key_cached_sectors_wrong,
 -			  cached_sectors);
 -	copy_bucket_field(alloc_key_stripe_wrong,
 -			  stripe);
 -	copy_bucket_field(alloc_key_stripe_redundancy_wrong,
 -			  stripe_redundancy);
 +	copy_bucket_field(alloc_key_gen_wrong,			gen);
 +	copy_bucket_field(alloc_key_dirty_sectors_wrong,	dirty_sectors);
++	copy_bucket_field(alloc_key_stripe_sectors_wrong,	stripe_sectors);
 +	copy_bucket_field(alloc_key_cached_sectors_wrong,	cached_sectors);
 +	copy_bucket_field(alloc_key_stripe_wrong,		stripe);
 +	copy_bucket_field(alloc_key_stripe_redundancy_wrong,	stripe_redundancy);
 +	copy_bucket_field(alloc_key_fragmentation_lru_wrong,	fragmentation_lru);
  #undef copy_bucket_field
  
  	if (!bch2_alloc_v4_cmp(*old, new))

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

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

* linux-next: manual merge of the bcachefs tree with Linus' tree
@ 2024-07-11  0:12 Stephen Rothwell
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2024-07-11  0:12 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  fs/bcachefs/fs.c

between commit:

  0f1f7324da0a ("bcachefs: Log mount failure error code")

from Linus' tree and commit:

  43c6a0cede5a ("bcachefs: Kill bch2_mount()")

from the bcachefs tree.

I fixed it up (I dropped the former change) 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

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

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

* linux-next: manual merge of the bcachefs tree with Linus tree
@ 2025-02-27 22:28 Stephen Rothwell
  2025-02-27 23:29 ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2025-02-27 22:28 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Joshua Ashton, Linux Kernel Mailing List, Linux Next Mailing List

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

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.

-- 
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,				\

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

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

* Re: linux-next: manual merge of the bcachefs tree with Linus tree
  2025-02-27 22:28 linux-next: manual merge of the bcachefs tree with Linus tree Stephen Rothwell
@ 2025-02-27 23:29 ` Stephen Rothwell
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2025-02-27 23:29 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Joshua Ashton, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

On Fri, 28 Feb 2025 09:28:26 +1100 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> 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.
> 
> -- 
> 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,				\

I also needed this to make it build:

From: Stephen Rothwell <sfr@canb•auug.org.au>
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"

Signed-off-by: Stephen Rothwell <sfr@canb•auug.org.au>
---
 fs/bcachefs/fsck.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c
index 9e922babace0..0e85131d0af8 100644
--- a/fs/bcachefs/fsck.c
+++ b/fs/bcachefs/fsck.c
@@ -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);
-- 
2.45.2

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: manual merge of the bcachefs tree with Linus' tree
@ 2025-03-30 22:28 Stephen Rothwell
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2025-03-30 22:28 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Christian Brauner, Linux Kernel Mailing List,
	Linux Next Mailing List, NeilBrown

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

Hi all,

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

  fs/bcachefs/fs-ioctl.c

between commit:

  1c3cb50b58c3 ("VFS: change kern_path_locked() and user_path_locked_at() to never return negative dentry")

from Linus' tree and commit:

  707549600c4a ("bcachefs: bch2_ioctl_subvolume_destroy() fixes")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/bcachefs/fs-ioctl.c
index f45054cee746,0273130f18dc..000000000000
--- a/fs/bcachefs/fs-ioctl.c
+++ b/fs/bcachefs/fs-ioctl.c
@@@ -537,10 -537,16 +537,12 @@@ static long bch2_ioctl_subvolume_destro
  		ret = -EXDEV;
  		goto err;
  	}
- 	ret = __bch2_unlink(dir, victim, true);
 -	if (!d_is_positive(victim)) {
 -		ret = -ENOENT;
 -		goto err;
 -	}
+ 
+ 	ret =   inode_permission(file_mnt_idmap(filp), d_inode(victim), MAY_WRITE) ?:
+ 		__bch2_unlink(dir, victim, true);
  	if (!ret) {
  		fsnotify_rmdir(dir, victim);
- 		d_delete(victim);
+ 		d_invalidate(victim);
  	}
  err:
  	inode_unlock(dir);

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

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

end of thread, other threads:[~2025-03-30 22:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-27 22:28 linux-next: manual merge of the bcachefs tree with Linus tree Stephen Rothwell
2025-02-27 23:29 ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2025-03-30 22:28 linux-next: manual merge of the bcachefs tree with Linus' tree Stephen Rothwell
2024-07-11  0:12 Stephen Rothwell
2024-07-11  0:04 Stephen Rothwell
2024-07-10 23:57 Stephen Rothwell
2024-07-10 23:50 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox