Update bcachefs sources to 676dd269f0f8 mean and variance: Promote to lib/math

This commit is contained in:
Kent Overstreet 2023-11-29 22:42:52 -05:00
parent 46d5160869
commit 3bd4653767
3 changed files with 15 additions and 5 deletions

View File

@ -1 +1 @@
eb83f1f842bb95e1f61489b48854240777368763 676dd269f0f8d59f730ba8e96474448576e4f677

View File

@ -651,6 +651,8 @@ static int bch2_check_extents_to_backpointers_pass(struct btree_trans *trans,
} }
if (ret) if (ret)
break; break;
if (bpos_eq(iter.pos, SPOS_MAX))
break;
bch2_btree_iter_advance(&iter); bch2_btree_iter_advance(&iter);
} }
bch2_trans_iter_exit(trans, &iter); bch2_trans_iter_exit(trans, &iter);

View File

@ -170,15 +170,23 @@ static int bch2_copygc_get_buckets(struct moving_context *ctxt,
saw++; saw++;
if (!bch2_bucket_is_movable(trans, &b, lru_pos_time(k.k->p))) ret2 = bch2_bucket_is_movable(trans, &b, lru_pos_time(k.k->p));
if (ret2 < 0)
goto err;
if (!ret2)
not_movable++; not_movable++;
else if (bucket_in_flight(buckets_in_flight, b.k)) else if (bucket_in_flight(buckets_in_flight, b.k))
in_flight++; in_flight++;
else { else {
ret2 = darray_push(buckets, b) ?: buckets->nr >= nr_to_get; ret2 = darray_push(buckets, b);
if (ret2 >= 0) if (ret2)
sectors += b.sectors; goto err;
sectors += b.sectors;
} }
ret2 = buckets->nr >= nr_to_get;
err:
ret2; ret2;
})); }));