aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 7cda51995c1e..bd70c2852ba0 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2279,6 +2279,10 @@ int open_ctree(struct super_block *sb,
2279 fs_info->thread_pool_size, 2279 fs_info->thread_pool_size,
2280 &fs_info->generic_worker); 2280 &fs_info->generic_worker);
2281 2281
2282 btrfs_init_workers(&fs_info->flush_workers, "flush_delalloc",
2283 fs_info->thread_pool_size,
2284 &fs_info->generic_worker);
2285
2282 btrfs_init_workers(&fs_info->submit_workers, "submit", 2286 btrfs_init_workers(&fs_info->submit_workers, "submit",
2283 min_t(u64, fs_devices->num_devices, 2287 min_t(u64, fs_devices->num_devices,
2284 fs_info->thread_pool_size), 2288 fs_info->thread_pool_size),
@@ -2350,6 +2354,7 @@ int open_ctree(struct super_block *sb,
2350 ret |= btrfs_start_workers(&fs_info->delayed_workers); 2354 ret |= btrfs_start_workers(&fs_info->delayed_workers);
2351 ret |= btrfs_start_workers(&fs_info->caching_workers); 2355 ret |= btrfs_start_workers(&fs_info->caching_workers);
2352 ret |= btrfs_start_workers(&fs_info->readahead_workers); 2356 ret |= btrfs_start_workers(&fs_info->readahead_workers);
2357 ret |= btrfs_start_workers(&fs_info->flush_workers);
2353 if (ret) { 2358 if (ret) {
2354 err = -ENOMEM; 2359 err = -ENOMEM;
2355 goto fail_sb_buffer; 2360 goto fail_sb_buffer;
@@ -2667,6 +2672,7 @@ fail_sb_buffer:
2667 btrfs_stop_workers(&fs_info->submit_workers); 2672 btrfs_stop_workers(&fs_info->submit_workers);
2668 btrfs_stop_workers(&fs_info->delayed_workers); 2673 btrfs_stop_workers(&fs_info->delayed_workers);
2669 btrfs_stop_workers(&fs_info->caching_workers); 2674 btrfs_stop_workers(&fs_info->caching_workers);
2675 btrfs_stop_workers(&fs_info->flush_workers);
2670fail_alloc: 2676fail_alloc:
2671fail_iput: 2677fail_iput:
2672 btrfs_mapping_tree_free(&fs_info->mapping_tree); 2678 btrfs_mapping_tree_free(&fs_info->mapping_tree);
@@ -3339,6 +3345,7 @@ int close_ctree(struct btrfs_root *root)
3339 btrfs_stop_workers(&fs_info->delayed_workers); 3345 btrfs_stop_workers(&fs_info->delayed_workers);
3340 btrfs_stop_workers(&fs_info->caching_workers); 3346 btrfs_stop_workers(&fs_info->caching_workers);
3341 btrfs_stop_workers(&fs_info->readahead_workers); 3347 btrfs_stop_workers(&fs_info->readahead_workers);
3348 btrfs_stop_workers(&fs_info->flush_workers);
3342 3349
3343#ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY 3350#ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY
3344 if (btrfs_test_opt(root, CHECK_INTEGRITY)) 3351 if (btrfs_test_opt(root, CHECK_INTEGRITY))