Skip to contentSkip to conversation

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

PATCH In review Christoph Hellwig 2 participants 2 messages Mar 28, 2023 – Mar 29, 2023 Btrfs file system

lore
Share & tools
lore
#0 lore raw

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

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")
---
 fs/btrfs/super.c | 2 ++
 1 file changed, 2 insertions(+)
fs/btrfs/super.c +2 -0
index d8885966e801cd..4809aa168665c7 100644
@@ -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);
Signature · 1 line
2.39.2
#1 lore raw
Quoted 7 lines · Christoph Hellwig

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")

Added to misc-next, thanks.