summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-10-12 12:42:10 -0400
committerDavid Sterba <dsterba@suse.com>2019-10-15 09:43:29 -0400
commit80ed4548d0711d15ca51be5dee0ff813051cfc90 (patch)
tree8372a596b1a022ed3508b3d47469bd776f4e44c2
parent4b654acdae850f48b8250b9a578a4eaa518c7a6f (diff)
btrfs: don't needlessly create extent-refs kernel thread
The patch 32b593bfcb58 ("Btrfs: remove no longer used function to run delayed refs asynchronously") removed the async delayed refs but the thread has been created, without any use. Remove it to avoid resource consumption. Fixes: 32b593bfcb58 ("Btrfs: remove no longer used function to run delayed refs asynchronously") CC: stable@vger.kernel.org # 5.2+ Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--fs/btrfs/ctree.h2
-rw-r--r--fs/btrfs/disk-io.c6
2 files changed, 0 insertions, 8 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 19d669d12ca1..c1489c229694 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -734,8 +734,6 @@ struct btrfs_fs_info {
734 struct btrfs_workqueue *fixup_workers; 734 struct btrfs_workqueue *fixup_workers;
735 struct btrfs_workqueue *delayed_workers; 735 struct btrfs_workqueue *delayed_workers;
736 736
737 /* the extent workers do delayed refs on the extent allocation tree */
738 struct btrfs_workqueue *extent_workers;
739 struct task_struct *transaction_kthread; 737 struct task_struct *transaction_kthread;
740 struct task_struct *cleaner_kthread; 738 struct task_struct *cleaner_kthread;
741 u32 thread_pool_size; 739 u32 thread_pool_size;
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 044981cf6df9..402b61bf345c 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2008,7 +2008,6 @@ static void btrfs_stop_all_workers(struct btrfs_fs_info *fs_info)
2008 btrfs_destroy_workqueue(fs_info->readahead_workers); 2008 btrfs_destroy_workqueue(fs_info->readahead_workers);
2009 btrfs_destroy_workqueue(fs_info->flush_workers); 2009 btrfs_destroy_workqueue(fs_info->flush_workers);
2010 btrfs_destroy_workqueue(fs_info->qgroup_rescan_workers); 2010 btrfs_destroy_workqueue(fs_info->qgroup_rescan_workers);
2011 btrfs_destroy_workqueue(fs_info->extent_workers);
2012 /* 2011 /*
2013 * Now that all other work queues are destroyed, we can safely destroy 2012 * Now that all other work queues are destroyed, we can safely destroy
2014 * the queues used for metadata I/O, since tasks from those other work 2013 * the queues used for metadata I/O, since tasks from those other work
@@ -2214,10 +2213,6 @@ static int btrfs_init_workqueues(struct btrfs_fs_info *fs_info,
2214 max_active, 2); 2213 max_active, 2);
2215 fs_info->qgroup_rescan_workers = 2214 fs_info->qgroup_rescan_workers =
2216 btrfs_alloc_workqueue(fs_info, "qgroup-rescan", flags, 1, 0); 2215 btrfs_alloc_workqueue(fs_info, "qgroup-rescan", flags, 1, 0);
2217 fs_info->extent_workers =
2218 btrfs_alloc_workqueue(fs_info, "extent-refs", flags,
2219 min_t(u64, fs_devices->num_devices,
2220 max_active), 8);
2221 2216
2222 if (!(fs_info->workers && fs_info->delalloc_workers && 2217 if (!(fs_info->workers && fs_info->delalloc_workers &&
2223 fs_info->submit_workers && fs_info->flush_workers && 2218 fs_info->submit_workers && fs_info->flush_workers &&
@@ -2228,7 +2223,6 @@ static int btrfs_init_workqueues(struct btrfs_fs_info *fs_info,
2228 fs_info->endio_freespace_worker && fs_info->rmw_workers && 2223 fs_info->endio_freespace_worker && fs_info->rmw_workers &&
2229 fs_info->caching_workers && fs_info->readahead_workers && 2224 fs_info->caching_workers && fs_info->readahead_workers &&
2230 fs_info->fixup_workers && fs_info->delayed_workers && 2225 fs_info->fixup_workers && fs_info->delayed_workers &&
2231 fs_info->extent_workers &&
2232 fs_info->qgroup_rescan_workers)) { 2226 fs_info->qgroup_rescan_workers)) {
2233 return -ENOMEM; 2227 return -ENOMEM;
2234 } 2228 }