]> git.ipfire.org Git - people/ms/linux.git/commit - fs/btrfs/block-group.c
btrfs: make btrfs_finish_chunk_alloc private to block-group.c
authorNikolay Borisov <nborisov@suse.com>
Mon, 5 Jul 2021 09:29:19 +0000 (12:29 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:18:59 +0000 (13:18 +0200)
commit2eadb9e75e8e65eaf3e17628e24798a3c5374f90
tree15ad0864b5165f45224ddf016597175cb8d6810d
parent4a9531cf89d29de82ef157513e593e58f49ef8f4
btrfs: make btrfs_finish_chunk_alloc private to block-group.c

One of the final things that must be done to add a new chunk is
inserting its device extent items in the device tree. They describe
the portion of allocated device physical space during phase 1 of
chunk allocation. This is currently done in btrfs_finish_chunk_alloc
whose name isn't very informative. What's more, this function is only
used in block-group.c but is defined as public. There isn't anything
special about it that would warrant it being defined in volumes.c.

Just move btrfs_finish_chunk_alloc and alloc_chunk_dev_extent to
block-group.c, make the former static and rename both functions to
insert_dev_extents and insert_dev_extent respectively.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h