]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: allow changing 'thread_pool' size at remount time
authorSergei Trofimovich <slyfox@gentoo.org>
Tue, 24 Apr 2012 19:59:16 +0000 (22:59 +0300)
committerJosef Bacik <josef@redhat.com>
Wed, 30 May 2012 14:23:30 +0000 (10:23 -0400)
commit5883cd1ed2866b331e8faca773ac7d413a97f270
treeb6b9f88d0d51fa325dfa059a203e7e40856fc36c
parente05ee05ac308fa0d665cdddc9162432073a0582e
btrfs: allow changing 'thread_pool' size at remount time

Changing 'mount -oremount,thread_pool=2 /' didn't make any effect:

maximum amount of worker threads is specified in 2 places:
- in 'strict btrfs_fs_info::thread_pool_size'
- in each worker struct: 'struct btrfs_workers::max_workers'

'mount -oremount' updated only 'btrfs_fs_info::thread_pool_size'.

Fix it by pushing new maximum value to all created worker structures
as well.

Cc: Josef Bacik <josef@redhat.com>
Cc: Chris Mason <chris.mason@oracle.com>
Reviewed-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
fs/btrfs/super.c