Commit aa306ab7 authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe
Browse files

blk-mq: introduce blk_mq_request_completed()

NVMe needs this function to decide if one request to be aborted has
been completed in normal IO path already.

So introduce it.

Cc: Max Gurtovoy <>
Cc: Sagi Grimberg <>
Cc: Keith Busch <>
Cc: Christoph Hellwig <>
Reviewed-by: default avatarSagi Grimberg <>
Signed-off-by: default avatarMing Lei <>
Signed-off-by: default avatarJens Axboe <>
parent e21a712a
......@@ -665,6 +665,12 @@ int blk_mq_request_started(struct request *rq)
int blk_mq_request_completed(struct request *rq)
return blk_mq_rq_state(rq) == MQ_RQ_COMPLETE;
void blk_mq_start_request(struct request *rq)
struct request_queue *q = rq->q;
......@@ -296,6 +296,7 @@ static inline u16 blk_mq_unique_tag_to_tag(u32 unique_tag)
int blk_mq_request_started(struct request *rq);
int blk_mq_request_completed(struct request *rq);
void blk_mq_start_request(struct request *rq);
void blk_mq_end_request(struct request *rq, blk_status_t error);
void __blk_mq_end_request(struct request *rq, blk_status_t error);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment