diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-30 08:11:15 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 17:47:39 +0100 |
commit | 0f64a6daaa4852db735a2df754b37d187f5480d1 (patch) | |
tree | d2807cab110509aee25f9326d49cf0b74d847947 /fs/bcachefs/backpointers.c | |
parent | bcachefs: remove redundant condition from data_update_index_update (diff) | |
download | linux-0f64a6daaa4852db735a2df754b37d187f5480d1.tar.xz linux-0f64a6daaa4852db735a2df754b37d187f5480d1.zip |
bcachefs: On missing backpointer to interior node, flush interior updates
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/backpointers.c')
-rw-r--r-- | fs/bcachefs/backpointers.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/backpointers.c b/fs/bcachefs/backpointers.c index 2fb96fa99f42..eb826457ff6b 100644 --- a/fs/bcachefs/backpointers.c +++ b/fs/bcachefs/backpointers.c @@ -441,6 +441,11 @@ static int check_bp_exists(struct btree_trans *trans, memcmp(bkey_s_c_to_backpointer(bp_k).v, &bp, sizeof(bp))) { if (last_flushed->level != bp.level || !bpos_eq(last_flushed->pos, orig_k.k->p)) { + if (bp.level) { + bch2_trans_unlock(trans); + bch2_btree_interior_updates_flush(c); + } + ret = bch2_btree_write_buffer_flush_sync(trans); if (ret) goto err; |