summaryrefslogtreecommitdiff
path: root/drivers/nvme/target/nvmet.h
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2022-03-21 13:57:27 +0200
committerChristoph Hellwig <hch@lst.de>2022-03-29 09:29:04 +0200
commit8832cf922151e9dfa2821736beb0ae2dd3968b6e (patch)
treee73b437a77400681d0c2bb1e94a52f2ddfcdb34a /drivers/nvme/target/nvmet.h
parentbc360b0b1611566e1bd47384daf49af6a1c51837 (diff)
downloadlwn-8832cf922151e9dfa2821736beb0ae2dd3968b6e.tar.gz
lwn-8832cf922151e9dfa2821736beb0ae2dd3968b6e.zip
nvmet: use a private workqueue instead of the system workqueue
Any attempt to flush kernel-global WQs has possibility of deadlock so we should simply stop using them, instead introduce nvmet_wq which is the generic nvmet workqueue for work elements that don't explicitly require a dedicated workqueue (by the mere fact that they are using the system_wq). Changes were done using the following replaces: - s/schedule_work(/queue_work(nvmet_wq, /g - s/schedule_delayed_work(/queue_delayed_work(nvmet_wq, /g - s/flush_scheduled_work()/flush_workqueue(nvmet_wq)/g Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target/nvmet.h')
-rw-r--r--drivers/nvme/target/nvmet.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/target/nvmet.h b/drivers/nvme/target/nvmet.h
index d910c6aad4b6..69818752a33a 100644
--- a/drivers/nvme/target/nvmet.h
+++ b/drivers/nvme/target/nvmet.h
@@ -366,6 +366,7 @@ struct nvmet_req {
extern struct workqueue_struct *buffered_io_wq;
extern struct workqueue_struct *zbd_wq;
+extern struct workqueue_struct *nvmet_wq;
static inline void nvmet_set_result(struct nvmet_req *req, u32 result)
{