]> git.ipfire.org Git - thirdparty/linux.git/commit - fs/btrfs/block-group.c
btrfs: update documentation for add_new_free_space()
authorFilipe Manana <fdmanana@suse.com>
Fri, 30 Jun 2023 15:03:45 +0000 (16:03 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Aug 2023 12:52:12 +0000 (14:52 +0200)
commit28f60894902ea40ed9a74cbbfbe812b979d9aa66
tree470a60a58163d8afb3edc03417d820eba38bc95b
parentdbb6ecb328cb5f974ff0a04ad31af332be5a122f
btrfs: update documentation for add_new_free_space()

The documentation for add_new_free_space() is stale and no longer correct:

1) It's no longer used only when caching a block group. It's also called
   when creating a block group (btrfs_make_block_group()), when reading
   a block group at mount time (read_one_block_group()) and when reading
   the free space tree for a block group (typically the first time we
   attempt to allocate from the block group);

2) It has nothing to do with pinned extents. It only deals with the
   excluded extents io tree, which is used to track the locations of
   super blocks in order to make sure we never add the location of a
   super block to the free space cache of a block group.

So update the documention and also add a description of the arguments
and return values.

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