btrfs: rename btrfs_alloc_chunk to btrfs_create_chunk
authorNikolay Borisov <nborisov@suse.com>
Wed, 18 Aug 2021 10:41:19 +0000 (13:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jul 2022 14:34:50 +0000 (16:34 +0200)
commitbb5c247155016f0d94e0fcb318790c8c4a3e624f
tree74379e94d90682f143394db3ed6224dfda23130f
parentc1784d2075138992b00c17ab4ffc6d855171fe6d
btrfs: rename btrfs_alloc_chunk to btrfs_create_chunk

[ Upstream commit f6f39f7a0add4e7fd120a709545b57586a1d0393 ]

The user facing function used to allocate new chunks is
btrfs_chunk_alloc, unfortunately there is yet another similar sounding
function - btrfs_alloc_chunk. This creates confusion, especially since
the latter function can be considered "private" in the sense that it
implements the first stage of chunk creation and as such is called by
btrfs_chunk_alloc.

To avoid the awkwardness that comes with having similarly named but
distinctly different in their purpose function rename btrfs_alloc_chunk
to btrfs_create_chunk, given that the main purpose of this function is
to orchestrate the whole process of allocating a chunk - reserving space
into devices, deciding on characteristics of the stripe size and
creating the in-memory structures.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/block-group.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h
fs/btrfs/zoned.c