diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-04-17 15:49:45 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:20 -0400 |
commit | 201a4d4cbed532c73d83ea9ea8166f40e9faa1e1 (patch) | |
tree | f1428e32f3883f66e489e64e79c74006f89f5c07 /fs | |
parent | ea4160234487ac7baefb919747691a21d2face4a (diff) |
bcachefs: fix triggers for stripes btree
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/buckets.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c index 7a05ba5fd589..e9c5889b2c0f 100644 --- a/fs/bcachefs/buckets.c +++ b/fs/bcachefs/buckets.c @@ -1107,6 +1107,15 @@ void bch2_mark_update(struct btree_trans *trans, if (unlikely(trans->flags & BTREE_INSERT_NOMARK_OVERWRITES)) 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, KEY_TYPE_discard))) { struct bkey unpacked; |