Update bcachefs sources to ac53c8857f fixup! bcachefs: Use a genradix for reading journal entries

This commit is contained in:
Kent Overstreet 2022-04-09 14:02:54 -04:00
parent 986533d8d5
commit 8b23ea867a
7 changed files with 10 additions and 11 deletions

View File

@ -1 +1 @@
6ddf061e68560a2bb263b126af7e894a6c1afb5f
ac53c8857f8bb192ed59c0b3fab853760d56918d

View File

@ -485,7 +485,7 @@ static int run_one_trans_trigger(struct btree_trans *trans, struct btree_insert_
} else if (overwrite && !i->overwrite_trigger_run) {
i->overwrite_trigger_run = true;
return bch2_trans_mark_old(trans, old, i->flags) ?: 1;
} else if (!i->insert_trigger_run) {
} else if (!overwrite && !i->insert_trigger_run) {
i->insert_trigger_run = true;
return bch2_trans_mark_new(trans, i->k, i->flags) ?: 1;
} else {

View File

@ -1682,11 +1682,14 @@ void bch2_fs_ec_exit(struct bch_fs *c)
bioset_exit(&c->ec_bioset);
}
int bch2_fs_ec_init(struct bch_fs *c)
void bch2_fs_ec_init_early(struct bch_fs *c)
{
INIT_WORK(&c->ec_stripe_create_work, ec_stripe_create_work);
INIT_WORK(&c->ec_stripe_delete_work, ec_stripe_delete_work);
}
int bch2_fs_ec_init(struct bch_fs *c)
{
return bioset_init(&c->ec_bioset, 1, offsetof(struct ec_bio, bio),
BIOSET_NEED_BVECS);
}

View File

@ -224,6 +224,7 @@ void bch2_stripes_heap_to_text(struct printbuf *, struct bch_fs *);
void bch2_new_stripes_to_text(struct printbuf *, struct bch_fs *);
void bch2_fs_ec_exit(struct bch_fs *);
void bch2_fs_ec_init_early(struct bch_fs *);
int bch2_fs_ec_init(struct bch_fs *);
#endif /* _BCACHEFS_EC_H */

View File

@ -2909,13 +2909,7 @@ reassemble:
next_pos = insert ? bkey_start_pos(&delete.k) : delete.k.p;
if (copy.k->k.size == k.k->size) {
/*
* If we're moving the entire extent, we can skip
* running triggers:
*/
trigger_flags |= BTREE_TRIGGER_NORUN;
} else {
if (copy.k->k.size != k.k->size) {
/* We might end up splitting compressed extents: */
unsigned nr_ptrs =
bch2_bkey_nr_ptrs_allocated(bkey_i_to_s_c(copy.k));

View File

@ -94,7 +94,7 @@ static int journal_entry_add(struct bch_fs *c, struct bch_dev *ca,
}
/* Drop entries we don't need anymore */
if (!JSET_NO_FLUSH(j)) {
if (!JSET_NO_FLUSH(j) && !c->opts.read_entire_journal) {
genradix_for_each(&c->journal_entries, iter, _i) {
i = *_i;

View File

@ -655,6 +655,7 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts opts)
bch2_fs_allocator_foreground_init(c);
bch2_fs_rebalance_init(c);
bch2_fs_quota_init(c);
bch2_fs_ec_init_early(c);
INIT_LIST_HEAD(&c->list);