mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-26 00:10:19 +00:00
scst: Fix removal of deprecated create_workqueue()
create_workqueue() was replaced with alloc_workqueue() with max_active set
to 0. However, the original create_workqueue() implicitly set max_active
to 1.
This change has led to unexpected bugs because previously, work items
could only be executed one by one. With the change, they can now be
executed simultaneously.
This patch fixes the issue by restoring max_active to 1.
Fixes: f4686e9102 ("scst: Remove deprecated create_workqueue()")
Fixes: https://github.com/SCST-project/scst/issues/179
This commit is contained in:
@@ -138,7 +138,7 @@ int isert_global_init(void)
|
||||
spin_lock_init(&isert_glob.portal_lock);
|
||||
init_waitqueue_head(&isert_glob.portal_wq);
|
||||
|
||||
isert_glob.conn_wq = alloc_workqueue("isert_conn_wq", WQ_MEM_RECLAIM, 0);
|
||||
isert_glob.conn_wq = alloc_workqueue("isert_conn_wq", WQ_MEM_RECLAIM, 1);
|
||||
if (!isert_glob.conn_wq) {
|
||||
PRINT_ERROR("Failed to alloc iser conn work queue");
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -450,7 +450,7 @@ static int qla25xx_setup_mode(struct scsi_qla_host *vha)
|
||||
"Failed to create request queue.\n");
|
||||
goto fail;
|
||||
}
|
||||
ha->wq = alloc_workqueue("qla2xxx_wq", WQ_MEM_RECLAIM, 0);
|
||||
ha->wq = alloc_workqueue("qla2xxx_wq", WQ_MEM_RECLAIM, 1);
|
||||
vha->req = ha->req_q_map[req];
|
||||
options |= BIT_1;
|
||||
for (ques = 1; ques < ha->max_rsp_queues; ques++) {
|
||||
|
||||
@@ -15412,7 +15412,7 @@ int __init scst_lib_init(void)
|
||||
|
||||
scst_scsi_op_list_init();
|
||||
|
||||
scst_release_acg_wq = alloc_workqueue("scst_release_acg", WQ_MEM_RECLAIM, 0);
|
||||
scst_release_acg_wq = alloc_workqueue("scst_release_acg", WQ_MEM_RECLAIM, 1);
|
||||
if (unlikely(!scst_release_acg_wq)) {
|
||||
PRINT_ERROR("Failed to allocate scst_release_acg_wq");
|
||||
res = -ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user