]> git.baikalelectronics.ru Git - kernel.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)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:45:32 +0000 (17:45 +0200)
commite415d765a1e45b32c60ee756af85ba281b49de5a
tree23209c8ca9e98df1abfa6a48afcfca15f7448b40
parentfd2722e4c96f602e684b23c7fd76a740b0b1d71d
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