162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci 362306a36Sopenharmony_ci#ifndef BTRFS_DELALLOC_SPACE_H 462306a36Sopenharmony_ci#define BTRFS_DELALLOC_SPACE_H 562306a36Sopenharmony_ci 662306a36Sopenharmony_cistruct extent_changeset; 762306a36Sopenharmony_ci 862306a36Sopenharmony_ciint btrfs_alloc_data_chunk_ondemand(struct btrfs_inode *inode, u64 bytes); 962306a36Sopenharmony_ciint btrfs_check_data_free_space(struct btrfs_inode *inode, 1062306a36Sopenharmony_ci struct extent_changeset **reserved, u64 start, u64 len, 1162306a36Sopenharmony_ci bool noflush); 1262306a36Sopenharmony_civoid btrfs_free_reserved_data_space(struct btrfs_inode *inode, 1362306a36Sopenharmony_ci struct extent_changeset *reserved, u64 start, u64 len); 1462306a36Sopenharmony_civoid btrfs_delalloc_release_space(struct btrfs_inode *inode, 1562306a36Sopenharmony_ci struct extent_changeset *reserved, 1662306a36Sopenharmony_ci u64 start, u64 len, bool qgroup_free); 1762306a36Sopenharmony_civoid btrfs_free_reserved_data_space_noquota(struct btrfs_fs_info *fs_info, 1862306a36Sopenharmony_ci u64 len); 1962306a36Sopenharmony_civoid btrfs_delalloc_release_metadata(struct btrfs_inode *inode, u64 num_bytes, 2062306a36Sopenharmony_ci bool qgroup_free); 2162306a36Sopenharmony_ciint btrfs_delalloc_reserve_space(struct btrfs_inode *inode, 2262306a36Sopenharmony_ci struct extent_changeset **reserved, u64 start, u64 len); 2362306a36Sopenharmony_ciint btrfs_delalloc_reserve_metadata(struct btrfs_inode *inode, u64 num_bytes, 2462306a36Sopenharmony_ci u64 disk_num_bytes, bool noflush); 2562306a36Sopenharmony_civoid btrfs_delalloc_release_extents(struct btrfs_inode *inode, u64 num_bytes); 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci#endif /* BTRFS_DELALLOC_SPACE_H */ 28