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>
This commit is contained in:
Chris Mason
2015-04-04 17:14:42 -07:00
parent 4c6d1d85ad
commit c9dc4c6578
4 changed files with 170 additions and 32 deletions

View File

@@ -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 */