Signed-off-by: Chris Mason <chris.mason@oracle.com>
* cannot dynamically grow.
*/
btrfs_init_workers(&fs_info->workers, fs_info->thread_pool_size);
- btrfs_init_workers(&fs_info->submit_workers, fs_info->thread_pool_size);
+ btrfs_init_workers(&fs_info->submit_workers,
+ min_t(u64, fs_devices->num_devices,
+ fs_info->thread_pool_size));
/* a higher idle thresh on the submit workers makes it much more
* likely that bios will be send down in a sane order to the