]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5097bbf580396ae8e0d7c1c95b0abecd7eafc8f4
treeb4116d90a4121fa0a4ded0811fbc6162126cbf08
parent89b1f0ccd6cc69dfe4a0958e362b5d1b78e1a43d
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