public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Kent Overstreet <kent.overstreet@linux•dev>
Cc: Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: linux-next: manual merge of the bcachefs tree with Linus' tree
Date: Thu, 11 Jul 2024 10:04:26 +1000	[thread overview]
Message-ID: <20240711100426.2ae8af91@canb.auug.org.au> (raw)

[-- 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 --]

             reply	other threads:[~2024-07-11  0:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-11  0:04 Stephen Rothwell [this message]
  -- 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
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
2024-07-11  0:12 linux-next: manual merge of the bcachefs tree with Linus' tree Stephen Rothwell
2024-07-10 23:57 Stephen Rothwell
2024-07-10 23:50 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240711100426.2ae8af91@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=kent.overstreet@linux$(echo .)dev \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox