diff options
author | Hunter Shaffer <huntershaffer182456@gmail.com> | 2023-09-25 00:02:56 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:15 -0400 |
commit | 3f7b9713dae09df31067c6d1d33c6eb1f617529f (patch) | |
tree | 5c91897a90624d6bc5d6e19c6731f78a44fa255c /fs/bcachefs/alloc_background.c | |
parent | 1241df5872b439ff1e5a8c70e0ce82345264904f (diff) | |
download | linux-3f7b9713dae09df31067c6d1d33c6eb1f617529f.tar.gz linux-3f7b9713dae09df31067c6d1d33c6eb1f617529f.tar.bz2 linux-3f7b9713dae09df31067c6d1d33c6eb1f617529f.zip |
bcachefs: New superblock section members_v2
members_v2 has dynamically resizable entries so that we can extend
bch_member. The members can no longer be accessed with simple array
indexing Instead members_v2_get is used to find a member's exact
location within the array and returns a copy of that member.
Alternatively member_v2_get_mut retrieves a mutable point to a member.
Signed-off-by: Hunter Shaffer <huntershaffer182456@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r-- | fs/bcachefs/alloc_background.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index 19ef7a444c23..4059d3d4b7f5 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -1922,7 +1922,7 @@ bkey_err: } mutex_lock(&c->sb_lock); - m = bch2_sb_get_members(c->disk_sb.sb)->members + ca->dev_idx; + m = bch2_members_v2_get_mut(c->disk_sb.sb, ca->dev_idx); SET_BCH_MEMBER_FREESPACE_INITIALIZED(m, true); mutex_unlock(&c->sb_lock); |