summaryrefslogtreecommitdiff
path: root/fs/io-wq.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-03-14 00:31:04 +0300
committerJens Axboe <axboe@kernel.dk>2020-03-14 17:02:28 -0600
commit8766dd516c535abf04491dca674d0ef6c95d814f (patch)
treee91788f7723397bc61cdde1a26418f3b32da533a /fs/io-wq.h
parentd78298e73a3443a3c1766fa89f5370f52a4efd94 (diff)
downloadlinux-sh-8766dd516c535abf04491dca674d0ef6c95d814f.tar.gz
io-wq: split hashing and enqueueing
It's a preparation patch removing io_wq_enqueue_hashed(), which now should be done by io_wq_hash_work() + io_wq_enqueue(). Also, set hash value for dependant works, and do it as late as possible, because req->file can be unavailable before. This hash will be ignored by io-wq. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.h')
-rw-r--r--fs/io-wq.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/io-wq.h b/fs/io-wq.h
index 2117b9a4f161..298b21f4a4d2 100644
--- a/fs/io-wq.h
+++ b/fs/io-wq.h
@@ -94,7 +94,12 @@ bool io_wq_get(struct io_wq *wq, struct io_wq_data *data);
void io_wq_destroy(struct io_wq *wq);
void io_wq_enqueue(struct io_wq *wq, struct io_wq_work *work);
-void io_wq_enqueue_hashed(struct io_wq *wq, struct io_wq_work *work, void *val);
+void io_wq_hash_work(struct io_wq_work *work, void *val);
+
+static inline bool io_wq_is_hashed(struct io_wq_work *work)
+{
+ return work->flags & IO_WQ_WORK_HASHED;
+}
void io_wq_cancel_all(struct io_wq *wq);
enum io_wq_cancel io_wq_cancel_work(struct io_wq *wq, struct io_wq_work *cwork);