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.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 8f4b81de3ae2..11a103db2866 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -105,6 +105,12 @@ struct btrfs_ordered_sum;
105/* For storing free space cache */ 105/* For storing free space cache */
106#define BTRFS_FREE_SPACE_OBJECTID -11ULL 106#define BTRFS_FREE_SPACE_OBJECTID -11ULL
107 107
108/*
109 * The inode number assigned to the special inode for sotring
110 * free ino cache
111 */
112#define BTRFS_FREE_INO_OBJECTID -12ULL
113
108/* dummy objectid represents multiple objectids */ 114/* dummy objectid represents multiple objectids */
109#define BTRFS_MULTIPLE_OBJECTIDS -255ULL 115#define BTRFS_MULTIPLE_OBJECTIDS -255ULL
110 116
@@ -830,9 +836,6 @@ struct btrfs_block_group_cache {
830 u64 bytes_super; 836 u64 bytes_super;
831 u64 flags; 837 u64 flags;
832 u64 sectorsize; 838 u64 sectorsize;
833 int extents_thresh;
834 int free_extents;
835 int total_bitmaps;
836 unsigned int ro:1; 839 unsigned int ro:1;
837 unsigned int dirty:1; 840 unsigned int dirty:1;
838 unsigned int iref:1; 841 unsigned int iref:1;
@@ -847,9 +850,7 @@ struct btrfs_block_group_cache {
847 struct btrfs_space_info *space_info; 850 struct btrfs_space_info *space_info;
848 851
849 /* free space cache stuff */ 852 /* free space cache stuff */
850 spinlock_t tree_lock; 853 struct btrfs_free_space_ctl *free_space_ctl;
851 struct rb_root free_space_offset;
852 u64 free_space;
853 854
854 /* block group cache stuff */ 855 /* block group cache stuff */
855 struct rb_node cache_node; 856 struct rb_node cache_node;
@@ -1107,6 +1108,16 @@ struct btrfs_root {
1107 spinlock_t accounting_lock; 1108 spinlock_t accounting_lock;
1108 struct btrfs_block_rsv *block_rsv; 1109 struct btrfs_block_rsv *block_rsv;
1109 1110
1111 /* free ino cache stuff */
1112 struct mutex fs_commit_mutex;
1113 struct btrfs_free_space_ctl *free_ino_ctl;
1114 enum btrfs_caching_type cached;
1115 spinlock_t cache_lock;
1116 wait_queue_head_t cache_wait;
1117 struct btrfs_free_space_ctl *free_ino_pinned;
1118 u64 cache_progress;
1119 struct inode *cache_inode;
1120
1110 struct mutex log_mutex; 1121 struct mutex log_mutex;
1111 wait_queue_head_t log_writer_wait; 1122 wait_queue_head_t log_writer_wait;
1112 wait_queue_head_t log_commit_wait[2]; 1123 wait_queue_head_t log_commit_wait[2];
@@ -2413,12 +2424,6 @@ int btrfs_del_orphan_item(struct btrfs_trans_handle *trans,
2413 struct btrfs_root *root, u64 offset); 2424 struct btrfs_root *root, u64 offset);
2414int btrfs_find_orphan_item(struct btrfs_root *root, u64 offset); 2425int btrfs_find_orphan_item(struct btrfs_root *root, u64 offset);
2415 2426
2416/* inode-map.c */
2417int btrfs_find_free_objectid(struct btrfs_trans_handle *trans,
2418 struct btrfs_root *fs_root,
2419 u64 dirid, u64 *objectid);
2420int btrfs_find_highest_inode(struct btrfs_root *fs_root, u64 *objectid);
2421
2422/* inode-item.c */ 2427/* inode-item.c */
2423int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans, 2428int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans,
2424 struct btrfs_root *root, 2429 struct btrfs_root *root,