Commit 201a4d4c authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: fix triggers for stripes btree

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent ea416023
...@@ -1107,6 +1107,15 @@ void bch2_mark_update(struct btree_trans *trans, ...@@ -1107,6 +1107,15 @@ void bch2_mark_update(struct btree_trans *trans,
if (unlikely(trans->flags & BTREE_INSERT_NOMARK_OVERWRITES)) if (unlikely(trans->flags & BTREE_INSERT_NOMARK_OVERWRITES))
return; return;
/*
* For non extents, we only mark the new key, not the key being
* overwritten - unless we're actually deleting:
*/
if ((iter->btree_id == BTREE_ID_ALLOC ||
iter->btree_id == BTREE_ID_EC) &&
!bkey_deleted(&insert->k->k))
return;
while ((_k = bch2_btree_node_iter_peek_filter(&node_iter, b, while ((_k = bch2_btree_node_iter_peek_filter(&node_iter, b,
KEY_TYPE_discard))) { KEY_TYPE_discard))) {
struct bkey unpacked; struct bkey unpacked;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment