]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: store chunk size in space-info struct
authorStefan Roesch <shr@fb.com>
Tue, 8 Feb 2022 19:31:20 +0000 (11:31 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:42:26 +0000 (14:42 +0200)
commitd493e1a037d03330d3186ecd4f596d21115b701f
treeb86edab10ce465a31ef097ba9adfd7e0576f5ab3
parent9c8c62cccf748ff059a7586b01779841effff204
btrfs: store chunk size in space-info struct

[ Upstream commit f6fca3917b4d99d8c13901738afec35f570a3c2f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/space-info.c
fs/btrfs/space-info.h
fs/btrfs/volumes.c