btrfs: store chunk size in space-info struct
authorStefan Roesch <shr@fb.com>
Tue, 8 Feb 2022 19:31:20 +0000 (11:31 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:45:32 +0000 (17:45 +0200)
commitf6fca3917b4d99d8c13901738afec35f570a3c2f
tree23209c8ca9e98df1abfa6a48afcfca15f7448b40
parent71b68e9e35827a3f0ba3742cd1b10c1fceea55d7
btrfs: store chunk size in space-info struct

The chunk size is stored in the btrfs_space_info structure.  It is
initialized at the start and is then used.

A new API is added to update the current chunk size.  This API is used
to be able to expose the chunk_size as a sysfs setting.

Signed-off-by: Stefan Roesch <shr@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ rename and merge helpers, switch atomic type to u64, style fixes ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/space-info.c
fs/btrfs/space-info.h
fs/btrfs/volumes.c