diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-02-20 05:41:40 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:08:55 +0200 |
commit | c052cf82f3d66ad5b680003cfacf67cbe0e9b1bb (patch) | |
tree | 91d55c6ad8ac7e45df5c31e1e591883a973b4aa7 /fs/bcachefs/bset.c | |
parent | bcachefs: Kill support for !BTREE_NODE_NEW_EXTENT_OVERWRITE() (diff) | |
download | linux-c052cf82f3d66ad5b680003cfacf67cbe0e9b1bb.tar.xz linux-c052cf82f3d66ad5b680003cfacf67cbe0e9b1bb.zip |
bcachefs: KEY_TYPE_discard is no longer used
KEY_TYPE_discard used to be used for extent whiteouts, but when handling
over overlapping extents was lifted above the core btree code it became
unused. This patch updates various code to reflect that.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bset.c')
-rw-r--r-- | fs/bcachefs/bset.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/bcachefs/bset.c b/fs/bcachefs/bset.c index 89d511db2c50..ac2fd8242ca4 100644 --- a/fs/bcachefs/bset.c +++ b/fs/bcachefs/bset.c @@ -132,7 +132,7 @@ void __bch2_verify_btree_nr_keys(struct btree *b) for_each_bset(b, t) bset_tree_for_each_key(b, t, k) - if (!bkey_whiteout(k)) + if (!bkey_deleted(k)) btree_keys_account_key_add(&nr, t - b->set, k); BUG_ON(memcmp(&nr, &b->nr, sizeof(nr))); @@ -1108,7 +1108,7 @@ void bch2_bset_insert(struct btree *b, if (bch2_bkey_pack_key(&packed, &insert->k, f)) src = &packed; - if (!bkey_whiteout(&insert->k)) + if (!bkey_deleted(&insert->k)) btree_keys_account_key_add(&b->nr, t - b->set, src); if (src->u64s != clobber_u64s) { @@ -1645,15 +1645,14 @@ found: return prev; } -struct bkey_packed *bch2_btree_node_iter_prev_filter(struct btree_node_iter *iter, - struct btree *b, - unsigned min_key_type) +struct bkey_packed *bch2_btree_node_iter_prev(struct btree_node_iter *iter, + struct btree *b) { struct bkey_packed *prev; do { prev = bch2_btree_node_iter_prev_all(iter, b); - } while (prev && prev->type < min_key_type); + } while (prev && bkey_deleted(prev)); return prev; } |