aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/free-space-cache.h
diff options
context:
space:
mode:
authorChris Mason <clm@fb.com>2015-04-04 20:14:42 -0400
committerChris Mason <clm@fb.com>2015-04-10 17:07:11 -0400
commitc9dc4c6578502c2085705347375b82089aad18d0 (patch)
tree2d6264a45e412e612dba1357cf6754dc680c2fd4 /fs/btrfs/free-space-cache.h
parent4c6d1d85ad89fd8e32dc9204b7f944854399bda9 (diff)
Btrfs: two stage dirty block group writeout
Block group cache writeout is currently waiting on the pages for each block group cache before moving on to writing the next one. This commit switches things around to send down all the caches and then wait on them in batches. The end result is much faster, since we're keeping the disk pipeline full. Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/free-space-cache.h')
-rw-r--r--fs/btrfs/free-space-cache.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h
index 88b2238a0aed..c4339863af05 100644
--- a/fs/btrfs/free-space-cache.h
+++ b/fs/btrfs/free-space-cache.h
@@ -48,6 +48,8 @@ struct btrfs_free_space_op {
48 struct btrfs_free_space *info); 48 struct btrfs_free_space *info);
49}; 49};
50 50
51struct btrfs_io_ctl;
52
51struct inode *lookup_free_space_inode(struct btrfs_root *root, 53struct inode *lookup_free_space_inode(struct btrfs_root *root,
52 struct btrfs_block_group_cache 54 struct btrfs_block_group_cache
53 *block_group, struct btrfs_path *path); 55 *block_group, struct btrfs_path *path);
@@ -63,11 +65,15 @@ int btrfs_truncate_free_space_cache(struct btrfs_root *root,
63 struct inode *inode); 65 struct inode *inode);
64int load_free_space_cache(struct btrfs_fs_info *fs_info, 66int load_free_space_cache(struct btrfs_fs_info *fs_info,
65 struct btrfs_block_group_cache *block_group); 67 struct btrfs_block_group_cache *block_group);
68int btrfs_wait_cache_io(struct btrfs_root *root,
69 struct btrfs_trans_handle *trans,
70 struct btrfs_block_group_cache *block_group,
71 struct btrfs_io_ctl *io_ctl,
72 struct btrfs_path *path, u64 offset);
66int btrfs_write_out_cache(struct btrfs_root *root, 73int btrfs_write_out_cache(struct btrfs_root *root,
67 struct btrfs_trans_handle *trans, 74 struct btrfs_trans_handle *trans,
68 struct btrfs_block_group_cache *block_group, 75 struct btrfs_block_group_cache *block_group,
69 struct btrfs_path *path); 76 struct btrfs_path *path);
70
71struct inode *lookup_free_ino_inode(struct btrfs_root *root, 77struct inode *lookup_free_ino_inode(struct btrfs_root *root,
72 struct btrfs_path *path); 78 struct btrfs_path *path);
73int create_free_ino_inode(struct btrfs_root *root, 79int create_free_ino_inode(struct btrfs_root *root,