diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-07-27 16:13:10 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-07-27 16:18:13 -0400 |
commit | ff95acb6733d41a8d45feb0e18b96df25e610e78 (patch) | |
tree | e20983c579c9095970aefa9cb176a9df0654d1e4 /fs/btrfs/ctree.h | |
parent | 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff) | |
parent | 75c195a2cac2c3c8366c0b87de2d6814c4f4d638 (diff) |
Merge branch 'integration' into for-linus
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 3b859a3e6a0e..3be57c611040 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -755,6 +755,8 @@ struct btrfs_space_info { | |||
755 | chunks for this space */ | 755 | chunks for this space */ |
756 | unsigned int chunk_alloc:1; /* set if we are allocating a chunk */ | 756 | unsigned int chunk_alloc:1; /* set if we are allocating a chunk */ |
757 | 757 | ||
758 | unsigned int flush:1; /* set if we are trying to make space */ | ||
759 | |||
758 | unsigned int force_alloc; /* set if we need to force a chunk | 760 | unsigned int force_alloc; /* set if we need to force a chunk |
759 | alloc for this space */ | 761 | alloc for this space */ |
760 | 762 | ||
@@ -764,7 +766,7 @@ struct btrfs_space_info { | |||
764 | struct list_head block_groups[BTRFS_NR_RAID_TYPES]; | 766 | struct list_head block_groups[BTRFS_NR_RAID_TYPES]; |
765 | spinlock_t lock; | 767 | spinlock_t lock; |
766 | struct rw_semaphore groups_sem; | 768 | struct rw_semaphore groups_sem; |
767 | atomic_t caching_threads; | 769 | wait_queue_head_t wait; |
768 | }; | 770 | }; |
769 | 771 | ||
770 | struct btrfs_block_rsv { | 772 | struct btrfs_block_rsv { |
@@ -824,6 +826,7 @@ struct btrfs_caching_control { | |||
824 | struct list_head list; | 826 | struct list_head list; |
825 | struct mutex mutex; | 827 | struct mutex mutex; |
826 | wait_queue_head_t wait; | 828 | wait_queue_head_t wait; |
829 | struct btrfs_work work; | ||
827 | struct btrfs_block_group_cache *block_group; | 830 | struct btrfs_block_group_cache *block_group; |
828 | u64 progress; | 831 | u64 progress; |
829 | atomic_t count; | 832 | atomic_t count; |
@@ -1032,6 +1035,8 @@ struct btrfs_fs_info { | |||
1032 | struct btrfs_workers endio_write_workers; | 1035 | struct btrfs_workers endio_write_workers; |
1033 | struct btrfs_workers endio_freespace_worker; | 1036 | struct btrfs_workers endio_freespace_worker; |
1034 | struct btrfs_workers submit_workers; | 1037 | struct btrfs_workers submit_workers; |
1038 | struct btrfs_workers caching_workers; | ||
1039 | |||
1035 | /* | 1040 | /* |
1036 | * fixup workers take dirty pages that didn't properly go through | 1041 | * fixup workers take dirty pages that didn't properly go through |
1037 | * the cow mechanism and make them safe to write. It happens | 1042 | * the cow mechanism and make them safe to write. It happens |
@@ -2128,7 +2133,7 @@ static inline bool btrfs_mixed_space_info(struct btrfs_space_info *space_info) | |||
2128 | 2133 | ||
2129 | /* extent-tree.c */ | 2134 | /* extent-tree.c */ |
2130 | static inline u64 btrfs_calc_trans_metadata_size(struct btrfs_root *root, | 2135 | static inline u64 btrfs_calc_trans_metadata_size(struct btrfs_root *root, |
2131 | int num_items) | 2136 | unsigned num_items) |
2132 | { | 2137 | { |
2133 | return (root->leafsize + root->nodesize * (BTRFS_MAX_LEVEL - 1)) * | 2138 | return (root->leafsize + root->nodesize * (BTRFS_MAX_LEVEL - 1)) * |
2134 | 3 * num_items; | 2139 | 3 * num_items; |
@@ -2222,9 +2227,6 @@ void btrfs_set_inode_space_info(struct btrfs_root *root, struct inode *ionde); | |||
2222 | void btrfs_clear_space_info_full(struct btrfs_fs_info *info); | 2227 | void btrfs_clear_space_info_full(struct btrfs_fs_info *info); |
2223 | int btrfs_check_data_free_space(struct inode *inode, u64 bytes); | 2228 | int btrfs_check_data_free_space(struct inode *inode, u64 bytes); |
2224 | void btrfs_free_reserved_data_space(struct inode *inode, u64 bytes); | 2229 | void btrfs_free_reserved_data_space(struct inode *inode, u64 bytes); |
2225 | int btrfs_trans_reserve_metadata(struct btrfs_trans_handle *trans, | ||
2226 | struct btrfs_root *root, | ||
2227 | int num_items); | ||
2228 | void btrfs_trans_release_metadata(struct btrfs_trans_handle *trans, | 2230 | void btrfs_trans_release_metadata(struct btrfs_trans_handle *trans, |
2229 | struct btrfs_root *root); | 2231 | struct btrfs_root *root); |
2230 | int btrfs_orphan_reserve_metadata(struct btrfs_trans_handle *trans, | 2232 | int btrfs_orphan_reserve_metadata(struct btrfs_trans_handle *trans, |
@@ -2330,7 +2332,7 @@ struct btrfs_path *btrfs_alloc_path(void); | |||
2330 | void btrfs_free_path(struct btrfs_path *p); | 2332 | void btrfs_free_path(struct btrfs_path *p); |
2331 | void btrfs_set_path_blocking(struct btrfs_path *p); | 2333 | void btrfs_set_path_blocking(struct btrfs_path *p); |
2332 | void btrfs_clear_path_blocking(struct btrfs_path *p, | 2334 | void btrfs_clear_path_blocking(struct btrfs_path *p, |
2333 | struct extent_buffer *held); | 2335 | struct extent_buffer *held, int held_rw); |
2334 | void btrfs_unlock_up_safe(struct btrfs_path *p, int level); | 2336 | void btrfs_unlock_up_safe(struct btrfs_path *p, int level); |
2335 | 2337 | ||
2336 | int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, | 2338 | int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, |