Commit f793bc15 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Drop extra pointers when marking data as in a stripe

We ideally want the buckets used for the extra initial replicas to be
reused right away.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 1d2ff0a6
...@@ -784,12 +784,9 @@ static int ec_stripe_update_ptrs(struct bch_fs *c, ...@@ -784,12 +784,9 @@ static int ec_stripe_update_ptrs(struct bch_fs *c,
bkey_on_stack_reassemble(&sk, c, k); bkey_on_stack_reassemble(&sk, c, k);
e = bkey_i_to_s_extent(sk.k); e = bkey_i_to_s_extent(sk.k);
extent_for_each_ptr(e, ptr) { bch2_bkey_drop_ptrs(e.s, ptr, ptr->dev != dev);
if (ptr->dev == dev) ec_ptr = (void *) bch2_bkey_has_device(e.s_c, dev);
ec_ptr = ptr; BUG_ON(!ec_ptr);
else
ptr->cached = true;
}
extent_stripe_ptr_add(e, s, ec_ptr, idx); extent_stripe_ptr_add(e, s, ec_ptr, idx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment