diff options
author | Keith Busch <keith.busch@intel.com> | 2015-01-07 18:55:43 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-01-08 08:55:27 -0700 |
commit | 973c01919bce7e3559b62a856b29211ec5ac325c (patch) | |
tree | a2a3661f5c3cdef068b5e7a11709096f77b401f9 /block/blk-mq.c | |
parent | 3fd5940cb2e47a61dcff4108f39be4c72cb4dace (diff) | |
download | linux-stable-973c01919bce7e3559b62a856b29211ec5ac325c.tar.gz linux-stable-973c01919bce7e3559b62a856b29211ec5ac325c.tar.bz2 linux-stable-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.c | 6 |
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; |