aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h18
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
1031struct btrfs_block_rsv { 1039struct 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);
2875void btrfs_delalloc_release_metadata(struct inode *inode, u64 num_bytes); 2884void btrfs_delalloc_release_metadata(struct inode *inode, u64 num_bytes);
2876int btrfs_delalloc_reserve_space(struct inode *inode, u64 num_bytes); 2885int btrfs_delalloc_reserve_space(struct inode *inode, u64 num_bytes);
2877void btrfs_delalloc_release_space(struct inode *inode, u64 num_bytes); 2886void btrfs_delalloc_release_space(struct inode *inode, u64 num_bytes);
2878void btrfs_init_block_rsv(struct btrfs_block_rsv *rsv); 2887void btrfs_init_block_rsv(struct btrfs_block_rsv *rsv, unsigned short type);
2879struct btrfs_block_rsv *btrfs_alloc_block_rsv(struct btrfs_root *root); 2888struct btrfs_block_rsv *btrfs_alloc_block_rsv(struct btrfs_root *root,
2889 unsigned short type);
2880void btrfs_free_block_rsv(struct btrfs_root *root, 2890void btrfs_free_block_rsv(struct btrfs_root *root,
2881 struct btrfs_block_rsv *rsv); 2891 struct btrfs_block_rsv *rsv);
2882int btrfs_block_rsv_add(struct btrfs_root *root, 2892int btrfs_block_rsv_add(struct btrfs_root *root,