summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorKeith Busch2015-01-08 02:55:43 +0100
committerJens Axboe2015-01-08 16:55:27 +0100
commit973c01919bce7e3559b62a856b29211ec5ac325c (patch)
treea2a3661f5c3cdef068b5e7a11709096f77b401f9 /block/blk-mq.c
parentblk-mq: Wake tasks entering queue on dying (diff)
downloadkernel-qcow2-linux-973c01919bce7e3559b62a856b29211ec5ac325c.tar.gz
kernel-qcow2-linux-973c01919bce7e3559b62a856b29211ec5ac325c.tar.xz
kernel-qcow2-linux-973c01919bce7e3559b62a856b29211ec5ac325c.zip
blk-mq: Export if requests were started
Drivers can iterate over all allocated request tags, but their callback needs a way to know if the driver started the request in the first place. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index aefed96369dd..ce4811667d36 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -404,6 +404,12 @@ void blk_mq_complete_request(struct request *rq)
}
EXPORT_SYMBOL(blk_mq_complete_request);
+int blk_mq_request_started(struct request *rq)
+{
+ return test_bit(REQ_ATOM_STARTED, &rq->atomic_flags);
+}
+EXPORT_SYMBOL_GPL(blk_mq_request_started);
+
void blk_mq_start_request(struct request *rq)
{
struct request_queue *q = rq->q;