From: Kent Overstreet Date: Sat, 8 Feb 2025 02:26:27 +0000 (-0500) Subject: bcachefs: Ignore backpointers to stripes in ec_stripe_update_extents() X-Git-Tag: v6.15-rc1~146^2~131 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7606fb4d26e0684d40e40ea070a30af901e5bbbd;p=thirdparty%2Fkernel%2Flinux.git bcachefs: Ignore backpointers to stripes in ec_stripe_update_extents() Prep work for stripe backpointers: this path previously would get very confused at being asked to process (remove redundant replicas) stripes. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c index d2a5e76e64791..1aa56d28de335 100644 --- a/fs/bcachefs/ec.c +++ b/fs/bcachefs/ec.c @@ -1380,8 +1380,12 @@ static int ec_stripe_update_bucket(struct btree_trans *trans, struct ec_stripe_b if (bp_k.k->type != KEY_TYPE_backpointer) continue; + struct bkey_s_c_backpointer bp = bkey_s_c_to_backpointer(bp_k); + if (bp.v->btree_id == BTREE_ID_stripes) + continue; + ec_stripe_update_extent(trans, ca, bucket_pos, ptr.gen, s, - bkey_s_c_to_backpointer(bp_k), &last_flushed); + bp, &last_flushed); })); bch2_bkey_buf_exit(&last_flushed, c);