diff options
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index b7cd3adb5a58..2990a7ea6248 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -1028,13 +1028,22 @@ struct btrfs_space_info { | |||
1028 | wait_queue_head_t wait; | 1028 | wait_queue_head_t wait; |
1029 | }; | 1029 | }; |
1030 | 1030 | ||
1031 | #define BTRFS_BLOCK_RSV_GLOBAL 1 | ||
1032 | #define BTRFS_BLOCK_RSV_DELALLOC 2 | ||
1033 | #define BTRFS_BLOCK_RSV_TRANS 3 | ||
1034 | #define BTRFS_BLOCK_RSV_CHUNK 4 | ||
1035 | #define BTRFS_BLOCK_RSV_DELOPS 5 | ||
1036 | #define BTRFS_BLOCK_RSV_EMPTY 6 | ||
1037 | #define BTRFS_BLOCK_RSV_TEMP 7 | ||
1038 | |||
1031 | struct btrfs_block_rsv { | 1039 | struct btrfs_block_rsv { |
1032 | u64 size; | 1040 | u64 size; |
1033 | u64 reserved; | 1041 | u64 reserved; |
1034 | struct btrfs_space_info *space_info; | 1042 | struct btrfs_space_info *space_info; |
1035 | spinlock_t lock; | 1043 | spinlock_t lock; |
1036 | unsigned int full; | 1044 | unsigned short full; |
1037 | unsigned int failfast; | 1045 | unsigned short type; |
1046 | unsigned short failfast; | ||
1038 | }; | 1047 | }; |
1039 | 1048 | ||
1040 | /* | 1049 | /* |
@@ -2875,8 +2884,9 @@ int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes); | |||
2875 | void btrfs_delalloc_release_metadata(struct inode *inode, u64 num_bytes); | 2884 | void btrfs_delalloc_release_metadata(struct inode *inode, u64 num_bytes); |
2876 | int btrfs_delalloc_reserve_space(struct inode *inode, u64 num_bytes); | 2885 | int btrfs_delalloc_reserve_space(struct inode *inode, u64 num_bytes); |
2877 | void btrfs_delalloc_release_space(struct inode *inode, u64 num_bytes); | 2886 | void btrfs_delalloc_release_space(struct inode *inode, u64 num_bytes); |
2878 | void btrfs_init_block_rsv(struct btrfs_block_rsv *rsv); | 2887 | void btrfs_init_block_rsv(struct btrfs_block_rsv *rsv, unsigned short type); |
2879 | struct btrfs_block_rsv *btrfs_alloc_block_rsv(struct btrfs_root *root); | 2888 | struct btrfs_block_rsv *btrfs_alloc_block_rsv(struct btrfs_root *root, |
2889 | unsigned short type); | ||
2880 | void btrfs_free_block_rsv(struct btrfs_root *root, | 2890 | void btrfs_free_block_rsv(struct btrfs_root *root, |
2881 | struct btrfs_block_rsv *rsv); | 2891 | struct btrfs_block_rsv *rsv); |
2882 | int btrfs_block_rsv_add(struct btrfs_root *root, | 2892 | int btrfs_block_rsv_add(struct btrfs_root *root, |