参照元

説明

引数

返り値

参考

実装

void blk_rq_timed_out_timer(unsigned long data)
{
	struct request_queue *q = (struct request_queue *) data;
	unsigned long flags, next = 0;
	struct request *rq, *tmp;
	spin_lock_irqsave(q->queue_lock, flags);
	list_for_each_entry_safe(rq, tmp, &q->timeout_list, timeout_list) {
		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))
				continue;
			blk_rq_timed_out(rq);
		} else if (!next || time_after(next, rq->deadline))
			next = rq->deadline;
	}

	/*
	 * next can never be 0 here with the list non-empty, since we always
	 * bump ->deadline to 1 so we can detect if the timer was ever added
	 * or not. See comment in blk_add_timer()
	 */
	if (next)
		mod_timer(&q->timeout, round_jiffies_up(next));
	spin_unlock_irqrestore(q->queue_lock, flags);
}

コメント


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS