bcachefs: btree_id_cached()

Add a new helper that returns true if the given btree ID uses the btree
key cache. This enables some new cleanups, since the helper can check
the options for whether caching is enabled on a given btree.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet 2022-01-12 02:13:21 -05:00 • committed by Kent Overstreet
commit 7c8f6f980d
6 changed files with 21 additions and 13 deletions