summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/bset.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-03-26 21:39:54 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2024-04-01 02:36:11 +0200
commit812a9297936a959c98a2e9e44a9a622bbe30b162 (patch)
treef1677eb0bcbc08fe0c2aab2fe05c0514a323b463 /fs/bcachefs/bset.h
parentbcachefs: Check btree ptr min_key in .invalid (diff)
downloadlinux-812a9297936a959c98a2e9e44a9a622bbe30b162.tar.xz
linux-812a9297936a959c98a2e9e44a9a622bbe30b162.zip
bcachefs: Fix btree node keys accounting in topology repair path
When dropping keys now outside a now because we're changing the node min/max, we need to redo the node's accounting as well. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bset.h')
-rw-r--r--fs/bcachefs/bset.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/bset.h b/fs/bcachefs/bset.h
index 79c77baaa383..120a79fd456b 100644
--- a/fs/bcachefs/bset.h
+++ b/fs/bcachefs/bset.h
@@ -458,6 +458,8 @@ struct bkey_s_c bch2_btree_node_iter_peek_unpack(struct btree_node_iter *,
/* Accounting: */
+struct btree_nr_keys bch2_btree_node_count_keys(struct btree *);
+
static inline void btree_keys_account_key(struct btree_nr_keys *n,
unsigned bset,
struct bkey_packed *k,