]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: remove the start argument from btrfs_free_reserved_data_space_noquota()
authorFilipe Manana <fdmanana@suse.com>
Tue, 9 Jun 2020 10:19:33 +0000 (11:19 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:21 +0000 (12:55 +0200)
commitbe5af4aff74d2d1d6d5f6ac66b38593038fc6932
tree243dce5cf88ca2fd4ef856855f46c63f523e618c
parentcc489abcad840c29fcb1ab8ab4464c1a1cc0dec2
btrfs: remove the start argument from btrfs_free_reserved_data_space_noquota()

The start argument for btrfs_free_reserved_data_space_noquota() is only
used to make sure the amount of bytes we decrement from the bytes_may_use
counter of the data space_info object is aligned to the filesystem's
sector size. It serves no other purpose.

All its current callers always pass a length argument that is already
aligned to the sector size, so we can make the start argument go away.
In fact its presence makes it impossible to use it in a context where we
just want to free a number of bytes for a range for which either we do
not know its start offset or for freeing multiple ranges at once (which
are not contiguous).

This change is preparatory work for a patch (third patch in this series)
that makes relocation of data block groups that are not full reserve less
data space.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
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/delalloc-space.c
fs/btrfs/delalloc-space.h
fs/btrfs/inode.c