summaryrefslogtreecommitdiff
path: root/fs/btrfs/async-thread.h
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2015-08-20 09:30:39 +0800
committerChris Mason <clm@fb.com>2015-08-31 11:46:40 -0700
commitc6dd6ea55758cf403bdc07a51a06c2a1d474f906 (patch)
treec9e8d9f30c65e3083fe36ac91bb981546b5af85d /fs/btrfs/async-thread.h
parent943c6e9925d90dc80207322b5799d95fb90ffec0 (diff)
downloadlwn-c6dd6ea55758cf403bdc07a51a06c2a1d474f906.tar.gz
lwn-c6dd6ea55758cf403bdc07a51a06c2a1d474f906.zip
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>
Diffstat (limited to 'fs/btrfs/async-thread.h')
-rw-r--r--fs/btrfs/async-thread.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/async-thread.h b/fs/btrfs/async-thread.h
index b0b093b6afec..ad4d0647d1a6 100644
--- a/fs/btrfs/async-thread.h
+++ b/fs/btrfs/async-thread.h
@@ -69,7 +69,7 @@ BTRFS_WORK_HELPER_PROTO(scrubparity_helper);
struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name,
unsigned int flags,
- int max_active,
+ int limit_active,
int thresh);
void btrfs_init_work(struct btrfs_work *work, btrfs_work_func_t helper,
btrfs_func_t func,