bcachefs: Refactor open_bucket code
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 26 Dec 2021 02:21:46 +0000 (21:21 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:20 +0000 (17:09 -0400)
commitabe19d458e8fffbebacaad3aad64604d2819913a
tree7fe90d8c2fd6044ec794c556654c0fe0c3404c71
parent57af63b286a532f425e425c0684eda6fb5f7c284
bcachefs: Refactor open_bucket code

Prep work for adding a hash table of open buckets - instead of embedding
a bch_extent_ptr, we need to refer to the bucket directly so that we're
not calling sector_to_bucket() in the hash table lookup code, which has
an expensive divide.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_background.h
fs/bcachefs/alloc_foreground.c
fs/bcachefs/alloc_foreground.h
fs/bcachefs/alloc_types.h
fs/bcachefs/ec.c
fs/bcachefs/journal.c
fs/bcachefs/sysfs.c