diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-11 21:18:35 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-08 17:29:19 -0400 |
commit | d155272b6e58a4b372982de777fde7dc503a8f96 (patch) | |
tree | 2e32624104d4a2ef2762406c01c2bc5402638bec /fs/bcachefs/sb-members.h | |
parent | 923ed0ae5ebd0bb0dbc64a88348fa1835a3644ee (diff) |
bcachefs: bucket_valid()
cut out a branch from doing it the obvious way
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sb-members.h')
-rw-r--r-- | fs/bcachefs/sb-members.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/sb-members.h b/fs/bcachefs/sb-members.h index 5bf27d30ca29..fa55b9666241 100644 --- a/fs/bcachefs/sb-members.h +++ b/fs/bcachefs/sb-members.h @@ -210,6 +210,8 @@ static inline struct bch_member_cpu bch2_mi_to_cpu(struct bch_member *mi) { return (struct bch_member_cpu) { .nbuckets = le64_to_cpu(mi->nbuckets), + .nbuckets_minus_first = le64_to_cpu(mi->nbuckets) - + le16_to_cpu(mi->first_bucket), .first_bucket = le16_to_cpu(mi->first_bucket), .bucket_size = le16_to_cpu(mi->bucket_size), .group = BCH_MEMBER_GROUP(mi), |