diff options
| author | Chris Mason <chris.mason@oracle.com> | 2008-08-15 15:34:14 -0400 |
|---|---|---|
| committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:06 -0400 |
| commit | b720d209524fccdd33a499351f2ca880b8c0ffb4 (patch) | |
| tree | 81fccf72f941452ce03ca03734aea867192ad6e8 /fs/btrfs/disk-io.c | |
| parent | db69e0ebae944690de89851315404f483e6464e0 (diff) | |
Btrfs: Limit the number of async bio submission kthreads to the number of devices
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
| -rw-r--r-- | fs/btrfs/disk-io.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 56c54a41dbb..99bd9f9b9ee 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
| @@ -1348,7 +1348,9 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
| 1348 | * cannot dynamically grow. | 1348 | * cannot dynamically grow. |
| 1349 | */ | 1349 | */ |
| 1350 | btrfs_init_workers(&fs_info->workers, fs_info->thread_pool_size); | 1350 | btrfs_init_workers(&fs_info->workers, fs_info->thread_pool_size); |
| 1351 | btrfs_init_workers(&fs_info->submit_workers, fs_info->thread_pool_size); | 1351 | btrfs_init_workers(&fs_info->submit_workers, |
| 1352 | min_t(u64, fs_devices->num_devices, | ||
| 1353 | fs_info->thread_pool_size)); | ||
| 1352 | 1354 | ||
| 1353 | /* a higher idle thresh on the submit workers makes it much more | 1355 | /* a higher idle thresh on the submit workers makes it much more |
| 1354 | * likely that bios will be send down in a sane order to the | 1356 | * likely that bios will be send down in a sane order to the |
