aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2014-02-27 21:46:18 -0500
committerJosef Bacik <jbacik@fb.com>2014-03-10 15:17:15 -0400
commita046e9c88b0f46677923864295eac7c92cd962cb (patch)
tree72cff91c3bb1426473d5d70a2b99684c86102594 /fs/btrfs/disk-io.c
parent0339ef2f42bcfbb2d4021ad6f38fe20580082c85 (diff)
btrfs: Cleanup the old btrfs_worker.
Since all the btrfs_worker is replaced with the newly created btrfs_workqueue, the old codes can be easily remove. Signed-off-by: Quwenruo <quwenruo@cn.fujitsu.com> Tested-by: David Sterba <dsterba@suse.cz> Signed-off-by: Josef Bacik <jbacik@fb.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 9aaf9c309b54..c80d9507171c 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1994,7 +1994,6 @@ static noinline int next_root_backup(struct btrfs_fs_info *info,
1994/* helper to cleanup workers */ 1994/* helper to cleanup workers */
1995static void btrfs_stop_all_workers(struct btrfs_fs_info *fs_info) 1995static void btrfs_stop_all_workers(struct btrfs_fs_info *fs_info)
1996{ 1996{
1997 btrfs_stop_workers(&fs_info->generic_worker);
1998 btrfs_destroy_workqueue(fs_info->fixup_workers); 1997 btrfs_destroy_workqueue(fs_info->fixup_workers);
1999 btrfs_destroy_workqueue(fs_info->delalloc_workers); 1998 btrfs_destroy_workqueue(fs_info->delalloc_workers);
2000 btrfs_destroy_workqueue(fs_info->workers); 1999 btrfs_destroy_workqueue(fs_info->workers);
@@ -2472,8 +2471,6 @@ int open_ctree(struct super_block *sb,
2472 } 2471 }
2473 2472
2474 max_active = fs_info->thread_pool_size; 2473 max_active = fs_info->thread_pool_size;
2475 btrfs_init_workers(&fs_info->generic_worker,
2476 "genwork", 1, NULL);
2477 2474
2478 fs_info->workers = 2475 fs_info->workers =
2479 btrfs_alloc_workqueue("worker", flags | WQ_HIGHPRI, 2476 btrfs_alloc_workqueue("worker", flags | WQ_HIGHPRI,
@@ -2526,15 +2523,6 @@ int open_ctree(struct super_block *sb,
2526 fs_info->qgroup_rescan_workers = 2523 fs_info->qgroup_rescan_workers =
2527 btrfs_alloc_workqueue("qgroup-rescan", flags, 1, 0); 2524 btrfs_alloc_workqueue("qgroup-rescan", flags, 1, 0);
2528 2525
2529 /*
2530 * btrfs_start_workers can really only fail because of ENOMEM so just
2531 * return -ENOMEM if any of these fail.
2532 */
2533 ret = btrfs_start_workers(&fs_info->generic_worker);
2534 if (ret) {
2535 err = -ENOMEM;
2536 goto fail_sb_buffer;
2537 }
2538 if (!(fs_info->workers && fs_info->delalloc_workers && 2526 if (!(fs_info->workers && fs_info->delalloc_workers &&
2539 fs_info->submit_workers && fs_info->flush_workers && 2527 fs_info->submit_workers && fs_info->flush_workers &&
2540 fs_info->endio_workers && fs_info->endio_meta_workers && 2528 fs_info->endio_workers && fs_info->endio_meta_workers &&