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)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Oct 2021 19:17:16 +0000 (21:17 +0200)
commitf6f39f7a0add4e7fd120a709545b57586a1d0393
treeb4116d90a4121fa0a4ded0811fbc6162126cbf08
parent3906fe9bb7f1a2c8667ae54e967dc8690824f4ea
btrfs: rename btrfs_alloc_chunk to btrfs_create_chunk

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>
fs/btrfs/block-group.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h
fs/btrfs/zoned.c