xref: /OK3568_Linux_fs/kernel/fs/btrfs/delalloc-space.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun 
3*4882a593Smuzhiyun #ifndef BTRFS_DELALLOC_SPACE_H
4*4882a593Smuzhiyun #define BTRFS_DELALLOC_SPACE_H
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun struct extent_changeset;
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun int btrfs_alloc_data_chunk_ondemand(struct btrfs_inode *inode, u64 bytes);
9*4882a593Smuzhiyun int btrfs_check_data_free_space(struct btrfs_inode *inode,
10*4882a593Smuzhiyun 			struct extent_changeset **reserved, u64 start, u64 len);
11*4882a593Smuzhiyun void btrfs_free_reserved_data_space(struct btrfs_inode *inode,
12*4882a593Smuzhiyun 			struct extent_changeset *reserved, u64 start, u64 len);
13*4882a593Smuzhiyun void btrfs_delalloc_release_space(struct btrfs_inode *inode,
14*4882a593Smuzhiyun 				  struct extent_changeset *reserved,
15*4882a593Smuzhiyun 				  u64 start, u64 len, bool qgroup_free);
16*4882a593Smuzhiyun void btrfs_free_reserved_data_space_noquota(struct btrfs_fs_info *fs_info,
17*4882a593Smuzhiyun 					    u64 len);
18*4882a593Smuzhiyun void btrfs_delalloc_release_metadata(struct btrfs_inode *inode, u64 num_bytes,
19*4882a593Smuzhiyun 				     bool qgroup_free);
20*4882a593Smuzhiyun int btrfs_delalloc_reserve_space(struct btrfs_inode *inode,
21*4882a593Smuzhiyun 			struct extent_changeset **reserved, u64 start, u64 len);
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun #endif /* BTRFS_DELALLOC_SPACE_H */
24