mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 01:51:39 +00:00
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>
This commit is contained in:
parent
943c6e9925
commit
c6dd6ea557
2 changed files with 35 additions and 24 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue