diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-07-06 17:02:37 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:42 -0400 |
commit | 697e45b230d5523c5c119b1e6a868632def24451 (patch) | |
tree | 352c699ef7bf7e2a0b2d6eaafcc008e0256c2106 /fs/bcachefs/recovery.c | |
parent | fff899b1d90089a3c77a20dbe48bd44a00161a6b (diff) | |
download | lwn-697e45b230d5523c5c119b1e6a868632def24451.tar.gz lwn-697e45b230d5523c5c119b1e6a868632def24451.zip |
bcachefs: Kill BTREE_TRIGGER_NOOVERWRITES
This is prep work for reworking the triggers machinery - we have
triggers that need to know both the old and the new key.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r-- | fs/bcachefs/recovery.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index 41b864dcdc39..1695a609ecd9 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -442,11 +442,18 @@ retry: * regular keys */ __bch2_btree_iter_set_pos(split_iter, split->k.p, false); - bch2_trans_update(&trans, split_iter, split, !remark - ? BTREE_TRIGGER_NORUN - : BTREE_TRIGGER_NOOVERWRITES); + bch2_trans_update(&trans, split_iter, split, + BTREE_TRIGGER_NORUN); bch2_btree_iter_set_pos(iter, split->k.p); + + if (remark) { + ret = bch2_trans_mark_key(&trans, bkey_i_to_s_c(split), + 0, split->k.size, + BTREE_TRIGGER_INSERT); + if (ret) + goto err; + } } while (bkey_cmp(iter->pos, k->k.p) < 0); if (remark) { |