/** * blk_abort_request -- Request request recovery for the specified command * @req: pointer to the request of interest * * This function requests that the block layer start recovery for the * request by deleting the timer and calling the q's timeout function. * LLDDs who implement their own error recovery MAY ignore the timeout * event if they generated blk_abort_req. Must hold queue lock. */ void blk_abort_request(struct request *req) { if (blk_mark_rq_complete(req)) return; blk_delete_timer(req); blk_rq_timed_out(req); }
/** * blk_abort_request -- Request request recovery for the specified command * @req: pointer to the request of interest * * This function requests that the block layer start recovery for the * request by deleting the timer and calling the q's timeout function. * LLDDs who implement their own error recovery MAY ignore the timeout * event if they generated blk_abort_req. Must hold queue lock. */ void blk_abort_request(struct request *req) { if (blk_mark_rq_complete(req)) return; blk_delete_timer(req); if (req->q->mq_ops) blk_mq_rq_timed_out(req, false); else blk_rq_timed_out(req); }
static void blk_rq_check_expired(struct request *rq, unsigned long *next_timeout, unsigned int *next_set) { if (time_after_eq(jiffies, rq->deadline)) { list_del_init(&rq->timeout_list); /* * Check if we raced with end io completion */ if (!blk_mark_rq_complete(rq)) blk_rq_timed_out(rq); } else if (!*next_set || time_after(*next_timeout, rq->deadline)) { *next_timeout = rq->deadline; *next_set = 1; } }