]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: async_thread: Fix workqueue 'max_active' value when initializing
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Thu, 20 Aug 2015 01:30:39 +0000 (09:30 +0800)
committerChris Mason <clm@fb.com>
Mon, 31 Aug 2015 18:46:40 +0000 (11:46 -0700)
commit990c5641c8aaa3356ef460cbdf88dc659c9bce6b
treec9e8d9f30c65e3083fe36ac91bb981546b5af85d
parente557279dd5befceaf645b79204ac8e1a30066c12
btrfs: async_thread: Fix workqueue 'max_active' value when initializing

At initializing time, for threshold-able workqueue, it's max_active
of kernel workqueue should be 1 and grow if it hits threshold.

But due to the bad naming, there is both 'max_active' for kernel
workqueue and btrfs workqueue.
So wrong value is given at workqueue initialization.

This patch fixes it, and to avoid further misunderstanding, change the
member name of btrfs_workqueue to 'current_active' and 'limit_active'.

Also corresponding comment is added for readability.

Reported-by: Alex Lyakas <alex.btrfs@zadarastorage.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/async-thread.c
fs/btrfs/async-thread.h