bcachefs: don't use rht_bucket() in btree_key_cache_scan()
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 19 Aug 2024 20:41:00 +0000 (16:41 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 22 Aug 2024 14:04:41 +0000 (10:04 -0400)
commita592cdf5164d3feb821085df71f63e70e8b8b08c
treec60d3ba5de6e4ac22a18910d29405b6dda6e1814
parent3e878fe5a0b139838a65f50a3df3caf3299dbc24
bcachefs: don't use rht_bucket() in btree_key_cache_scan()

rht_bucket() does strange complicated things when a rehash is in
progress.

Instead, just skip scanning when a rehash is in progress: scanning is
going to be more expensive (many more empty slots to cover), and some
sort of infinite loop is being observed

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