mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
bcachefs: Don't do extent merging before journal replay is finished
We don't normally do extent updates this early in recovery, but some of the repair paths have to and when we do, we don't want to do anything that requires the snapshots table. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
ec9cc18fc2
commit
57339b24a0
@ -38,6 +38,9 @@ static noinline int extent_front_merge(struct btree_trans *trans,
|
||||
struct bkey_i *update;
|
||||
int ret;
|
||||
|
||||
if (unlikely(trans->journal_replay_not_finished))
|
||||
return 0;
|
||||
|
||||
update = bch2_bkey_make_mut_noupdate(trans, k);
|
||||
ret = PTR_ERR_OR_ZERO(update);
|
||||
if (ret)
|
||||
@ -69,6 +72,9 @@ static noinline int extent_back_merge(struct btree_trans *trans,
|
||||
struct bch_fs *c = trans->c;
|
||||
int ret;
|
||||
|
||||
if (unlikely(trans->journal_replay_not_finished))
|
||||
return 0;
|
||||
|
||||
ret = bch2_key_has_snapshot_overwrites(trans, iter->btree_id, insert->k.p) ?:
|
||||
bch2_key_has_snapshot_overwrites(trans, iter->btree_id, k.k->p);
|
||||
if (ret < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user