summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason2015-04-05 02:14:42 +0200
committerChris Mason2015-04-10 23:07:11 +0200
commitc9dc4c6578502c2085705347375b82089aad18d0 (patch)
tree2d6264a45e412e612dba1357cf6754dc680c2fd4 /fs/btrfs/ctree.h
parentbtrfs: move struct io_ctl into ctree.h and rename it (diff)
downloadkernel-qcow2-linux-c9dc4c6578502c2085705347375b82089aad18d0.tar.gz
kernel-qcow2-linux-c9dc4c6578502c2085705347375b82089aad18d0.tar.xz
kernel-qcow2-linux-c9dc4c6578502c2085705347375b82089aad18d0.zip
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/ctree.h')
-rw-r--r--fs/btrfs/ctree.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index e305ccd731fe..1df0d9db5332 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1261,9 +1261,12 @@ struct btrfs_io_ctl {
struct page *page;
struct page **pages;
struct btrfs_root *root;
+ struct inode *inode;
unsigned long size;
int index;
int num_pages;
+ int entries;
+ int bitmaps;
unsigned check_crcs:1;
};
@@ -1332,6 +1335,9 @@ struct btrfs_block_group_cache {
/* For dirty block groups */
struct list_head dirty_list;
+ struct list_head io_list;
+
+ struct btrfs_io_ctl io_ctl;
};
/* delayed seq elem */