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: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
1d2ff0a630
commit
f793bc1549
@ -784,12 +784,9 @@ static int ec_stripe_update_ptrs(struct bch_fs *c,
|
||||
bkey_on_stack_reassemble(&sk, c, k);
|
||||
e = bkey_i_to_s_extent(sk.k);
|
||||
|
||||
extent_for_each_ptr(e, ptr) {
|
||||
if (ptr->dev == dev)
|
||||
ec_ptr = ptr;
|
||||
else
|
||||
ptr->cached = true;
|
||||
}
|
||||
bch2_bkey_drop_ptrs(e.s, ptr, ptr->dev != dev);
|
||||
ec_ptr = (void *) bch2_bkey_has_device(e.s_c, dev);
|
||||
BUG_ON(!ec_ptr);
|
||||
|
||||
extent_stripe_ptr_add(e, s, ec_ptr, idx);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user