2019-06-19 15:12:00 -04:00
/* SPDX-License-Identifier: GPL-2.0 */
# ifndef BTRFS_DELALLOC_SPACE_H
# define BTRFS_DELALLOC_SPACE_H
2024-01-27 00:53:06 +01:00
# include <linux/types.h>
2019-06-19 15:12:00 -04:00
struct extent_changeset ;
2024-01-27 00:53:06 +01:00
struct btrfs_inode ;
struct btrfs_fs_info ;
2019-06-19 15:12:00 -04:00
2024-05-30 19:14:12 +02:00
int btrfs_alloc_data_chunk_ondemand ( const struct btrfs_inode * inode , u64 bytes ) ;
2020-06-03 08:55:41 +03:00
int btrfs_check_data_free_space ( struct btrfs_inode * inode ,
2022-09-12 12:27:44 -07:00
struct extent_changeset * * reserved , u64 start , u64 len ,
bool noflush ) ;
2020-06-03 08:55:39 +03:00
void btrfs_free_reserved_data_space ( struct btrfs_inode * inode ,
2019-06-19 15:12:00 -04:00
struct extent_changeset * reserved , u64 start , u64 len ) ;
2020-06-03 08:55:40 +03:00
void btrfs_delalloc_release_space ( struct btrfs_inode * inode ,
2019-06-19 15:12:00 -04:00
struct extent_changeset * reserved ,
u64 start , u64 len , bool qgroup_free ) ;
2020-06-03 08:55:38 +03:00
void btrfs_free_reserved_data_space_noquota ( struct btrfs_fs_info * fs_info ,
2019-06-19 15:12:00 -04:00
u64 len ) ;
void btrfs_delalloc_release_metadata ( struct btrfs_inode * inode , u64 num_bytes ,
bool qgroup_free ) ;
2020-06-03 08:55:42 +03:00
int btrfs_delalloc_reserve_space ( struct btrfs_inode * inode ,
2019-06-19 15:12:00 -04:00
struct extent_changeset * * reserved , u64 start , u64 len ) ;
2022-10-24 14:46:58 -04:00
int btrfs_delalloc_reserve_metadata ( struct btrfs_inode * inode , u64 num_bytes ,
u64 disk_num_bytes , bool noflush ) ;
void btrfs_delalloc_release_extents ( struct btrfs_inode * inode , u64 num_bytes ) ;
2019-06-19 15:12:00 -04:00
# endif /* BTRFS_DELALLOC_SPACE_H */