diff mbox series

btrfs: restore the thread_pool= behavior in remount for the end I/O workqueues

Message ID 20230328035613.1077697-1-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series btrfs: restore the thread_pool= behavior in remount for the end I/O workqueues | expand

Commit Message

Christoph Hellwig March 28, 2023, 3:56 a.m. UTC
Commit d7b9416fe5c5 ("btrfs: remove btrfs_end_io_wq") converted the read
and I/O handling from btrfs_workqueues to Linux workqueues, and as part
of that lost the code to apply the thread_pool= based max_active limit
on remount.  Restore it.

Fixes: d7b9416fe5c5 ("btrfs: remove btrfs_end_io_wq")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/btrfs/super.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

David Sterba March 29, 2023, 5:37 p.m. UTC | #1
On Tue, Mar 28, 2023 at 12:56:13PM +0900, Christoph Hellwig wrote:
> Commit d7b9416fe5c5 ("btrfs: remove btrfs_end_io_wq") converted the read
> and I/O handling from btrfs_workqueues to Linux workqueues, and as part
> of that lost the code to apply the thread_pool= based max_active limit
> on remount.  Restore it.
> 
> Fixes: d7b9416fe5c5 ("btrfs: remove btrfs_end_io_wq")
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Added to misc-next, thanks.
diff mbox series

Patch

diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index d8885966e801cd..4809aa168665c7 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1632,6 +1632,8 @@  static void btrfs_resize_thread_pool(struct btrfs_fs_info *fs_info,
 	btrfs_workqueue_set_max(fs_info->hipri_workers, new_pool_size);
 	btrfs_workqueue_set_max(fs_info->delalloc_workers, new_pool_size);
 	btrfs_workqueue_set_max(fs_info->caching_workers, new_pool_size);
+	workqueue_set_max_active(fs_info->endio_workers, new_pool_size);
+	workqueue_set_max_active(fs_info->endio_meta_workers, new_pool_size);
 	btrfs_workqueue_set_max(fs_info->endio_write_workers, new_pool_size);
 	btrfs_workqueue_set_max(fs_info->endio_freespace_worker, new_pool_size);
 	btrfs_workqueue_set_max(fs_info->delayed_workers, new_pool_size);