mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
46d4dac888
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>
24 lines
916 B
C
24 lines
916 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef BTRFS_DELALLOC_SPACE_H
|
|
#define BTRFS_DELALLOC_SPACE_H
|
|
|
|
struct extent_changeset;
|
|
|
|
int btrfs_alloc_data_chunk_ondemand(struct btrfs_inode *inode, u64 bytes);
|
|
int btrfs_check_data_free_space(struct inode *inode,
|
|
struct extent_changeset **reserved, u64 start, u64 len);
|
|
void btrfs_free_reserved_data_space(struct inode *inode,
|
|
struct extent_changeset *reserved, u64 start, u64 len);
|
|
void btrfs_delalloc_release_space(struct inode *inode,
|
|
struct extent_changeset *reserved,
|
|
u64 start, u64 len, bool qgroup_free);
|
|
void btrfs_free_reserved_data_space_noquota(struct inode *inode,
|
|
u64 len);
|
|
void btrfs_delalloc_release_metadata(struct btrfs_inode *inode, u64 num_bytes,
|
|
bool qgroup_free);
|
|
int btrfs_delalloc_reserve_space(struct inode *inode,
|
|
struct extent_changeset **reserved, u64 start, u64 len);
|
|
|
|
#endif /* BTRFS_DELALLOC_SPACE_H */
|