bcachefs: Change bch2_btree_key_cache_count() to exclude dirty keys
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 27 Apr 2021 18:02:00 +0000 (14:02 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:02 +0000 (17:09 -0400)
commitbaa6502905df0acb94afbf6c93f51a1f2aa4c7ca
tree083b06b2a86cbc6576abe4fff28684538af239af
parentd99af4f194d7af8aa11233707826875ef0704034
bcachefs: Change bch2_btree_key_cache_count() to exclude dirty keys

We're seeing livelocks that appear to be due to
bch2_btree_key_cache_scan repeatedly scanning and blocking other tasks
from using the key cache lock - we probably shouldn't be reporting
objects that can't actually be freed yet.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_key_cache.c